:root {
  color-scheme: light;
  --bg: #f7fbfa;
  --surface: #ffffff;
  --surface-soft: #eef7f5;
  --surface-blue: #edf5fb;
  --ink: #1f2f35;
  --muted: #66777d;
  --line: #dce8e6;
  --brand: #0f766e;
  --brand-dark: #0b4f4a;
  --blue: #2563eb;
  --amber: #c47a2c;
  --rose: #b42358;
  --danger: #b91c1c;
  --shadow: 0 18px 60px rgba(15, 71, 68, 0.14);
  --radius: 8px;
  --radius-sm: 6px;
  --container: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: 0;
}

body.admin-surface {
  background: #edf3f2;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

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

img {
  display: block;
  max-width: 100%;
}

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

h1 {
  margin-bottom: 18px;
  font-size: 76px;
  line-height: 0.96;
  font-weight: 760;
}

h2 {
  margin-bottom: 16px;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 720;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.18;
}

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

.site-header {
  position: fixed;
  inset: 16px 24px auto;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  width: min(calc(100% - 48px), 1220px);
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 42px rgba(23, 54, 52, 0.12);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #1d9a8f);
  color: #fff;
  font-weight: 780;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.26);
}

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

.brand strong {
  font-size: 18px;
}

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

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.site-nav a,
.admin-nav button {
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease;
}

.site-nav a {
  padding: 10px 12px;
  font-size: 14px;
}

.site-nav a:hover,
.admin-nav button:hover,
.admin-nav button.active {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.header-actions,
.hero-actions,
.topbar-actions,
.form-actions,
.contact-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.phone-link {
  color: var(--brand-dark);
  font-weight: 700;
  white-space: nowrap;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 720;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.24);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--brand-dark);
}

.btn-secondary:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 12px 28px rgba(31, 47, 53, 0.08);
}

.btn-light {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-dark);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn-danger {
  background: #fff1f1;
  color: var(--danger);
  border-color: #ffd4d4;
}

.btn-large {
  min-height: 52px;
  padding-inline: 22px;
}

.compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 24px;
}

.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 20vh;
  background: linear-gradient(180deg, rgba(247, 251, 250, 0), var(--bg));
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 53, 50, 0.78), rgba(7, 53, 50, 0.36) 42%, rgba(247, 251, 250, 0.04) 74%),
    linear-gradient(180deg, rgba(13, 56, 54, 0.18), rgba(13, 56, 54, 0.18));
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  padding-top: 92px;
  padding-bottom: 56px;
}

.hero-copy {
  width: min(620px, 100%);
  color: #fff;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.86);
}

.hero-subtitle {
  width: min(560px, 100%);
  margin-bottom: 28px;
  font-size: 19px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #bff4ea;
}

.trust-row,
.chips,
.meta-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.trust-row {
  margin-top: 26px;
}

.trust-row span,
.chips span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 720;
}

.trust-row span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(10px);
}

.chips span,
.tag {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.booking-strip,
.section {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.booking-strip {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  transform: translateY(-28px);
  margin-bottom: 42px;
  padding: 24px;
  border: 1px solid rgba(220, 232, 230, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.booking-strip h2 {
  margin-bottom: 4px;
  font-size: 28px;
}

.booking-strip p:last-child {
  margin-bottom: 0;
}

.section {
  padding: 72px 0;
}

.section-head {
  width: min(720px, 100%);
  margin-bottom: 30px;
}

.section-head p {
  font-size: 17px;
}

.service-grid,
.doctor-grid,
.process-grid,
.faq-grid,
.patient-grid,
.doctor-admin-grid,
.admin-grid,
.report-grid {
  display: grid;
  gap: 16px;
}

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

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

.process-grid,
.admin-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.service-card,
.doctor-card,
.process-step,
.faq-item,
.admin-panel,
.stat-card,
.patient-card,
.admin-entity-card,
.report-card,
.week-day,
.contact-panel,
.login-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(31, 47, 53, 0.06);
}

.service-card,
.doctor-card,
.process-step,
.patient-card,
.admin-entity-card,
.report-card,
.week-day {
  padding: 20px;
}

.service-card,
.doctor-card,
.admin-entity-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
}

.service-card:hover,
.doctor-card:hover,
.admin-entity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(31, 47, 53, 0.1);
}

.service-card,
.doctor-card,
.admin-entity-card,
.ultra-row,
.price-row,
.choice-row,
.doctor-choice,
.calendar-cell,
.slot-btn {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.service-card-top,
.doctor-foot,
.panel-head,
.entity-head,
.payment-row,
.price-row,
.choice-row,
.slot-row,
.ultra-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.service-card p,
.doctor-card p {
  flex: 1;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 18px;
}

.doctor-avatar {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  overflow: hidden;
  border: 3px solid color-mix(in srgb, var(--doctor-color, var(--brand)) 18%, #ffffff);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--doctor-color, var(--brand)), color-mix(in srgb, var(--doctor-color, var(--brand)) 64%, #ffffff));
  color: #fff;
  font-size: 24px;
  font-weight: 780;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--doctor-color, var(--brand)) 22%, transparent);
}

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

.doctor-avatar.small {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  font-size: 16px;
}

.doctor-avatar.large {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  font-size: 34px;
}

.doctor-specialty {
  color: var(--brand-dark);
  font-weight: 700;
}

.process-band,
.ultrasound-band,
.faq-section {
  width: 100%;
  max-width: none;
  padding-inline: max(24px, calc((100% - var(--container)) / 2));
}

.process-band {
  background: #eff7f6;
}

.process-step span {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--amber);
  font-size: 26px;
  font-weight: 780;
}

