:root {
  --bg: #f4f9fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --primary: #1e9d8b;
  --primary-dark: #177f73;
  --primary-soft: #dff7f3;
  --secondary: #2f6bd6;
  --accent: #f4a261;
  --text: #1b2a32;
  --text-soft: #5d7480;
  --border: rgba(19, 48, 68, 0.08);
  --shadow: 0 20px 50px rgba(19, 48, 68, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #f4fbfa 0%, #fbfcfd 40%, #f6f9fb 100%);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
  filter: saturate(1.08) contrast(1.03) brightness(0.98);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.page-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(244, 249, 251, 0.7);
  border-bottom: 1px solid rgba(16, 35, 46, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 24px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 10px 20px rgba(30, 157, 139, 0.28);
}

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

.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s ease;
}

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

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.3rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 15px 30px rgba(31, 110, 185, 0.18);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  border: 1px solid rgba(27, 42, 50, 0.06);
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  touch-action: manipulation;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.2);
}

.whatsapp-btn:hover {
  background: #1fbd5b;
  color: #fff;
}

.whatsapp-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.btn-card {
  width: 100%;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 92px) 0 clamp(42px, 6vw, 72px);
  background:
    radial-gradient(ellipse at 82% 30%, rgba(188, 236, 227, 0.62), transparent 38%),
    linear-gradient(120deg, #f3fbf9 0%, #f6f9fd 58%, #eef7f8 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  align-items: center;
  gap: clamp(36px, 6vw, 78px);
}

.eyebrow {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 680px;
  font-size: clamp(3rem, 5.5vw, 5.25rem);
  line-height: 0.99;
  margin: 24px 0 20px;
  letter-spacing: -0.075em;
}

.hero-copy h1 span {
  display: block;
  color: var(--primary-dark);
}

.hero-copy p {
  margin: 0;
  max-width: 540px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.8;
}

.hero-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #2fa98d;
  box-shadow: 0 0 0 4px rgba(47, 169, 141, 0.12);
  vertical-align: 1px;
}

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

.hero-actions .btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.hero-actions .btn-primary span,
.public-contact .btn span {
  font-size: 1.2em;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.trust-list li::before {
  content: '✓';
  display: inline-block;
  margin-right: 8px;
  color: var(--primary);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  isolation: isolate;
}

.hero-image-backdrop {
  position: absolute;
  z-index: -1;
  width: 86%;
  height: 88%;
  right: 0;
  bottom: 0;
  border-radius: 44% 44% 26px 26px;
  background: linear-gradient(145deg, rgba(30, 157, 139, 0.18), rgba(47, 107, 214, 0.12));
}

.doctor-portrait {
  width: min(88%, 460px);
  height: clamp(390px, 43vw, 520px);
  margin-right: 5%;
  border-radius: 46% 46% 26px 26px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 26px 65px rgba(24, 66, 78, 0.16);
  border: 7px solid rgba(255, 255, 255, 0.88);
}

.doctor-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 38px rgba(19, 48, 68, 0.14);
  border-radius: 16px;
  padding: 0.95rem 1.1rem;
}

.success-card {
  left: -8px;
  top: 48px;
  max-width: 270px;
}

.hero-card-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 1.55rem;
  font-weight: 500;
}

.mini-title {
  display: block;
  font-size: 0.72rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.success-card strong {
  display: block;
  font-size: 1.1rem;
}

.success-card small {
  color: var(--text-soft);
}

.success-card strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.hero-image-caption {
  position: absolute;
  right: 0;
  bottom: 2px;
  display: flex;
  align-items: center;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(19, 48, 68, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(19, 48, 68, 0.07);
}

.specialties,
.about {
  padding: clamp(52px, 7vw, 86px) 0;
}

#especialidades,
#atendimento-online {
  scroll-margin-top: 96px;
}

.section-heading {
  margin-bottom: 32px;
  max-width: 680px;
}

.section-heading h2 {
  margin: 14px 0 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.narrow {
  text-align: center;
}

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

.specialty-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(19, 48, 68, 0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(12, 36, 53, 0.055);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.specialty-card:hover {
  transform: translateY(-5px);
  border-color: rgba(30, 157, 139, 0.28);
  box-shadow: 0 20px 42px rgba(12, 36, 53, 0.11);
}

.card-image {
  height: auto;
  aspect-ratio: 1.72 / 1;
  overflow: hidden;
  background: #e8f3f1;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.specialty-card:hover .card-image img {
  transform: scale(1.035);
}

.card-content {
  min-width: 0;
  flex: 1;
  padding: 1.25rem 1.25rem 1.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  background: #edf9f7;
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.specialty-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.card-content h3 {
  margin: 14px 0 10px;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.28;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.card-content p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.public-contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  margin-top: clamp(28px, 4vw, 46px);
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border: 1px solid rgba(30, 157, 139, 0.13);
  border-radius: 22px;
  background: linear-gradient(115deg, #eaf8f5, #f3f7fd 75%);
}

.public-contact-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 1.8rem;
  font-weight: 500;
}

.public-contact .eyebrow {
  padding: 0;
  background: none;
  font-size: 0.7rem;
}

.public-contact h2 {
  margin: 0.45rem 0 0.25rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.04em;
}

.public-contact p {
  margin: 0;
  max-width: 650px;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.public-contact .btn {
  white-space: nowrap;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 28px;
}

.about-copy h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.06em;
}

.about-copy p {
  color: var(--text-soft);
  line-height: 1.8;
  max-width: 620px;
}

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

.metric {
  background: linear-gradient(180deg, #ffffff 0%, #f3fbfa 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem 1rem;
  text-align: center;
}

.metric strong {
  display: block;
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
  letter-spacing: -0.06em;
}

.metric span {
  color: var(--text-soft);
  font-weight: 600;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 21, 30, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.client-profile-modal {
  z-index: 130;
}

.profile-helper {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.profile-helper span {
  color: var(--text-soft);
  font-weight: 400;
}

.client-profile-card .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(27, 42, 50, 0.08);
}

.client-profile-card .panel-header h3 {
  margin: 0;
}

.client-profile-card .panel-header .profile-helper {
  margin-top: 0.35rem;
}

.client-profile-card #editClientProfileBtn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-color: rgba(27, 42, 50, 0.12);
  background: #fff;
  box-shadow: 0 4px 12px rgba(12, 36, 53, 0.05);
}

.client-profile-card #editClientProfileBtn:hover {
  border-color: rgba(30, 157, 139, 0.3);
  color: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(12, 36, 53, 0.08);
}

.client-profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
}

.client-profile-details div {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(27, 42, 50, 0.06);
  border-radius: 12px;
  background: rgba(248, 250, 251, 0.9);
}

.client-profile-details dt {
  margin-bottom: 0.25rem;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.client-profile-details dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-weight: 700;
}

.profile-inline-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  margin-top: 0.35rem;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.doctor-client-details {
  margin: 0.4rem 0 0.75rem;
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  box-shadow: 0 30px 75px rgba(7, 31, 41, 0.2);
  padding: 1.8rem 1.5rem 1.3rem;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 157, 139, 0.08);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
}

.modal-header {
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  letter-spacing: -0.05em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.booking-modal-intro {
  max-width: 42rem;
  margin: 0.65rem 2rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.booking-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.15rem;
  padding: 0;
  list-style: none;
}

.booking-progress li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: #82919a;
  font-size: 0.78rem;
  font-weight: 700;
}

.booking-progress li > span {
  display: grid;
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 1px solid rgba(27, 42, 50, 0.14);
  border-radius: 50%;
  background: #fff;
  color: inherit;
}

.booking-progress li.is-current,
.booking-progress li.is-complete {
  color: var(--primary-dark);
}

.booking-progress li.is-current > span,
.booking-progress li.is-complete > span {
  border-color: transparent;
  background: var(--primary-soft);
}

.selection-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f0fbf8;
  color: var(--primary-dark);
  font-size: 0.96rem;
}

.summary-label {
  color: var(--text-soft);
}

.specialty-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.specialty-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgba(27, 42, 50, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 250, 0.9));
  color: var(--text);
  border-radius: 14px;
  padding: 0.8rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.specialty-option svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.specialty-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.specialty-option:hover,