.ultrasound-band {
  background: linear-gradient(135deg, #123d3a, #0f766e 58%, #d1914a);
  color: #fff;
}

.ultrasound-band p {
  color: rgba(255, 255, 255, 0.82);
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: start;
  width: min(var(--container), 100%);
  margin: 0 auto;
}

.ultra-list,
.price-table,
.payment-list,
.slot-list {
  display: grid;
  gap: 10px;
}

.ultra-row,
.price-row,
.choice-row,
.slot-row {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: left;
}

.ultra-row {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ultra-row small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
}

.price-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fff;
}

.price-group {
  padding: 12px;
}

.price-row,
.choice-row,
.slot-row {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.price-row:hover,
.choice-row:hover,
.slot-row:hover,
.ultra-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(31, 47, 53, 0.08);
}

.price-row span {
  font-weight: 700;
}

.faq-item {
  padding: 18px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 760;
}

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

.contacts-section {
  padding-bottom: 96px;
}

.contact-panel {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff, #edf7f4);
}

.contact-map {
  overflow: hidden;
  height: 320px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef6f5;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.legal-section {
  padding-top: 40px;
}

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

.legal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: #fff;
}

.legal-card p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 28px 24px 84px;
  color: var(--muted);
}

.site-footer a {
  color: var(--brand-dark);
  font-weight: 700;
}

.mobile-quickbar {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 33, 34, 0.48);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(920px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 30px 90px rgba(7, 38, 40, 0.26);
}

.booking-modal {
  padding: 24px;
}

.admin-modal {
  padding: 22px;
}

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

.modal-head h2 {
  margin-bottom: 0;
  font-size: 30px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.stepper span {
  display: grid;
  place-items: center;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5efed;
  color: transparent;
}

.stepper span.active {
  background: var(--brand);
}

.booking-step {
  display: grid;
  gap: 16px;
}

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

.booking-category {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fafdfe;
}

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

.compact-checks {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 4px 0 14px;
}

.compact-checks .check-field {
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.booking-date-picker {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.booking-date-controls {
  display: grid;
  grid-template-columns: 44px minmax(180px, 240px) 44px;
  gap: 8px;
  align-items: end;
}

.date-step-btn {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--brand-dark);
  font-size: 28px;
  font-weight: 760;
  line-height: 1;
}

.date-step-btn:disabled {
  opacity: 0.38;
}

.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.date-pill {
  display: grid;
  min-width: 96px;
  gap: 2px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.date-pill strong {
  font-size: 14px;
}

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

.date-pill.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.18);
}

.date-pill.selected small {
  color: rgba(255, 255, 255, 0.82);
}

.doctor-choice,
.slot-btn {
  display: grid;
  gap: 8px;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  text-align: left;
}

.doctor-choice.selected,
.slot-btn.selected {
  border-color: var(--brand);
  background: var(--surface-soft);
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.14);
}

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

.slot-btn {
  min-height: 82px;
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.booking-summary {
  display: grid;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
}

.success-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 34px 18px;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 36px;
  font-weight: 800;
}

.success-details {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.inline-field {
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: center;
}

.compact-field {
  width: min(260px, 100%);
}

.search-field {
  width: min(420px, 100%);
}

.doctor-photo-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafdfe;
}

.doctor-photo-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.doctor-photo-controls small {
  flex-basis: 100%;
  color: var(--muted);
}

.photo-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.photo-upload-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.check-field input {
  margin-top: 3px;
  accent-color: var(--brand);
}

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

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: #fbfefd;
  color: var(--muted);
  text-align: center;
}

.settings-note {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fafdfe;
}

.settings-note h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.settings-note p {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 130;
  max-width: min(360px, calc(100% - 48px));
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #123d3a;
  color: #fff;
  box-shadow: 0 18px 46px rgba(7, 38, 40, 0.22);
  font-weight: 740;
}

.toast.tone-danger {
  background: var(--danger);
}

.admin-shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.admin-brand {
  margin-bottom: 24px;
}

.admin-nav {
  display: grid;
  gap: 4px;
}

.admin-nav button {
  width: 100%;
  min-height: 42px;
  border: 0;
  padding: 10px 12px;
  background: transparent;
  text-align: left;
  font-weight: 720;
}

.sidebar-foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.admin-main {
  min-width: 0;
  padding: 24px;
}

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