.specialty-option.active {
  border-color: rgba(30, 157, 139, 0.28);
  background: linear-gradient(135deg, rgba(30, 157, 139, 0.12), rgba(67, 126, 220, 0.08));
  color: var(--primary-dark);
  box-shadow: 0 10px 18px rgba(20, 76, 95, 0.08);
}

.combined-availability-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.availability-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0 0.1rem 0.15rem;
}

.availability-heading > span {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.availability-loading {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 100px;
  color: var(--text-soft);
  font-weight: 600;
}

.loading-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(30, 157, 139, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: availability-spin 0.8s linear infinite;
}

@keyframes availability-spin {
  to { transform: rotate(360deg); }
}

.availability-error {
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  gap: 0.5rem;
}

.availability-error span {
  line-height: 1.5;
}

.availability-error .btn {
  margin-top: 0.2rem;
  min-height: 44px;
}

.availability-slot-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(27, 42, 50, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 251, 249, 0.9));
  color: var(--text);
  border-radius: 16px;
  padding: 0.9rem 0.85rem;
  min-width: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.availability-slot-option:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 157, 139, 0.2);
  box-shadow: 0 12px 26px rgba(16, 53, 68, 0.08);
}

.slot-date {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 700;
  line-height: 1.4;
  text-transform: capitalize;
}

.slot-date svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.availability-slot-option strong {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.availability-slot-option strong svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: var(--primary-dark);
}