.admin-topbar h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.1;
}

.admin-grid {
  margin-bottom: 16px;
}

.admin-panel,
.stat-card {
  padding: 18px;
}

.stat-card {
  display: grid;
  gap: 4px;
}

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

.stat-card strong {
  color: var(--brand-dark);
  font-size: 27px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

.data-table small {
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 210px;
}

.status-select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  background: #fff;
  font-weight: 700;
}

.tone-ok,
.tone-done {
  --tone: #0f766e;
}

.tone-info {
  --tone: #2563eb;
}

.tone-warn,
.tone-accent {
  --tone: #c47a2c;
}

.tone-danger {
  --tone: #b91c1c;
}

.tone-muted {
  --tone: #66777d;
}

.status-select,
.calendar-cell.booked,
.week-appointment {
  color: var(--tone, var(--brand));
}

.calendar-controls,
.report-controls {
  align-items: end;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f5faf9;
}

.segmented button {
  min-width: 88px;
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 720;
}

.segmented button.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(31, 47, 53, 0.08);
}

.calendar-table {
  display: grid;
  gap: 4px;
  overflow-x: auto;
}

.calendar-head-row,
.calendar-row {
  display: grid;
  grid-template-columns: 76px repeat(var(--doctor-count), minmax(190px, 1fr));
  gap: 4px;
  min-width: calc(76px + var(--doctor-count) * 190px);
}

.calendar-head-row {
  color: var(--muted);
  font-size: 13px;
}

.calendar-head-row > *,
.time-cell,
.calendar-cell {
  min-height: 56px;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.time-cell {
  display: grid;
  place-items: center;
  background: #f5faf9;
  color: var(--muted);
  font-weight: 740;
}

.calendar-cell {
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.calendar-cell.free {
  color: var(--muted);
}

.calendar-cell.free:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.calendar-cell.booked {
  border-color: color-mix(in srgb, var(--tone, var(--brand)) 26%, #ffffff);
  background: color-mix(in srgb, var(--tone, var(--brand)) 9%, #ffffff);
}

.calendar-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.week-day {
  min-height: 240px;
}

.week-day h3 {
  font-size: 16px;
}

.week-appointment {
  display: grid;
  width: 100%;
  gap: 2px;
  margin-bottom: 8px;
  border: 1px solid color-mix(in srgb, var(--tone, var(--brand)) 24%, #ffffff);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: color-mix(in srgb, var(--tone, var(--brand)) 8%, #ffffff);
  text-align: left;
}

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

.patient-card,
.admin-entity-card {
  min-height: 210px;
}

.note {
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #fff8ed;
  color: #8a531f;
  font-size: 13px;
}

.payment-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #fff;
}

.payment-row small {
  display: block;
  color: var(--muted);
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(150px, 2fr) 40px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5efed;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--amber));
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(196, 122, 44, 0.08)),
    var(--bg);
}

.login-panel {
  width: min(440px, 100%);
  padding: 28px;
}

.login-panel .brand {
  margin-bottom: 24px;
}

.login-panel form {
  display: grid;
  gap: 16px;
}

.login-panel h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 620ms ease var(--delay, 0ms), transform 620ms ease var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .site-nav {
    display: none;
  }

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

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

  .booking-services,
  .doctor-choice-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-sidebar {
    position: static;
    height: auto;
  }

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

@media (max-width: 780px) {
  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 30px;
  }

  .site-header {
    inset: 10px 12px auto;
    width: calc(100% - 24px);
    gap: 10px;
  }

  .header-actions .phone-link,
  .header-actions .btn-primary {
    display: none;
  }

  .hero {
    min-height: 84vh;
    background-position: 62% center;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(7, 53, 50, 0.86), rgba(7, 53, 50, 0.52), rgba(7, 53, 50, 0.24));
  }

  .hero-inner,
  .booking-strip,
  .section {
    width: min(100% - 28px, var(--container));
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .booking-strip,
  .contact-panel,
  .admin-topbar,
  .modal-foot,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .service-grid,
  .doctor-grid,
  .legal-grid,
  .process-grid,
  .faq-grid,
  .report-grid,
  .admin-columns,
  .admin-grid,
  .patient-grid,
  .doctor-admin-grid,
  .form-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

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

  .booking-date-controls {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .doctor-photo-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    max-height: calc(100vh - 24px);
  }

  .admin-main {
    padding: 14px;
  }

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

  .mobile-quickbar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 50;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr 0.8fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    align-items: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(15, 118, 110, 0.22);
    backdrop-filter: blur(14px);
  }

  .mobile-quickbar-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--brand-dark);
    font-weight: 780;
  }

  .mobile-quickbar-btn.primary {
    background: var(--brand);
    color: #fff;
  }

  .site-footer {
    padding-bottom: 92px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 42px;
  }

  .brand small {
    display: none;
  }

  .slot-grid,
  .checkbox-grid,
  .admin-nav {
    grid-template-columns: 1fr;
  }

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