.slot-doctor {
  max-width: 100%;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.slot-select-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.2rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(27, 42, 50, 0.07);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.availability-slot-option:focus-visible,
.specialty-option:focus-visible {
  outline: 3px solid rgba(47, 107, 214, 0.45);
  outline-offset: 2px;
}

.empty-state {
  padding: 1rem;
  background: rgba(244, 247, 249, 0.9);
  border: 1px dashed rgba(27, 42, 50, 0.12);
  border-radius: 14px;
  color: var(--text-soft);
  text-align: center;
}

.booking-confirmation {
  margin-top: 1rem;
}

.confirmation-card {
  background: linear-gradient(180deg, rgba(240, 251, 248, 0.96), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(30, 157, 139, 0.18);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(16, 53, 68, 0.07);
}

.confirmation-eyebrow {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  font-weight: 800;
}

.confirmation-card h3 {
  margin: 0 0 0.9rem;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.confirmation-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.confirmation-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(27, 42, 50, 0.06);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.confirmation-meta span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.confirmation-meta strong {
  line-height: 1.5;
}

.confirmation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-secondary {
  background: rgba(244, 247, 249, 0.9);
  border: 1px solid rgba(27, 42, 50, 0.08);
  color: var(--text);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form.hidden,
.auth-switcher.hidden {
  display: none;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-group label {
  font-weight: 600;
  color: var(--text);
}

.field-group input {
  width: 100%;
  border: 1px solid rgba(27, 42, 50, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 251, 0.9);
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input:focus {
  border-color: rgba(30, 157, 139, 0.5);
  box-shadow: 0 0 0 4px rgba(30, 157, 139, 0.08);
}

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

.submit-btn {
  margin-top: 0.5rem;
}

.auth-switcher {
  margin-top: 1.5rem;
}

.auth-hint {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-actions {
  margin-bottom: 1rem;
}

.btn-google {
  width: 100%;
  background: white;
  border: 1px solid rgba(27, 42, 50, 0.1);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.google-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  font-weight: 800;
  font-size: 0.7rem;
}

.message-box {
  min-height: 24px;
  margin-top: 14px;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.message-box.success {
  color: var(--primary-dark);
}

.message-box.error {
  color: #cf3d50;
}

.dashboard-section {
  padding: 42px 0 12px;
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dashboard-shell,
.admin-shell,
.doctor-shell {
  width: calc(100% - 40px);
  max-width: none;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.client-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.client-tab {
  border: 1px solid rgba(27, 42, 50, 0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 12px 20px rgba(31, 110, 185, 0.18);
}

.client-tab-panel {
  display: none;
}

.client-tab-panel.is-active {
  display: block;
}

.client-tab-panel[hidden] {
  display: none;
}

.dashboard-header h2 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.06em;
}

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

.admin-shell,
.doctor-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.doctor-nav-wrap {
  display: flex;
  justify-content: flex-start;
}

.doctor-tab-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(248, 250, 251, 0.96);
  border: 1px solid rgba(27, 42, 50, 0.08);
  box-shadow: 0 10px 24px rgba(12, 36, 53, 0.04);
}

.doctor-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  padding: 0.82rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.doctor-tab.is-active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 12px 20px rgba(31, 110, 185, 0.18);
}

.doctor-tab-panel {
  display: none;
}

.doctor-tab-panel.is-active {
  display: block;
}

.doctor-profile-panel {
  max-width: 760px;
  background: linear-gradient(180deg, rgba(246, 251, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.doctor-profile-form {
  max-width: 600px;
}

.doctor-phone-input {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(0, 1.15fr);
  gap: 0.55rem;
}

.doctor-phone-input select,
.doctor-phone-input input {
  min-width: 0;
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(27, 42, 50, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 251, 0.9);
  padding: 0.85rem 0.9rem;
  color: var(--text);
  font: inherit;
}

.doctor-phone-input select:focus,
.doctor-phone-input input:focus {
  border-color: rgba(30, 157, 139, 0.5);
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 157, 139, 0.08);
}

.doctor-phone-input .doctor-phone-custom-code {
  grid-column: 1;
}

.doctor-phone-input .doctor-phone-custom-code:not(.hidden) + input {
  grid-column: 2;
}

.doctor-profile-message {
  min-height: 1.25rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.doctor-profile-message.is-error {
  color: #be3f59;
}

.doctor-profile-message.is-success {
  color: var(--primary-dark);
}

.doctor-profile-form .submit-btn {
  align-self: flex-start;
  min-width: 180px;
}

.doctor-history-panel,
.doctor-history-list,
.doctor-history-client,
.doctor-history-appointments,
.doctor-history-appointment {
  min-width: 0;
}

.doctor-history-list,
.doctor-history-appointments {
  display: grid;
  gap: 1rem;
}

.doctor-history-client,
.doctor-history-appointment {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.doctor-history-client-header h4,
.doctor-history-appointment h5,
.doctor-history-notes h5 {
  margin: 0.25rem 0 0.5rem;
}

.doctor-history-client-header p,
.doctor-history-appointment p,
.doctor-history-notes > p {
  overflow-wrap: anywhere;
}

.doctor-history-notes {
  margin: 1rem 0;
  padding: 0.9rem;
  border-radius: 12px;
  background: #f5f9fb;
}

.doctor-history-note small,
.doctor-history-notes > p small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-soft);
}

.doctor-history-comment-form,
.doctor-history-appointment-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.doctor-history-comment-form textarea,
.doctor-history-appointment-form textarea,
.booking-notes-field textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.doctor-history-comment-form .btn,
.doctor-history-appointment-form .btn {
  justify-self: start;
}

.appointment-notes,
.appointment-cancellation-reason {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.appointment-cancellation-reason {
  color: #9a3945;
}

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

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

.summary-card {
  min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 250, 252, 0.92));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem 1.1rem;
  box-shadow: 0 10px 24px rgba(12, 36, 53, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card-icon {
  display: block;
  width: 26px;
  height: 26px;
  margin-bottom: 0.7rem;
  fill: none;
  stroke: var(--primary-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(12, 36, 53, 0.07);
}

.summary-card span {
  display: block;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: 8px;
}

.summary-card strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  letter-spacing: -0.04em;
}

.doctor-summary .summary-card strong {
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
  line-height: 1.2;
}

.doctor-specialty-summary-card > span {
  margin-bottom: 0.65rem;
}

.doctor-specialty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.doctor-specialty-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(30, 157, 139, 0.16);
  border-radius: 999px;
  background: rgba(30, 157, 139, 0.08);
  color: var(--primary-dark);
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.doctor-specialty-empty {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-booking-modal {
  z-index: 140;
}

.admin-booking-modal .modal-panel {
  width: min(560px, 100%);
  max-height: min(90vh, 820px);
  overflow-y: auto;
}

.admin-booking-form {
  display: grid;
  gap: 1rem;
}

.admin-booking-form select,
.admin-booking-form textarea {
  width: 100%;
  min-height: 48px;
  min-width: 0;
  border: 1px solid rgba(27, 42, 50, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 251, 0.9);
  padding: 0.85rem 0.95rem;
  color: var(--text);
  font: inherit;
}

.admin-booking-form textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-booking-form select:focus,
.admin-booking-form textarea:focus {
  border-color: rgba(30, 157, 139, 0.5);
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 157, 139, 0.08);
}

.admin-booking-form select:disabled {
  color: var(--text-soft);
  cursor: not-allowed;
}

.admin-booking-form .submit-btn {
  width: 100%;
  min-height: 50px;
}

.appointments-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(12, 36, 53, 0.05);
  padding: 1.2rem;
}

.doctor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 22px;
}

.client-tab-panel,
.admin-tab-panel,
.doctor-tab-panel {
  width: 100%;
  min-width: 0;
}

.doctor-tab-panel[data-doctor-panel="payments"] {
  grid-column: 1 / -1;
}

.doctor-bookings-panel {
  background: linear-gradient(180deg, rgba(246, 251, 255, 0.98), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(30, 157, 139, 0.12);
  box-shadow: 0 18px 42px rgba(15, 57, 71, 0.06);
}

.doctor-bookings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.doctor-bookings-header h3 {
  margin: 0.3rem 0 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.doctor-bookings-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(31, 110, 185, 0.18);
}

.doctor-bookings-panel .appointments-list {
  gap: 18px;
}

.doctor-appointments-load-sentinel {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.85rem;
  text-align: center;
}

.doctor-appointments-load-more {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(30, 157, 139, 0.18);
  border-radius: 14px;
  background: rgba(30, 157, 139, 0.07);
  color: var(--primary-dark);
  font: inherit;
  font-weight: 700;
}

.doctor-bookings-panel .appointment-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 252, 0.94));
  border: 1px solid rgba(30, 157, 139, 0.12);
  border-left: 4px solid var(--primary);
  box-shadow: 0 12px 22px rgba(12, 36, 53, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doctor-bookings-panel .appointment-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(12, 36, 53, 0.08);
}

.doctor-bookings-panel .appointment-item-soon {
  border-color: rgba(31, 110, 185, 0.3);
  border-left-color: #2878c7;
  box-shadow: 0 12px 26px rgba(31, 110, 185, 0.11);
}

.doctor-bookings-panel .appointment-item-started {
  border-color: rgba(211, 126, 40, 0.34);
  border-left-color: #d27a24;
  box-shadow: 0 12px 26px rgba(211, 126, 40, 0.12);
}

.appointment-start-alert {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.85rem 0;
  padding: 0.8rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.appointment-start-alert > span {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  font-weight: 800;
}

.appointment-start-alert strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.appointment-start-alert-soon {
  border-color: rgba(31, 110, 185, 0.18);
  background: rgba(232, 244, 255, 0.9);
  color: #205e9a;
}

.appointment-start-alert-soon > span {
  background: rgba(40, 120, 199, 0.13);
}

.appointment-start-alert-started {
  border-color: rgba(211, 126, 40, 0.2);
  background: rgba(255, 245, 231, 0.94);
  color: #96520d;
}

.appointment-start-alert-started > span {
  background: rgba(211, 126, 40, 0.15);
}

.doctor-schedule-card {
  background: linear-gradient(180deg, rgba(244, 252, 250, 0.96), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(30, 157, 139, 0.12);
  box-shadow: 0 18px 42px rgba(15, 57, 71, 0.06);
}

.doctor-availability-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(27, 42, 50, 0.08);
}

.compact-panel-header {
  margin-bottom: 0.8rem;
}

.compact-panel-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

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

.schedule-header h3 {
  margin: 0.3rem 0 0;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.schedule-eyebrow {
  display: inline-block;
  margin-bottom: 0.2rem;
}

.schedule-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(30, 157, 139, 0.1);
  color: var(--primary-dark);
  border: 1px solid rgba(30, 157, 139, 0.14);
  padding: 0.5rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.schedule-helper {
  margin: 0 0 1rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.doctor-schedule-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.schedule-input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.doctor-schedule-form .field-group {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(27, 42, 50, 0.06);
  border-radius: 16px;
  padding: 0.9rem 0.9rem 0.8rem;
}

.day-toggle-group {
  width: 100%;
  min-width: 0;
}

.day-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.day-toggle {
  border: 1px solid rgba(27, 42, 50, 0.08);
  background: rgba(244, 248, 250, 0.9);
  color: var(--text-soft);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  min-width: 48px;
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.day-toggle:hover {
  border-color: rgba(30, 157, 139, 0.3);
  color: var(--text);
}

.day-toggle.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 18px rgba(31, 110, 185, 0.16);
}

.selected-days-summary {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 30px;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.selected-days-summary .summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 157, 139, 0.1);
  border: 1px solid rgba(30, 157, 139, 0.14);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
}

.day-range-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.day-range-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: rgba(245, 250, 249, 0.9);
  border: 1px solid rgba(30, 157, 139, 0.1);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.day-range-label {
  min-width: 42px;
  font-weight: 800;
  color: var(--primary-dark);
}

.day-range-times {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.day-range-times input {
  width: 100%;
  min-width: 0;
}

.day-range-times span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  justify-self: center;
}

.doctor-specialty-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(245, 249, 250, 0.92);
  border: 1px solid rgba(27, 42, 50, 0.08);
}

.doctor-specialty-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.doctor-specialty-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(27, 42, 50, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-weight: 600;
}

.doctor-specialty-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.calendar-availability-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(250, 252, 253, 0.88);
  border: 1px solid rgba(27, 42, 50, 0.08);
}

.calendar-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calendar-settings-header h4 {
  margin: 0.3rem 0 0;
  font-size: 1.2rem;
}

.availability-toggle {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 30px;
  cursor: pointer;
}

.availability-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(27, 42, 50, 0.15);
  transition: 0.2s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 12px rgba(27, 42, 50, 0.12);
  transition: 0.2s ease;
}

.availability-toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.availability-toggle input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.calendar-exceptions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 1rem 0 0.7rem;
}

.calendar-exceptions-header h5 {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
}

.date-block-list {
  display: grid;
  gap: 0.75rem;
}

.date-block-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(27, 42, 50, 0.08);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
}

.date-block-row input {
  width: 100%;
}

.date-block-row span {
  color: var(--text-soft);
  font-weight: 700;
}

.remove-date-block {
  border: none;
  background: rgba(206, 84, 98, 0.08);
  color: #b93f58;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

.doctor-schedule-form label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.doctor-schedule-form select,
.doctor-schedule-form input,
.status-select {
  width: 100%;
  border: 1px solid rgba(27, 42, 50, 0.1);
  border-radius: 12px;
  background: rgba(248, 250, 251, 0.9);
  padding: 0.8rem 0.9rem;
  font-size: 0.96rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.doctor-schedule-form select:focus,
.doctor-schedule-form input:focus,
.status-select:focus {
  border-color: rgba(30, 157, 139, 0.5);
  box-shadow: 0 0 0 4px rgba(30, 157, 139, 0.08);
}

.doctor-schedule-form .submit-btn {
  align-self: flex-start;
  min-width: 180px;
  padding-inline: 1.2rem;
}

.doctor-schedule-form .submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

.doctor-status-update-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1rem;
}

.doctor-status-update-row .status-select {
  max-width: 220px;
  flex: 1;
}

.doctor-save-status {
  min-height: 24px;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.doctor-save-status.success {
  color: var(--primary-dark);
}

.doctor-save-status.error {
  color: #be3f59;
}

.admin-tools-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 10px 24px rgba(12, 36, 53, 0.05);
}

.admin-tools-bar h3 {
  margin: 10px 0 0;
  font-size: 1.3rem;
}

.admin-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 16px;
}

.admin-tab {
  border: 1px solid rgba(27, 42, 50, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-soft);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-weight: 700;
}

.admin-tab.is-active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
  box-shadow: 0 12px 20px rgba(31, 110, 185, 0.18);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
}

.payment-report-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.payment-report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.payment-report-header h3 {
  margin: 0.5rem 0 0;
  font-size: 1.5rem;
}

.payment-report-header .profile-helper {
  margin-top: 0.35rem;
}

.payment-report-filter {
  display: grid;
  gap: 0.4rem;
  min-width: 170px;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.payment-report-filter select {
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(27, 42, 50, 0.12);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.payment-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.doctor-earnings-panel {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.doctor-earnings-summary {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
}

.doctor-earnings-summary .summary-card strong {
  font-size: clamp(1.1rem, 2vw, 1.7rem);
}

.doctor-earnings-highlight {
  border-color: rgba(30, 157, 139, 0.2);
  background: linear-gradient(145deg, #eafaf5, #f5fbff);
}

.doctor-earnings-highlight strong {
  color: var(--primary-dark);
}

.doctor-earnings-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.doctor-earnings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.doctor-earnings-table th,
.doctor-earnings-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.doctor-earnings-table th {
  color: var(--text-soft);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doctor-earnings-table tbody tr:last-child td {
  border-bottom: 0;
}

.payment-report-summary .summary-card strong {
  font-size: clamp(1.05rem, 2vw, 1.6rem);
}

.payment-report-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  min-height: 265px;
  overflow-x: auto;
  padding: 1rem 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.payment-chart-day {
  display: flex;
  flex: 1 0 62px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 235px;
  color: var(--text-soft);
  text-align: center;
}

.payment-chart-day > strong {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.payment-chart-bar-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 180px;
}

.payment-chart-bar {
  display: block;
  width: min(34px, 70%);
  min-height: 2px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  transition: height 0.25s ease;
}

.payment-chart-day small {
  font-size: 0.72rem;
  white-space: nowrap;
}

.payment-report-message {
  min-height: 1.25rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.doctor-payout-panel {
  padding: 1.25rem;
  border: 1px solid rgba(30, 157, 139, 0.16);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(239, 251, 248, 0.95), rgba(247, 250, 255, 0.98));
}

.doctor-payout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.doctor-payout-header h3 {
  margin: 0.35rem 0;
  font-size: 1.3rem;
}

.doctor-payout-header .profile-helper {
  max-width: 650px;
  margin: 0;
}

.doctor-share-badge {
  flex: 0 0 auto;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(30, 157, 139, 0.2);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.doctor-payout-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.doctor-payout-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.doctor-payout-table th,
.doctor-payout-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.doctor-payout-table th {
  color: var(--text-soft);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doctor-payout-table tbody tr:last-child td {
  border-bottom: 0;
}

.doctor-payout-amount {
  color: var(--primary-dark);
  font-size: 1.05rem;
}

.doctor-payout-panel > .empty-state:not(.hidden) {
  margin-top: 0.75rem;
}

.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #eefbf9 0%, #f2f9ff 100%);
  border: 1px solid rgba(30, 157, 139, 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(19, 48, 68, 0.05);
}

.invite-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.invite-copy-wrap input {
  width: 100%;
  border: 1px solid rgba(27, 42, 50, 0.08);
  border-radius: 12px;
  background: white;
  color: var(--text);
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
}

.usage-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(12, 36, 53, 0.05);
  padding: 1.2rem;
}

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

.usage-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #f9fdfd 0%, #f3f9fb 100%);
  border: 1px solid rgba(27, 42, 50, 0.06);
}

.usage-item strong {
  display: block;
  margin-bottom: 4px;
}

.usage-item small {
  color: var(--text-soft);
}

.usage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.panel-header h3 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

.admin-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(27, 42, 50, 0.08);
}

.admin-users-header h3 {
  min-width: 0;
  margin: 0;
}

.admin-users-header #openAdminBookingBtn {
  flex: 0 0 auto;
}

.whatsapp-contact-link {
  text-decoration: none;
  white-space: nowrap;
}

.appointment-origin-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(30, 157, 139, 0.2);
  border-radius: 999px;
  background: rgba(30, 157, 139, 0.08);
  color: #167d70;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(27, 42, 50, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

.appointments-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.appointments-table thead th {
  background: rgba(242, 248, 250, 0.96);
  color: var(--text-soft);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(27, 42, 50, 0.08);
}

.appointments-table tbody td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(27, 42, 50, 0.06);
  vertical-align: top;
  color: var(--text);
  font-size: 0.95rem;
}

.appointments-table tbody tr:last-child td {
  border-bottom: none;
}

.appointments-table tbody tr:hover {
  background: rgba(240, 251, 248, 0.7);
}

.doctor-availability-cell {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 220px;
}

.doctor-availability-preview {
  display: block;
  color: var(--text);
  line-height: 1.6;
  font-size: 0.9rem;
  word-break: break-word;
}

.doctor-availability-trigger {
  align-self: flex-start;
  border: 1px solid rgba(30, 157, 139, 0.16);
  background: linear-gradient(135deg, rgba(30, 157, 139, 0.08), rgba(67, 126, 220, 0.06));
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doctor-availability-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(29, 124, 146, 0.12);
}

.doctor-detail-panel {
  width: min(860px, 100%);
}

.doctor-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.doctor-detail-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(240, 251, 248, 0.9);
  border: 1px solid rgba(30, 157, 139, 0.12);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
}

.doctor-detail-pill.is-off {
  background: rgba(255, 244, 245, 0.9);
  border-color: rgba(194, 73, 92, 0.16);
  color: #b4344e;
}

.doctor-detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 1rem;
}

.doctor-modal-section {
  background: linear-gradient(180deg, rgba(247, 251, 253, 0.96), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(27, 42, 50, 0.08);
  border-radius: 20px;
  padding: 1rem;
}

.doctor-section-header {
  margin-bottom: 0.9rem;
}

.doctor-section-header h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.doctor-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.doctor-day-card {
  border: 1px solid rgba(27, 42, 50, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem;
}

.doctor-day-card.is-active {
  background: linear-gradient(180deg, rgba(233, 248, 245, 0.85), rgba(255, 255, 255, 0.96));
  border-color: rgba(30, 157, 139, 0.16);
}

.doctor-day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.doctor-day-card-header small {
  color: var(--text-soft);
  font-weight: 700;
}

.doctor-range-list,
.doctor-date-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.doctor-range-list li,
.doctor-date-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: rgba(240, 246, 248, 0.9);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.doctor-date-list li {
  justify-content: space-between;
}

.range-empty {
  justify-content: center !important;
  color: var(--text-soft) !important;
  background: rgba(244, 247, 248, 0.9) !important;
}

.appointments-table code {
  display: inline-block;
  max-width: 340px;
  white-space: normal;
  word-break: break-all;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(15, 57, 71, 0.04);
  color: var(--text);
}

.appointment-item {
  border: 1px solid rgba(27, 42, 50, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbfb 100%);
  padding: 1rem 1rem 0.9rem;
}

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

.appointment-tag {
  display: inline-flex;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.65rem;
}

.appointment-header h4 {
  margin: 10px 0 0;
  font-size: 1.2rem;
}

.status-pill {
  display: inline-flex;
  background: rgba(30, 157, 139, 0.08);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 800;
}

.appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-soft);
  font-weight: 600;
  margin: 12px 0;
}

.appointment-payment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0.75rem 0;
  padding: 0.8rem;
  border-radius: 12px;
  background: rgba(244, 248, 250, 0.9);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.appointment-payment strong {
  color: var(--text);
}

.appointment-payment.is-paid strong {
  color: var(--primary-dark);
}

.payment-action {
  padding: 0.6rem 0.85rem;
  font-size: 0.84rem;
}

.payment-feedback {
  flex-basis: 100%;
  color: var(--text-soft);
  line-height: 1.45;
}

.payment-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: rgba(190, 75, 60, 0.09);
  color: #a53a2d;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.payment-status-pill.is-paid {
  background: rgba(30, 157, 139, 0.1);
  color: var(--primary-dark);
}

.manual-payment-indicator {
  display: block;
  color: #6b4e16;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.admin-payment-amount,
.admin-payment-feedback {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-soft);
  line-height: 1.4;
}

.doctor-payment-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.2rem 0 0.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(190, 75, 60, 0.09);
  color: #a53a2d;
  font-size: 0.82rem;
}

.doctor-payment-status.is-paid {
  background: rgba(30, 157, 139, 0.1);
  color: var(--primary-dark);
}

.booking-payment-field {
  margin: 1rem 0;
}

.booking-payment-field small {
  display: block;
  margin-top: 0.45rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.appointment-item p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.empty-state {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(240, 251, 248, 0.8);
  color: var(--text-soft);
  font-weight: 600;
}

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

  .hero-grid {
    gap: 28px;
  }

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

  .hero-visual {
    min-height: 440px;
  }

  .doctor-portrait {
    width: min(76%, 440px);
    height: 440px;
    margin-right: 0;
  }

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

  .specialty-card:last-child {
    grid-column: 1 / -1;
    width: min(100%, calc((100% - 22px) / 2));
    justify-self: center;
  }

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

  .admin-tools-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .nav-links {
    display: none;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 38px 0 30px;
  }

  .hero-grid {
    gap: 18px;
  }

  .hero-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.55rem, 12vw, 3.55rem);
    line-height: 1;
  }

  .hero-copy p {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .hero-actions {
    margin-top: 22px;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 50px;
  }

  .trust-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
    margin-top: 18px;
    font-size: 0.76rem;
  }

  .trust-list li:last-child {
    grid-column: 1 / -1;
  }

  .hero-visual {
    min-height: 340px;
    margin: 0 -4px;
  }

  .hero-image-backdrop {
    width: 78%;
    height: 84%;
    right: 5%;
  }

  .doctor-portrait {
    width: min(76%, 330px);
    height: 340px;
    border-width: 5px;
  }

  .success-card {
    top: 24px;
    left: 0;
    max-width: 220px;
    padding: 0.7rem 0.75rem;
  }

  .hero-card-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .success-card strong {
    font-size: 0.78rem;
  }

  .hero-image-caption {
    right: 0;
    bottom: -2px;
    max-width: 78%;
    padding: 0.6rem 0.65rem;
    font-size: 0.66rem;
  }

  .specialties,
  .about {
    padding: 44px 0;
  }

  .section-heading {
    margin-bottom: 22px;
  }

  .section-heading h2 {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  .cards-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .specialty-card:last-child {
    grid-column: auto;
    width: 100%;
  }

  .card-image {
    aspect-ratio: 1.85 / 1;
  }

  .card-content {
    padding: 1rem 1.05rem 1.15rem;
  }

  .card-content h3 {
    margin: 11px 0 8px;
    font-size: 1.28rem;
    line-height: 1.25;
  }

  .card-content p {
    font-size: 0.9rem;
  }

  .public-contact {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    margin-top: 22px;
    padding: 1rem;
    border-radius: 18px;
  }

  .public-contact-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .public-contact h2 {
    font-size: 1.15rem;
  }

  .public-contact p {
    font-size: 0.82rem;
  }

  .public-contact .btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
  }

  .dashboard-section,
  .admin-panel,
  .doctor-panel {
    padding-top: 24px;
  }

  .dashboard-shell,
  .admin-shell,
  .doctor-shell {
    width: calc(100% - 24px);
    gap: 16px;
  }

  .client-tab-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .client-tab {
    min-width: 0;
    padding: 0.7rem 0.55rem;
    overflow-wrap: anywhere;
  }

  .admin-meta,
  .payment-report-summary,
  .doctor-summary,
  .doctor-earnings-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .doctor-summary .doctor-specialty-summary-card {
    grid-column: 1 / -1;
  }

  .admin-meta .summary-card,
  .payment-report-summary .summary-card,
  .doctor-summary .summary-card,
  .doctor-earnings-summary .summary-card {
    padding: 0.85rem;
    border-radius: 15px;
  }

  .admin-meta .summary-card-icon,
  .payment-report-summary .summary-card-icon {
    width: 23px;
    height: 23px;
    margin-bottom: 0.45rem;
  }

  .admin-meta .summary-label,
  .payment-report-summary .summary-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .admin-meta .summary-card strong,
  .payment-report-summary .summary-card strong,
  .doctor-summary .summary-card strong {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    line-height: 1.15;
  }

  .doctor-specialty-summary-card {
    padding: 0.95rem 1rem !important;
  }

  .doctor-specialty-chip {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

  .admin-tab-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 4px 0 0;
    padding: 0 0 8px;
    gap: 8px;
  }

  .admin-tab {
    min-width: 0;
    min-height: 44px;
    padding: 0.6rem 0.55rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }

  .appointments-panel,
  .usage-panel {
    padding: 0.9rem;
    border-radius: 18px;
  }

  .panel-header h3 {
    font-size: 1.15rem;
    line-height: 1.3;
  }

  .admin-users-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .admin-users-header #openAdminBookingBtn {
    width: 100%;
    min-height: 44px;
    white-space: normal;
  }

  #adminArea .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #adminArea .appointments-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #adminArea .appointments-table thead {
    display: none;
  }

  #adminArea .appointments-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #adminArea .appointments-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
    margin-bottom: 12px;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(12, 36, 53, 0.05);
  }

  #adminArea .appointments-table td {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.65rem 0.2rem;
    border-bottom: 1px solid rgba(27, 42, 50, 0.07);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
  }

  #adminArea .doctor-availability-cell {
    min-width: 0;
    max-width: 100%;
  }

  #adminArea .doctor-availability-preview {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #adminArea .appointments-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  #adminArea .appointments-table td:first-child,
  #adminArea .appointments-table td:last-child {
    grid-column: 1 / -1;
  }

  #adminArea .appointments-table td:first-child strong {
    font-size: 0.95rem;
  }

  #adminArea #adminAppointmentsTable td:first-child .profile-inline-details {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
  }

  #adminArea .appointments-table td:nth-last-child(2) {
    border-bottom: 0;
  }

  #adminArea .appointments-table td:last-child {
    padding-bottom: 0.75rem;
    border-bottom: 0;
  }

  #adminArea .appointments-table .status-select {
    width: 100%;
    min-width: 0;
  }

  #adminArea .appointments-table .action-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  #adminArea .appointments-table .action-stack .btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0.55rem;
    white-space: normal;
    line-height: 1.2;
  }

  .payment-report-header,
  .doctor-payout-header {
    gap: 0.8rem;
  }

  .payment-report-header h3,
  .doctor-payout-header h3 {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  .payment-report-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    align-items: end;
    gap: 0.5rem;
    min-height: 220px;
    overflow: visible;
    padding-inline: 0;
  }

  .payment-chart-day {
    min-width: 0;
    min-height: 175px;
    flex: initial;
    gap: 0.3rem;
    overflow-wrap: anywhere;
  }

  .payment-chart-day > strong,
  .payment-chart-day small {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .payment-chart-bar-wrap {
    height: 120px;
  }

  .doctor-payout-panel {
    padding: 0.9rem;
  }

  .admin-tools-bar .btn {
    width: 100%;
  }

  .schedule-header,
  .doctor-bookings-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-input-grid {
    grid-template-columns: 1fr;
  }

  .doctor-nav-wrap {
    width: 100%;
  }

  .doctor-workspace,
  .admin-tab-panel,
  .doctor-tab-panel,
  .appointments-panel {
    min-width: 0;
    max-width: 100%;
  }

  .doctor-tab-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    padding: 6px;
  }

  .doctor-tab {
    min-width: 0;
    min-height: 46px;
    padding: 0.65rem 0.5rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }

  .doctor-schedule-card {
    padding: 0.85rem;
  }

  .doctor-profile-panel {
    padding: 1rem;
  }

  .doctor-profile-form .submit-btn {
    align-self: stretch;
    min-height: 50px;
  }

  .schedule-header {
    gap: 0.65rem;
  }

  .schedule-header h3 {
    font-size: 1.3rem;
    line-height: 1.25;
  }

  .schedule-badge {
    align-self: flex-start;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    font-size: 0.7rem;
  }

  .schedule-badge.is-paused {
    border-color: rgba(206, 84, 98, 0.18);
    background: rgba(206, 84, 98, 0.09);
    color: #a63d50;
  }

  .schedule-badge.is-empty {
    border-color: rgba(231, 153, 51, 0.2);
    background: rgba(231, 153, 51, 0.1);
    color: #86550c;
  }

  .doctor-schedule-form {
    gap: 0.8rem;
  }

  .doctor-schedule-form .field-group,
  .doctor-specialty-panel,
  .calendar-availability-panel {
    padding: 0.8rem;
    border-radius: 15px;
  }

  .doctor-schedule-form .field-label {
    display: block;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .schedule-field-hint {
    margin: 0.35rem 0 0.7rem;
    color: var(--text-soft);
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .doctor-specialty-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    margin-top: 0.65rem;
  }

  .doctor-specialty-option {
    min-height: 48px;
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
  }

  .doctor-specialty-option input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }

  .day-toggle-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.65rem;
  }

  .day-toggle {
    min-width: 0;
    min-height: 46px;
    padding: 0.55rem 0.35rem;
    border-radius: 12px;
  }

  .day-range-list {
    gap: 0.55rem;
    margin-top: 0.7rem;
  }

  .day-range-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.7rem;
  }

  .day-range-label {
    min-width: 0;
  }

  .day-range-times {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.35rem;
  }

  .day-range-times input {
    min-height: 48px;
    padding: 0.65rem 0.45rem;
    font-size: 0.9rem;
  }

  .day-range-times span {
    font-size: 0.74rem;
  }

  .calendar-settings-header {
    gap: 0.6rem;
  }

  .calendar-settings-header h4 {
    font-size: 1.05rem;
  }

  .availability-toggle {
    flex: 0 0 54px;
    min-height: 34px;
  }

  .availability-toggle input:focus-visible + .toggle-slider {
    outline: 3px solid rgba(47, 107, 214, 0.45);
    outline-offset: 3px;
  }

  .calendar-exceptions-header {
    align-items: flex-start;
  }

  .calendar-exceptions-header h5 {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .calendar-exceptions-header .btn {
    min-height: 44px;
    white-space: nowrap;
  }

  .date-block-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem 0.6rem;
    padding: 0.65rem;
  }

  .date-block-row input:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .date-block-row span {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 0.78rem;
  }

  .date-block-row input:nth-of-type(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .date-block-row .remove-date-block {
    grid-column: 2;
    grid-row: 2;
    width: 44px;
    height: 44px;
  }

  .doctor-schedule-form .submit-btn {
    position: sticky;
    z-index: 5;
    bottom: 8px;
    align-self: stretch;
    min-height: 52px;
    box-shadow: 0 10px 24px rgba(16, 53, 68, 0.2);
  }

  .doctor-save-status {
    line-height: 1.5;
  }

  .doctor-availability-box {
    padding: 0.8rem;
  }

  .doctor-availability-box .usage-item {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .doctor-tab:focus-visible,
  .day-toggle:focus-visible,
  .doctor-specialty-option:focus-within,
  .remove-date-block:focus-visible {
    outline: 3px solid rgba(47, 107, 214, 0.42);
    outline-offset: 2px;
  }

  .day-toggle-list {
    justify-content: space-between;
  }

  .day-toggle {
    flex: 1 1 27%;
  }

  .doctor-schedule-form .submit-btn {
    width: 100%;
  }

  .topbar {
    background: rgba(244, 249, 251, 0.9);
  }

  .nav {
    min-height: 72px;
    justify-content: space-between;
    gap: 8px;
  }

  .header-actions {
    min-width: 0;
    gap: 6px;
  }

  .header-actions .btn {
    min-width: 0;
    padding: 0.65rem 0.7rem;
    white-space: normal;
    line-height: 1.15;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .hero {
    padding-top: 38px;
  }

  .hero-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.55rem, 12vw, 3.55rem);
    line-height: 1;
  }

  .hero-copy p {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    margin-top: 22px;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 50px;
  }

  .dashboard-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-header-actions {
    width: 100%;
    flex-direction: column;
  }

  .dashboard-header-actions .btn {
    width: 100%;
  }

  .payment-report-header {
    flex-direction: column;
  }

  .payment-report-filter {
    width: 100%;
  }

  .doctor-payout-header {
    flex-direction: column;
  }

  .doctor-earnings-table-wrap,
  .doctor-payout-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .doctor-earnings-table,
  .doctor-payout-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .doctor-earnings-table thead,
  .doctor-payout-table thead {
    display: none;
  }

  .doctor-earnings-table tbody,
  .doctor-payout-table tbody {
    display: grid;
    gap: 0.7rem;
  }

  .doctor-earnings-table tr,
  .doctor-payout-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
  }

  .doctor-earnings-table td,
  .doctor-payout-table td {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.65rem 0.25rem;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.84rem;
  }

  .doctor-earnings-table td::before,
  .doctor-payout-table td::before {
    content: attr(data-label);
    margin-bottom: 0.25rem;
    color: var(--text-soft);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .doctor-earnings-table td:last-child,
  .doctor-payout-table td:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .doctor-earnings-table td strong,
  .doctor-payout-table td strong {
    overflow-wrap: anywhere;
  }

  .client-profile-card .panel-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.85rem;
  }

  .client-profile-card #editClientProfileBtn {
    align-self: flex-start;
  }

  .trust-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
    margin-top: 18px;
    font-size: 0.76rem;
  }

  .trust-list li:last-child {
    grid-column: 1 / -1;
  }

  .hero-visual {
    min-height: 340px;
    margin: 0 -4px;
  }

  .doctor-portrait {
    width: min(76%, 330px);
    height: 340px;
    margin-right: 0;
    border-width: 5px;
  }

  .floating-card {
    left: 0;
    top: 24px;
    max-width: 220px;
    padding: 0.7rem 0.75rem;
  }

  .card-content h3 {
    margin: 11px 0 8px;
    font-size: 1.28rem;
  }

  .cards-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .specialty-card:last-child {
    grid-column: auto;
    width: 100%;
  }

  .card-image {
    aspect-ratio: 1.85 / 1;
  }

  .card-content {
    padding: 1rem 1.05rem 1.15rem;
  }

  .card-content p {
    font-size: 0.9rem;
  }

  .public-contact {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    margin-top: 22px;
    padding: 1rem;
    border-radius: 18px;
  }

  .public-contact-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .public-contact h2 {
    font-size: 1.15rem;
  }

  .public-contact p {
    font-size: 0.82rem;
  }

  .public-contact .btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
  }

  .double-field,
  .about-metrics,
  .client-profile-details {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal-panel {
    padding: 1.2rem 0.9rem 0.9rem;
  }

  #authModal {
    align-items: flex-end;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }

  #authModal .modal-panel {
    width: 100%;
    max-height: min(90dvh, 760px);
    padding: 1.15rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-radius: 24px;
  }

  #adminBookingModal {
    align-items: flex-end;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }

  #adminBookingModal .modal-panel {
    width: 100%;
    max-height: min(90dvh, 760px);
    padding: 1.15rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-radius: 24px 24px 14px 14px;
  }

  .modal-header h2 {
    font-size: 1.6rem;
  }

  .booking-modal-intro {
    font-size: 0.86rem;
  }

  .booking-progress {
    gap: 0.35rem;
  }

  .booking-progress li {
    gap: 0.4rem;
    font-size: 0.72rem;
  }

  .specialty-picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .specialty-option {
    justify-content: flex-start;
    min-height: 48px;
    padding: 0.65rem 0.8rem;
    text-align: left;
  }

  .combined-availability-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
  }

  .availability-slot-option {
    padding: 0.85rem;
  }

  .selection-summary {
    flex-wrap: wrap;
  }
}

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