:root {
  color-scheme: light;
  --blue-950: #071d49;
  --blue-900: #0b2f6c;
  --blue-700: #1158b5;
  --blue-500: #2f82e6;
  --blue-100: #e7f1ff;
  --aqua: #8ce9ff;
  --mint: #57d6a3;
  --coral: #ffb28c;
  --ink: #122033;
  --muted: #60708a;
  --line: rgba(13, 52, 110, 0.14);
  --surface: rgba(255, 255, 255, 0.9);
  --shadow: 0 22px 60px rgba(2, 20, 54, 0.18);
}

/* Last rule wins: the actual login screen users should see. */
.login-screen {
  position: fixed !important;
  inset: 0 !important;
  min-height: 100svh !important;
  height: 100svh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(10px, 2vh, 20px) clamp(14px, 2.4vw, 28px) !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(140, 233, 255, 0.28), transparent 18rem),
    radial-gradient(circle at 84% 76%, rgba(87, 214, 163, 0.2), transparent 24rem),
    linear-gradient(135deg, #061638 0%, #0a3474 48%, #061c46 100%) !important;
}

.login-screen.is-hidden {
  display: none !important;
}

.login-screen .login-graphic {
  position: absolute !important;
  left: 7% !important;
  bottom: 7% !important;
  width: min(38vw, 420px) !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  opacity: 0.44 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle, #ffffff 0 4%, #87ebff 5% 14%, #1e6fca 15% 34%, #061638 35% 48%, transparent 49%),
    conic-gradient(from 20deg, rgba(140, 233, 255, 0.14), rgba(255, 255, 255, 0.22), rgba(87, 214, 163, 0.14), rgba(140, 233, 255, 0.14)) !important;
  border: 1px solid rgba(140, 233, 255, 0.28) !important;
  box-shadow: 0 0 90px rgba(140, 233, 255, 0.18) !important;
}

.login-screen .login-graphic span {
  display: none !important;
}

.login-screen .login-card {
  position: relative !important;
  z-index: 1 !important;
  width: min(900px, calc(100vw - 32px)) !important;
  max-height: calc(100svh - 24px) !important;
  display: grid !important;
  grid-template-columns: minmax(230px, 0.78fr) minmax(320px, 1fr) !important;
  gap: clamp(18px, 2.6vw, 30px) !important;
  align-items: center !important;
  margin: 0 !important;
  padding: clamp(18px, 2.7vw, 30px) !important;
  overflow: auto !important;
  color: #102345 !important;
  border-radius: 30px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0 39%, rgba(246, 250, 255, 0.96) 39% 100%),
    radial-gradient(circle at 92% 10%, rgba(140, 233, 255, 0.22), transparent 18rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 34px 90px rgba(0, 9, 33, 0.36) !important;
  backdrop-filter: blur(22px) !important;
}

.login-screen .login-card > .brand-mark,
.login-screen .login-card > .eyebrow,
.login-screen .login-card > h1,
.login-screen .login-card > .login-copy {
  grid-column: 1 !important;
}

.login-screen .login-card > .auth-tabs,
.login-screen .login-card > .auth-panel,
.login-screen .login-card > .auth-message,
.login-screen .login-card > small {
  grid-column: 2 !important;
}

.login-screen .brand-mark.large {
  width: 52px !important;
  height: 52px !important;
  margin: 0 0 8px !important;
  border-radius: 18px !important;
}

.login-screen .login-card h1 {
  max-width: 9.5ch !important;
  margin: 0 !important;
  color: #071d49 !important;
  font-family: "Optima", Georgia, serif !important;
  font-size: clamp(1.95rem, 3.4vw, 2.95rem) !important;
  font-weight: 500 !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

.login-screen .login-copy {
  max-width: 27ch !important;
  margin: 12px 0 0 !important;
  color: #526681 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.92rem !important;
  line-height: 1.38 !important;
}

.login-screen .auth-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 10px !important;
  padding: 5px !important;
  border-radius: 18px !important;
  background: rgba(7, 29, 73, 0.07) !important;
  border: 1px solid rgba(13, 52, 110, 0.08) !important;
}

.login-screen .auth-tab {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  color: #273b5f !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.login-screen .auth-tab.is-active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f56a6, #16a9bd) !important;
  box-shadow: 0 10px 24px rgba(17, 88, 181, 0.18) !important;
}

.login-screen .auth-panel.is-active {
  display: grid !important;
  gap: 6px !important;
}

.login-screen .login-card label {
  margin: 2px 0 0 !important;
  color: #52637c !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.login-screen .login-card input,
.login-screen .login-card select {
  min-height: 42px !important;
  padding: 10px 13px !important;
  border-radius: 15px !important;
  color: #172840 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(13, 52, 110, 0.15) !important;
}

.login-screen .remember-row {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 24px !important;
  margin: 2px 0 0 !important;
  color: #50627b !important;
  font-size: 0.88rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.login-screen .remember-row input {
  width: 16px !important;
  min-height: 16px !important;
}

.login-screen .login-card button[type="submit"],
.login-screen #registerButton,
.login-screen #forgotPasswordButton,
.login-screen #updatePasswordButton {
  min-height: 46px !important;
  margin-top: 6px !important;
  border-radius: 16px !important;
  color: #ffffff !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #1158b5, #11abc5) !important;
  box-shadow: 0 16px 30px rgba(17, 88, 181, 0.22) !important;
}

.login-screen .login-card > small {
  margin-top: 4px !important;
  color: #697b94 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

@media (max-width: 780px) {
  .login-screen {
    align-items: start !important;
    overflow: auto !important;
    padding: 12px !important;
  }

  .login-screen .login-graphic {
    display: none !important;
  }

  .login-screen .login-card {
    width: min(100%, 520px) !important;
    max-height: none !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 20px !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95)) !important;
  }

  .login-screen .login-card > * {
    grid-column: 1 !important;
  }

  .login-screen .login-card h1 {
    max-width: 100% !important;
    font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
  }

  .login-screen .login-copy {
    max-width: 100% !important;
    margin-top: 4px !important;
    font-size: 0.86rem !important;
  }
}

/* Truly final login override. Keep this at the end of the stylesheet. */
.login-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  min-height: 100svh !important;
  height: 100svh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(10px, 2vh, 20px) clamp(14px, 2.4vw, 28px) !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(140, 233, 255, 0.28), transparent 18rem),
    radial-gradient(circle at 84% 76%, rgba(87, 214, 163, 0.2), transparent 24rem),
    linear-gradient(135deg, #061638 0%, #0a3474 48%, #061c46 100%) !important;
}

.login-screen.is-hidden {
  display: none !important;
}

.login-screen .login-graphic {
  position: absolute !important;
  left: 7% !important;
  bottom: 7% !important;
  width: min(38vw, 420px) !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  opacity: 0.44 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle, #ffffff 0 4%, #87ebff 5% 14%, #1e6fca 15% 34%, #061638 35% 48%, transparent 49%),
    conic-gradient(from 20deg, rgba(140, 233, 255, 0.14), rgba(255, 255, 255, 0.22), rgba(87, 214, 163, 0.14), rgba(140, 233, 255, 0.14)) !important;
  border: 1px solid rgba(140, 233, 255, 0.28) !important;
  box-shadow: 0 0 90px rgba(140, 233, 255, 0.18) !important;
}

.login-screen .login-graphic span {
  display: none !important;
}

.login-screen .login-card {
  position: relative !important;
  z-index: 1 !important;
  width: min(900px, calc(100vw - 32px)) !important;
  max-height: calc(100svh - 24px) !important;
  display: grid !important;
  grid-template-columns: minmax(230px, 0.78fr) minmax(320px, 1fr) !important;
  gap: clamp(18px, 2.6vw, 30px) !important;
  align-items: center !important;
  margin: 0 !important;
  padding: clamp(18px, 2.7vw, 30px) !important;
  overflow: auto !important;
  color: #102345 !important;
  border-radius: 30px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0 39%, rgba(246, 250, 255, 0.96) 39% 100%),
    radial-gradient(circle at 92% 10%, rgba(140, 233, 255, 0.22), transparent 18rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 34px 90px rgba(0, 9, 33, 0.36) !important;
  backdrop-filter: blur(22px) !important;
}

.login-screen .login-logo {
  grid-column: 1 !important;
  width: min(250px, 100%) !important;
  height: auto !important;
  align-self: end !important;
  margin: 0 0 12px !important;
  padding: 12px 14px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(13, 52, 110, 0.1) !important;
  box-shadow: 0 18px 42px rgba(7, 29, 73, 0.11) !important;
}

.login-screen .login-card > .eyebrow,
.login-screen .login-card > h1,
.login-screen .login-card > .login-copy {
  grid-column: 1 !important;
}

.login-screen .login-card > .auth-tabs,
.login-screen .login-card > .auth-panel,
.login-screen .login-card > .auth-message,
.login-screen .login-card > small {
  grid-column: 2 !important;
}

.login-screen .login-card h1 {
  max-width: 9.5ch !important;
  margin: 0 !important;
  color: #071d49 !important;
  font-family: "Optima", Georgia, serif !important;
  font-size: clamp(1.95rem, 3.4vw, 2.95rem) !important;
  font-weight: 500 !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

.login-screen .login-copy {
  max-width: 27ch !important;
  margin: 12px 0 0 !important;
  color: #526681 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.92rem !important;
  line-height: 1.38 !important;
}

.login-screen .auth-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 10px !important;
  padding: 5px !important;
  border-radius: 18px !important;
  background: rgba(7, 29, 73, 0.07) !important;
  border: 1px solid rgba(13, 52, 110, 0.08) !important;
}

.login-screen .auth-tab {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  color: #273b5f !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.login-screen .auth-tab.is-active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f56a6, #16a9bd) !important;
  box-shadow: 0 10px 24px rgba(17, 88, 181, 0.18) !important;
}

.login-screen .auth-panel.is-active {
  display: grid !important;
  gap: 6px !important;
}

.login-screen .login-card label {
  margin: 2px 0 0 !important;
  color: #52637c !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.login-screen .login-card input,
.login-screen .login-card select {
  min-height: 42px !important;
  padding: 10px 13px !important;
  border-radius: 15px !important;
  color: #172840 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(13, 52, 110, 0.15) !important;
}

.login-screen .remember-row {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 24px !important;
  margin: 2px 0 0 !important;
  color: #50627b !important;
  font-size: 0.88rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.login-screen .remember-row input {
  width: 16px !important;
  min-height: 16px !important;
}

.login-screen .login-card button[type="submit"],
.login-screen #registerButton,
.login-screen #forgotPasswordButton,
.login-screen #updatePasswordButton {
  min-height: 46px !important;
  margin-top: 6px !important;
  border-radius: 16px !important;
  color: #ffffff !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #1158b5, #11abc5) !important;
  box-shadow: 0 16px 30px rgba(17, 88, 181, 0.22) !important;
}

.login-screen .login-card > small {
  margin-top: 4px !important;
  color: #697b94 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

@media (max-width: 780px) {
  .login-screen {
    align-items: start !important;
    overflow: auto !important;
    padding: 12px !important;
  }

  .login-screen .login-graphic {
    display: none !important;
  }

  .login-screen .login-card {
    width: min(100%, 520px) !important;
    max-height: none !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 20px !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95)) !important;
  }

  .login-screen .login-card > * {
    grid-column: 1 !important;
  }

  .login-screen .login-logo {
    width: min(220px, 72vw) !important;
    margin-bottom: 6px !important;
  }

  .login-screen .login-card h1 {
    max-width: 100% !important;
    font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
  }

  .login-screen .login-copy {
    max-width: 100% !important;
    margin-top: 4px !important;
    font-size: 0.86rem !important;
  }
}

/* Truly final login override. Keep this at the end of the stylesheet. */
.login-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  min-height: 100svh !important;
  height: 100svh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(10px, 2vh, 20px) clamp(14px, 2.4vw, 28px) !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(140, 233, 255, 0.28), transparent 18rem),
    radial-gradient(circle at 84% 76%, rgba(87, 214, 163, 0.2), transparent 24rem),
    linear-gradient(135deg, #061638 0%, #0a3474 48%, #061c46 100%) !important;
}

.login-screen.is-hidden {
  display: none !important;
}

.login-screen .login-graphic {
  position: absolute !important;
  left: 7% !important;
  bottom: 7% !important;
  width: min(38vw, 420px) !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  opacity: 0.44 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle, #ffffff 0 4%, #87ebff 5% 14%, #1e6fca 15% 34%, #061638 35% 48%, transparent 49%),
    conic-gradient(from 20deg, rgba(140, 233, 255, 0.14), rgba(255, 255, 255, 0.22), rgba(87, 214, 163, 0.14), rgba(140, 233, 255, 0.14)) !important;
  border: 1px solid rgba(140, 233, 255, 0.28) !important;
  box-shadow: 0 0 90px rgba(140, 233, 255, 0.18) !important;
}

.login-screen .login-graphic span {
  display: none !important;
}

.login-screen .login-card {
  position: relative !important;
  z-index: 1 !important;
  width: min(900px, calc(100vw - 32px)) !important;
  max-height: calc(100svh - 24px) !important;
  display: grid !important;
  grid-template-columns: minmax(230px, 0.78fr) minmax(320px, 1fr) !important;
  gap: clamp(18px, 2.6vw, 30px) !important;
  align-items: center !important;
  margin: 0 !important;
  padding: clamp(18px, 2.7vw, 30px) !important;
  overflow: auto !important;
  color: #102345 !important;
  border-radius: 30px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0 39%, rgba(246, 250, 255, 0.96) 39% 100%),
    radial-gradient(circle at 92% 10%, rgba(140, 233, 255, 0.22), transparent 18rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 34px 90px rgba(0, 9, 33, 0.36) !important;
  backdrop-filter: blur(22px) !important;
}

.login-screen .login-card > .brand-mark,
.login-screen .login-card > .eyebrow,
.login-screen .login-card > h1,
.login-screen .login-card > .login-copy {
  grid-column: 1 !important;
}

.login-screen .login-card > .auth-tabs,
.login-screen .login-card > .auth-panel,
.login-screen .login-card > .auth-message,
.login-screen .login-card > small {
  grid-column: 2 !important;
}

.login-screen .brand-mark.large {
  width: 52px !important;
  height: 52px !important;
  margin: 0 0 8px !important;
  border-radius: 18px !important;
}

.login-screen .login-card h1 {
  max-width: 9.5ch !important;
  margin: 0 !important;
  color: #071d49 !important;
  font-family: "Optima", Georgia, serif !important;
  font-size: clamp(1.95rem, 3.4vw, 2.95rem) !important;
  font-weight: 500 !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

.login-screen .login-copy {
  max-width: 27ch !important;
  margin: 12px 0 0 !important;
  color: #526681 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.92rem !important;
  line-height: 1.38 !important;
}

.login-screen .auth-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 10px !important;
  padding: 5px !important;
  border-radius: 18px !important;
  background: rgba(7, 29, 73, 0.07) !important;
  border: 1px solid rgba(13, 52, 110, 0.08) !important;
}

.login-screen .auth-tab {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  color: #273b5f !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.login-screen .auth-tab.is-active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f56a6, #16a9bd) !important;
  box-shadow: 0 10px 24px rgba(17, 88, 181, 0.18) !important;
}

.login-screen .auth-panel.is-active {
  display: grid !important;
  gap: 6px !important;
}

.login-screen .login-card label {
  margin: 2px 0 0 !important;
  color: #52637c !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.login-screen .login-card input,
.login-screen .login-card select {
  min-height: 42px !important;
  padding: 10px 13px !important;
  border-radius: 15px !important;
  color: #172840 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(13, 52, 110, 0.15) !important;
}

.login-screen .remember-row {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 24px !important;
  margin: 2px 0 0 !important;
  color: #50627b !important;
  font-size: 0.88rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.login-screen .remember-row input {
  width: 16px !important;
  min-height: 16px !important;
}

.login-screen .login-card button[type="submit"],
.login-screen #registerButton,
.login-screen #forgotPasswordButton,
.login-screen #updatePasswordButton {
  min-height: 46px !important;
  margin-top: 6px !important;
  border-radius: 16px !important;
  color: #ffffff !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #1158b5, #11abc5) !important;
  box-shadow: 0 16px 30px rgba(17, 88, 181, 0.22) !important;
}

.login-screen .login-card > small {
  margin-top: 4px !important;
  color: #697b94 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

@media (max-width: 780px) {
  .login-screen {
    align-items: start !important;
    overflow: auto !important;
    padding: 12px !important;
  }

  .login-screen .login-graphic {
    display: none !important;
  }

  .login-screen .login-card {
    width: min(100%, 520px) !important;
    max-height: none !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 20px !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95)) !important;
  }

  .login-screen .login-card > * {
    grid-column: 1 !important;
  }

  .login-screen .login-card h1 {
    max-width: 100% !important;
    font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
  }

  .login-screen .login-copy {
    max-width: 100% !important;
    margin-top: 4px !important;
    font-size: 0.86rem !important;
  }
}

/* Visual upgrade pass: private portal gate, richer hero graphics, and profile photography. */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: center;
  gap: 44px;
  padding: clamp(22px, 6vw, 72px);
  color: white;
  background:
    linear-gradient(135deg, rgba(7, 29, 73, 0.97), rgba(9, 64, 138, 0.92)),
    url("data:image/svg+xml,%3Csvg width='1500' height='900' viewBox='0 0 1500 900' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1500' height='900' fill='%23071d49'/%3E%3Cg fill='none' stroke='%238ce9ff' stroke-width='2' opacity='.35'%3E%3Cellipse cx='520' cy='450' rx='370' ry='168'/%3E%3Ccircle cx='520' cy='450' r='92'/%3E%3Cpath d='M150 450h740M520 80v740'/%3E%3Cpath d='M930 160c150 92 270 222 390 390M1000 690c140-122 260-214 410-260'/%3E%3C/g%3E%3Cg fill='%2357d6a3' opacity='.18'%3E%3Ccircle cx='1140' cy='230' r='90'/%3E%3Ccircle cx='1230' cy='640' r='130'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  overflow: auto;
}

.login-screen.is-hidden,
.app-shell.is-locked {
  display: none;
}

.login-graphic {
  position: relative;
  min-height: 440px;
}

.login-graphic span {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(140, 233, 255, 0.34);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 70px rgba(140, 233, 255, 0.18);
}

.login-graphic span:nth-child(1) {
  inset: 8% 9% 18% 2%;
}

.login-graphic span:nth-child(2) {
  width: 210px;
  height: 210px;
  left: 32%;
  top: 31%;
  background: radial-gradient(circle, #ffffff 0 7%, var(--aqua) 8% 22%, var(--blue-700) 23% 54%, #031537 55%);
}

.login-graphic span:nth-child(3) {
  width: 76%;
  height: 2px;
  left: 11%;
  top: 50%;
  background: linear-gradient(90deg, transparent, var(--aqua), transparent);
  border: 0;
  box-shadow: 0 0 24px var(--aqua);
}

.login-card {
  padding: 24px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.brand-mark.large {
  width: 70px;
  height: 70px;
  margin-bottom: 18px;
  border-radius: 20px;
}

.login-card h1 {
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.02;
}

.login-copy {
  margin: 14px 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.login-card label {
  display: block;
  margin: 14px 0 7px;
  color: var(--blue-950);
  font-weight: 850;
}

.login-card input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.login-card button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-700), #00a6d6);
}

.login-card small {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 12px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(13, 52, 110, 0.08);
}

.auth-tab {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  color: #0b1f46;
  font-family: var(--font-display);
  font-weight: 900;
  background: transparent;
}

.auth-tab.is-active {
  color: white;
  background: linear-gradient(135deg, #0a4f9e, #38d39f);
  box-shadow: 0 12px 22px rgba(5, 30, 68, 0.14);
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.login-card select {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

.auth-message {
  min-height: 22px;
  margin-top: 12px;
  color: #0b4f6f;
  font-weight: 800;
  line-height: 1.35;
}

.auth-message[data-type="error"] {
  color: #8f2d14;
}

.auth-message[data-type="success"] {
  color: #0a6d4d;
}

.signout-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  color: white;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.08);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 8px;
  color: white;
  background: rgba(7, 29, 73, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(2, 20, 54, 0.18);
  backdrop-filter: blur(16px);
}

.topbar strong {
  display: block;
  font-size: 1.05rem;
}

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

.topbar-actions span {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--blue-950);
  font-weight: 900;
  background: var(--aqua);
}

.topbar-actions button {
  border: 0;
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--blue-950);
  font-weight: 900;
  background: white;
}

.hero {
  min-height: 520px;
  grid-template-columns: minmax(0, 1fr) 300px minmax(340px, 410px);
  background:
    linear-gradient(120deg, rgba(7, 29, 73, 0.96), rgba(17, 88, 181, 0.78)),
    url("data:image/svg+xml,%3Csvg width='1400' height='800' viewBox='0 0 1400 800' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1400' height='800' fill='%23081f4d'/%3E%3Cg opacity='.34' stroke='%238ce9ff' stroke-width='2' fill='none'%3E%3Cpath d='M-80 620C180 420 348 540 560 360S1020 98 1500 210'/%3E%3Cpath d='M-120 720C120 510 350 630 650 440S1050 180 1490 330'/%3E%3Ccircle cx='1030' cy='240' r='160'/%3E%3Ccircle cx='1030' cy='240' r='78'/%3E%3Cpath d='M914 240h232M1030 124v232'/%3E%3C/g%3E%3Cg opacity='.16' fill='%23ffffff'%3E%3Ccircle cx='220' cy='210' r='64'/%3E%3Ccircle cx='1210' cy='610' r='96'/%3E%3C/g%3E%3C/svg%3E");
}

.hero h2 {
  max-width: 720px;
  font-size: clamp(2.65rem, 5vw, 5.15rem);
}

.hospital-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hospital-strip span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--blue-950);
  font-size: 0.82rem;
  font-weight: 950;
  background: rgba(140, 233, 255, 0.88);
}

.hero-art {
  align-self: stretch;
  min-height: 320px;
  display: grid;
  place-items: center;
  position: relative;
}

.eye-orbit {
  width: min(280px, 100%);
  aspect-ratio: 1.65;
  border-radius: 50%;
  border: 2px solid rgba(140, 233, 255, 0.45);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 60px rgba(140, 233, 255, 0.16), 0 0 50px rgba(140, 233, 255, 0.15);
  position: relative;
}

.iris {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #ffffff 0 7%, var(--aqua) 8% 22%, var(--blue-700) 23% 54%, #031537 55%);
  box-shadow: 0 0 35px rgba(140, 233, 255, 0.65);
}

.scan-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mint), transparent);
}

.mini-doctor-stack {
  position: absolute;
  right: 8px;
  bottom: 44px;
  display: flex;
}

.mini-doctor-stack img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  margin-left: -12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.quick-grid article {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(231, 241, 255, 0.86)),
    radial-gradient(circle at 85% 8%, rgba(140, 233, 255, 0.5), transparent 6rem);
}

.avatar {
  width: 42px;
  overflow: hidden;
}

.photo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-hero .avatar {
  width: 92px;
  height: 92px;
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.doctor-card {
  padding: 0 0 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(9, 45, 102, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 250, 255, 0.82)),
    linear-gradient(135deg, color-mix(in srgb, var(--doctor-color) 24%, transparent), transparent);
}

.doctor-photo-wrap {
  height: 210px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 2.2rem;
  font-weight: 950;
  background:
    linear-gradient(135deg, rgba(7, 29, 73, 0.2), rgba(17, 88, 181, 0.12)),
    var(--blue-900);
}

.doctor-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.doctor-card header {
  margin: 0;
  padding: 16px 16px 12px;
  position: relative;
  align-items: flex-start;
  background: white;
}

.doctor-card p {
  margin: 6px 16px;
}

.profile-link {
  display: inline-flex;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--blue-900);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  background: var(--blue-100);
}

.source-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

  .hero h2 {
    font-size: clamp(2.35rem, 9vw, 4.2rem);
  }

  .hero-art {
    display: none;
  }
}

/* Final override: mobile header starts full, then smoothly contracts with all options. */
@media (max-width: 760px) {
  body .topbar,
  body.is-mobile-header-compact .topbar {
    position: sticky !important;
    top: 6px !important;
    z-index: 20 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: var(--mobile-header-gap-row, 8px) 10px !important;
    align-items: center !important;
    width: calc(100vw - 16px) !important;
    max-height: var(--mobile-header-height, 150px) !important;
    min-height: 0 !important;
    margin: 0 auto 8px !important;
    padding: var(--mobile-header-pad-y, 10px) 10px !important;
    overflow: hidden !important;
    border-radius: var(--mobile-header-radius, 16px) !important;
    opacity: 1 !important;
    background:
      linear-gradient(135deg, rgba(7, 21, 47, 0.95), rgba(16, 42, 86, 0.92)) !important;
    border: 1px solid rgba(140, 233, 255, 0.18) !important;
    box-shadow: 0 18px 42px rgba(3, 16, 41, 0.22) !important;
    transform: none !important;
    backdrop-filter: blur(18px) !important;
  }

  body .topbar > div:first-child,
  body.is-mobile-header-compact .topbar > div:first-child {
    display: block !important;
    min-width: 0 !important;
  }

  body .topbar .eyebrow,
  body.is-mobile-header-compact .topbar .eyebrow {
    display: block !important;
    max-height: var(--mobile-eyebrow-height, 14px) !important;
    margin: 0 0 1px !important;
    overflow: hidden !important;
    opacity: var(--mobile-eyebrow-opacity, 1) !important;
    color: #8ce9ff !important;
    font-size: 0.55rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.12em !important;
  }

  body .topbar strong,
  body.is-mobile-header-compact .topbar strong {
    display: block !important;
    max-width: var(--mobile-title-width, 46vw) !important;
    overflow: hidden !important;
    color: white !important;
    font-family: var(--font-display) !important;
    font-size: var(--mobile-title-size, 0.98rem) !important;
    line-height: 1.05 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body .topbar strong::before,
  body.is-mobile-header-compact .topbar strong::before {
    content: none !important;
  }

  body .compliance-badge,
  body.is-mobile-header-compact .compliance-badge {
    display: inline-flex !important;
    justify-self: end !important;
    max-width: var(--mobile-badge-width, 43vw) !important;
    gap: 6px !important;
    padding: 6px 8px 6px 6px !important;
    overflow: hidden !important;
    opacity: var(--mobile-badge-opacity, 1) !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body .compliance-badge::before,
  body.is-mobile-header-compact .compliance-badge::before {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
  }

  body .compliance-badge span,
  body.is-mobile-header-compact .compliance-badge span {
    display: inline !important;
    font-size: 0.62rem !important;
    white-space: nowrap !important;
  }

  body .compliance-badge strong,
  body.is-mobile-header-compact .compliance-badge strong {
    display: none !important;
  }

  body .topbar-actions,
  body.is-mobile-header-compact .topbar-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: var(--mobile-nav-height, 80px) !important;
    overflow: hidden !important;
    padding: 2px 0 3px !important;
    opacity: var(--mobile-nav-opacity, 1) !important;
    transform: translateY(var(--mobile-nav-y, 0)) !important;
    pointer-events: auto !important;
    scrollbar-width: none !important;
  }

  body .topbar-actions a,
  body .topbar-actions button,
  body.is-mobile-header-compact .topbar-actions a,
  body.is-mobile-header-compact .topbar-actions button {
    flex: 0 0 auto !important;
    padding: var(--mobile-nav-button-pad-y, 7px) var(--mobile-nav-button-pad-x, 10px) !important;
    border-radius: 999px !important;
    font-size: var(--mobile-nav-button-size, 0.75rem) !important;
    line-height: 1 !important;
    opacity: 1 !important;
  }
}

@media (max-width: 760px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-graphic {
    display: none;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Directory readability cleanup. */
.doctor-card header {
  margin: 0;
  padding: 16px 16px 12px;
  align-items: flex-start;
  background: white;
}

.doctor-card header .avatar {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 2px solid white;
  box-shadow: 0 6px 14px rgba(9, 45, 102, 0.12);
}

.doctor-card h3 {
  font-size: 1.12rem;
  line-height: 1.18;
}

.doctor-photo-wrap {
  height: 210px;
}

@media (max-width: 1320px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  }

  .hero-art {
    display: none;
  }
}

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

  .hero h2 {
    font-size: clamp(2.35rem, 9vw, 4.2rem);
  }
}

.doctor-card header {
  margin: 16px 16px 12px;
  align-items: flex-start;
}

.doctor-card header .avatar {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 2px solid white;
  box-shadow: 0 6px 14px rgba(9, 45, 102, 0.12);
}

.doctor-card h3 {
  font-size: 1.12rem;
  line-height: 1.18;
}

.doctor-photo-wrap {
  height: 210px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(140, 233, 255, 0.4), transparent 22rem),
    linear-gradient(140deg, #071d49 0%, #0b3f8a 38%, #d9ecff 38.2%, #eef7ff 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  color: white;
  background: linear-gradient(180deg, rgba(6, 28, 73, 0.98), rgba(5, 38, 88, 0.94));
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-logo {
  width: 72px;
  height: 54px;
  object-fit: contain;
  padding: 7px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.ivc-logo {
  display: block;
  width: min(230px, 100%);
  margin-bottom: 16px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 900;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 10%, var(--aqua) 11% 22%, var(--blue-700) 23% 56%, var(--blue-950) 57%),
    var(--blue-950);
  border: 2px solid rgba(140, 233, 255, 0.72);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.brand-lockup h1,
.section-header h2,
.hero h2,
.compliance-section h2 {
  margin: 0;
}

.brand-lockup h1 {
  font-size: 1.06rem;
}

.eyebrow {
  margin: 0 0 6px;
  color: #6ce6ff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  position: relative;
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
}

.nav-list a:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.security-card {
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.security-card p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.84rem;
  font-weight: 800;
}

.security-card strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.45;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(87, 214, 163, 0.18);
}

main {
  min-width: 0;
  padding: 26px;
  display: grid;
  gap: 22px;
}

.hero {
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 420px);
  align-items: end;
  gap: 24px;
  padding: 42px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(7, 29, 73, 0.96), rgba(17, 88, 181, 0.72)),
    url("data:image/svg+xml,%3Csvg width='1400' height='800' viewBox='0 0 1400 800' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1400' height='800' fill='%23081f4d'/%3E%3Cg opacity='.32' stroke='%238ce9ff' stroke-width='2' fill='none'%3E%3Cpath d='M-80 620C180 420 348 540 560 360S1020 98 1500 210'/%3E%3Cpath d='M-120 720C120 510 350 630 650 440S1050 180 1490 330'/%3E%3Ccircle cx='1030' cy='240' r='160'/%3E%3Ccircle cx='1030' cy='240' r='78'/%3E%3Cpath d='M914 240h232M1030 124v232'/%3E%3C/g%3E%3Cg opacity='.16' fill='%23ffffff'%3E%3Ccircle cx='220' cy='210' r='64'/%3E%3Ccircle cx='1210' cy='610' r='96'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 780px;
  color: white;
}

.hero h2 {
  max-width: 680px;
  font-size: clamp(2.45rem, 5.2vw, 4.75rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.83);
  font-size: 1.08rem;
  line-height: 1.55;
}

.lookup-panel,
.schedule-section,
.handoff-panel,
.messages-section,
.contacts-section,
.compliance-section {
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.lookup-panel {
  padding: 22px;
}

.lookup-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-950);
  font-weight: 850;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="date"],
input[type="search"],
.correction-panel input,
.compose-bar input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

.handoff-rule {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--blue-950);
  font-size: 0.92rem;
  font-weight: 850;
  background: #dff8ff;
  border: 1px solid rgba(47, 130, 230, 0.18);
}

.week-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.week-controls button,
.correction-panel button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: white;
  font-weight: 900;
  background: var(--blue-700);
}

.correction-panel {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(231, 241, 255, 0.84);
  border: 1px solid var(--line);
  display: grid;
  gap: 9px;
}

.correction-panel h3 {
  margin: 0;
  color: var(--blue-950);
}

.correction-panel label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 900;
}

.day-exception-fieldset {
  margin: 6px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.day-exception-fieldset legend {
  padding: 0 6px;
  color: var(--blue-950);
  font-weight: 950;
}

.radio-line,
.specific-days-panel label {
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: white;
}

.specific-days-panel input {
  width: auto;
}

.specific-days-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.day-exceptions {
  display: grid;
  gap: 8px;
}

.day-exceptions div {
  padding: 10px;
  border-radius: 8px;
  color: var(--blue-950);
  background: #fff5cc;
  border: 1px solid #e6ca6f;
}

.day-exceptions span,
.day-exceptions strong,
.day-exceptions em {
  display: block;
}

.day-exceptions strong {
  margin-top: 6px;
}

.day-exceptions em {
  margin-top: 6px;
  color: #5d3a00;
  font-style: normal;
  font-weight: 850;
}

.date-row button,
.primary-button,
.compose-bar button,
.handoff-actions button {
  border: 0;
  border-radius: 8px;
  padding: 12px 15px;
  color: white;
  font-weight: 850;
  background: var(--blue-700);
}

.lookup-result {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.result-doctor {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: var(--blue-100);
}

.result-doctor strong {
  display: block;
  font-size: 1.15rem;
}

.result-doctor span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.quick-grid article {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 32px rgba(9, 45, 102, 0.12);
}

.quick-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.quick-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-950);
  font-size: 1.55rem;
}

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

.schedule-section,
.handoff-panel,
.messages-section,
.contacts-section,
.compliance-section {
  padding: 22px;
}

.schedule-section {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(231, 241, 255, 0.9)),
    radial-gradient(circle at 100% 0%, rgba(140, 233, 255, 0.28), transparent 18rem);
}

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

.section-header h2,
.compliance-section h2 {
  color: var(--blue-950);
  font-size: 1.6rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--blue-900);
  font-weight: 800;
  background: white;
}

.filter-button.is-active {
  color: white;
  border-color: var(--blue-700);
  background: var(--blue-700);
}

.table-wrap {
  overflow: auto;
  border-radius: 8px;
  border: 1px solid rgba(13, 52, 110, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(231, 241, 255, 0.72));
}

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

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

tbody tr:hover {
  background: rgba(140, 233, 255, 0.12);
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(7, 29, 73, 0.08);
}

th span {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
}

tr.is-current {
  background: rgba(140, 233, 255, 0.18);
}

.doctor-pill,
.avatar {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--blue-950);
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff, #bfeeff);
  border: 1px solid rgba(17, 88, 181, 0.16);
}

.schmidt-cell {
  background: rgba(255, 178, 140, 0.42);
  color: #74320d;
  font-weight: 900;
}

.note {
  display: inline-block;
  margin: 2px 0;
  padding: 5px 8px;
  border-radius: 999px;
  color: #315200;
  font-size: 0.78rem;
  font-weight: 800;
  background: #edff9d;
}

.call-card {
  display: grid;
  gap: 12px;
}

.call-card .doctor-hero {
  padding: 18px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
}

.doctor-hero .avatar {
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
}

.doctor-hero strong {
  display: block;
  font-size: 1.6rem;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(231, 241, 255, 0.72);
}

.handoff-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.handoff-actions button:last-child {
  color: var(--blue-900);
  background: white;
  border: 1px solid var(--line);
}

.messages-section,
.contacts-section,
.compliance-section {
  scroll-margin-top: 20px;
}

.messaging-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 290px;
  gap: 16px;
}

.thread-list,
.message-window,
.audit-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.thread-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.thread {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
}

.thread.is-active,
.thread:hover {
  border-color: rgba(17, 88, 181, 0.18);
  background: var(--blue-100);
}

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

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

.message-window {
  min-height: 360px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-banner {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  color: #785114;
  background: rgba(255, 240, 191, 0.58);
  border: 1px solid rgba(241, 214, 118, 0.58);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.message-thread-heading {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--blue-950);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(13, 52, 110, 0.12);
}

.message-thread-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-thread-heading strong {
  font-family: var(--font-display);
  font-size: 1.24rem;
}

.bubble {
  max-width: 76%;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.45;
}

.bubble p {
  margin: 6px 0 0;
}

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

.outgoing {
  align-self: flex-end;
  color: white;
  background: var(--blue-700);
}

.compose-bar {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.audit-panel {
  padding: 16px;
}

.audit-panel h3 {
  margin: 0 0 12px;
  color: var(--blue-950);
}

.audit-panel ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  line-height: 1.55;
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.doctor-card {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.doctor-card header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.doctor-card h3 {
  margin: 0;
  color: var(--blue-950);
}

.doctor-card p {
  margin: 6px 0;
  color: var(--muted);
}

.compliance-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

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

.compliance-grid article {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.compliance-grid strong {
  color: var(--blue-950);
}

.compliance-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.hipaa-control-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hipaa-control-list span {
  display: block;
  padding: 13px 14px;
  border-radius: 14px;
  color: #0b1f46;
  font-weight: 800;
  line-height: 1.45;
  background: rgba(223, 247, 255, 0.72);
  border: 1px solid rgba(10, 79, 158, 0.12);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .hero,
  .workspace-grid,
  .messaging-grid,
  .compliance-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background: linear-gradient(180deg, #071d49 0%, #0b3f8a 44%, #eef7ff 100%);
  }

  main,
  .sidebar {
    padding: 16px;
  }

  .hero {
    padding: 24px;
    min-height: auto;
  }

  .hero h2 {
    font-size: 2.35rem;
    line-height: 1.08;
  }

  .hero-copy p:last-child {
    font-size: 1rem;
  }

  .quick-grid,
  .compliance-grid {
    grid-template-columns: 1fr;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .section-header,
  .date-row,
  .compose-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .date-row button,
  .compose-bar button,
  .primary-button {
    width: 100%;
  }

  .bubble {
    max-width: 100%;
  }
}

/* Final overrides for the upgraded private portal design. */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: center;
  gap: 44px;
  padding: clamp(22px, 6vw, 72px);
  color: white;
  background:
    linear-gradient(135deg, rgba(7, 29, 73, 0.97), rgba(9, 64, 138, 0.92)),
    url("data:image/svg+xml,%3Csvg width='1500' height='900' viewBox='0 0 1500 900' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1500' height='900' fill='%23071d49'/%3E%3Cg fill='none' stroke='%238ce9ff' stroke-width='2' opacity='.35'%3E%3Cellipse cx='520' cy='450' rx='370' ry='168'/%3E%3Ccircle cx='520' cy='450' r='92'/%3E%3Cpath d='M150 450h740M520 80v740'/%3E%3C/g%3E%3Cg fill='%2357d6a3' opacity='.18'%3E%3Ccircle cx='1140' cy='230' r='90'/%3E%3Ccircle cx='1230' cy='640' r='130'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.login-screen.is-hidden,
.app-shell.is-locked {
  display: none;
}

.login-graphic {
  position: relative;
  min-height: 440px;
}

.login-graphic span {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(140, 233, 255, 0.34);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 70px rgba(140, 233, 255, 0.18);
}

.login-graphic span:nth-child(1) {
  inset: 8% 9% 18% 2%;
}

.login-graphic span:nth-child(2) {
  width: 210px;
  height: 210px;
  left: 32%;
  top: 31%;
  background: radial-gradient(circle, #ffffff 0 7%, var(--aqua) 8% 22%, var(--blue-700) 23% 54%, #031537 55%);
}

.login-graphic span:nth-child(3) {
  width: 76%;
  height: 2px;
  left: 11%;
  top: 50%;
  background: linear-gradient(90deg, transparent, var(--aqua), transparent);
  border: 0;
  box-shadow: 0 0 24px var(--aqua);
}

.login-card {
  padding: 30px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.brand-mark.large {
  width: 70px;
  height: 70px;
  margin-bottom: 18px;
  border-radius: 20px;
}

.login-card h1 {
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.02;
}

.login-copy {
  margin: 12px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.login-card label {
  display: block;
  margin: 10px 0 6px;
  color: var(--blue-950);
  font-weight: 850;
}

.login-card input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.login-card button {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-700), #00a6d6);
}

.login-card small {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.signout-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  color: white;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.08);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 8px;
  color: white;
  background: rgba(7, 29, 73, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(2, 20, 54, 0.18);
  backdrop-filter: blur(16px);
}

.topbar strong {
  display: block;
  font-size: 1.05rem;
}

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

.topbar-actions a {
  position: relative;
  color: white;
  text-decoration: none;
  font-weight: 850;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.topbar-actions a[data-unread-count]::after,
.nav-list a[data-unread-count]::after {
  content: attr(data-unread-count);
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #071d49;
  font-family: var(--professional-text, Inter, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #8ce9ff, #66d7c2);
  border: 2px solid #07152f;
  box-shadow: 0 8px 18px rgba(3, 16, 41, 0.3);
  z-index: 3;
}

.topbar-actions span {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--blue-950);
  font-weight: 900;
  background: var(--aqua);
}

.topbar-actions button {
  border: 0;
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--blue-950);
  font-weight: 900;
  background: white;
}

.hero {
  min-height: 520px;
  grid-template-columns: minmax(0, 1fr) 300px minmax(340px, 410px);
  background:
    linear-gradient(120deg, rgba(7, 29, 73, 0.96), rgba(17, 88, 181, 0.78)),
    url("data:image/svg+xml,%3Csvg width='1400' height='800' viewBox='0 0 1400 800' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1400' height='800' fill='%23081f4d'/%3E%3Cg opacity='.34' stroke='%238ce9ff' stroke-width='2' fill='none'%3E%3Cpath d='M-80 620C180 420 348 540 560 360S1020 98 1500 210'/%3E%3Cpath d='M-120 720C120 510 350 630 650 440S1050 180 1490 330'/%3E%3Ccircle cx='1030' cy='240' r='160'/%3E%3Ccircle cx='1030' cy='240' r='78'/%3E%3Cpath d='M914 240h232M1030 124v232'/%3E%3C/g%3E%3Cg opacity='.16' fill='%23ffffff'%3E%3Ccircle cx='220' cy='210' r='64'/%3E%3Ccircle cx='1210' cy='610' r='96'/%3E%3C/g%3E%3C/svg%3E");
}

.hero h2 {
  max-width: 720px;
  font-size: clamp(2.65rem, 5vw, 5.15rem);
}

.hospital-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hospital-strip span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--blue-950);
  font-size: 0.82rem;
  font-weight: 950;
  background: rgba(140, 233, 255, 0.88);
}

.hero-art {
  align-self: stretch;
  min-height: 320px;
  display: grid;
  place-items: center;
  position: relative;
}

.eye-orbit {
  width: min(280px, 100%);
  aspect-ratio: 1.65;
  border-radius: 50%;
  border: 2px solid rgba(140, 233, 255, 0.45);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 60px rgba(140, 233, 255, 0.16), 0 0 50px rgba(140, 233, 255, 0.15);
  position: relative;
}

.iris {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #ffffff 0 7%, var(--aqua) 8% 22%, var(--blue-700) 23% 54%, #031537 55%);
  box-shadow: 0 0 35px rgba(140, 233, 255, 0.65);
}

.scan-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mint), transparent);
}

.mini-doctor-stack {
  position: absolute;
  right: 8px;
  bottom: 44px;
  display: flex;
}

.mini-doctor-stack img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  margin-left: -12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.quick-grid article {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(231, 241, 255, 0.86));
}

.avatar {
  overflow: hidden;
}

.photo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-hero .avatar {
  width: 92px;
  height: 92px;
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.doctor-card {
  padding: 0 0 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(9, 45, 102, 0.1);
}

.doctor-photo-wrap {
  height: 210px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 2.2rem;
  font-weight: 950;
  background:
    radial-gradient(circle at 24% 18%, color-mix(in srgb, var(--doctor-color) 46%, white), transparent 34%),
    linear-gradient(145deg, rgba(6, 25, 63, 0.96), rgba(9, 64, 138, 0.88));
}

.doctor-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.98) contrast(1.02);
}

.doctor-card[data-doctor="prescott"] .doctor-photo-wrap img {
  object-position: center 16%;
  transform: scale(1.08);
}

.doctor-card[data-doctor="schmidt"] .doctor-photo-wrap img {
  object-position: center 12%;
  transform: scale(1.1);
}

.doctor-card header {
  margin: 16px 16px 12px;
  position: relative;
  align-items: flex-start;
}

.doctor-card p {
  margin: 6px 16px;
}

.profile-link {
  display: inline-flex;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--blue-900);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  background: var(--blue-100);
}

.source-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.ivc-section {
  padding: 22px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

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

.ivc-grid article {
  border-radius: 8px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}

.ivc-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.ivc-grid strong {
  display: block;
  padding: 14px 14px 0;
  color: var(--blue-950);
  font-size: 1.1rem;
}

.ivc-grid p {
  margin: 8px 14px 16px;
  color: var(--muted);
  line-height: 1.45;
}

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

  .hero h2 {
    font-size: clamp(2.35rem, 9vw, 4.2rem);
  }

  .hero-art {
    display: none;
  }
}

@media (max-width: 760px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-graphic {
    display: none;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ivc-grid {
    grid-template-columns: 1fr;
  }

  .week-controls {
    grid-template-columns: 1fr;
  }

  .specific-days-panel {
    grid-template-columns: 1fr;
  }
}

.login-screen {
  overflow: auto;
}

.login-card {
  padding: 24px;
}

.login-card h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}

.login-copy {
  margin: 12px 0 16px;
}

.login-card label {
  margin: 10px 0 6px;
}

.login-card button {
  margin-top: 14px;
}

/* CEI call-board direction: private, fast, and built around the on-call physician. */
body {
  background:
    linear-gradient(135deg, rgba(3, 18, 48, 0.94), rgba(5, 55, 113, 0.78)),
    url("https://myvisioncare.org/media/cache/clinic_huge/uploads/images/clinic/5y/5yahQrH6CJhFUZKw7VKWgP.jpg.jpeg") center / cover fixed;
}

.topbar {
  display: flex;
  position: sticky;
  top: 16px;
  z-index: 4;
}

.topbar-actions a:hover {
  color: var(--blue-950);
  background: var(--aqua);
}

.sidebar {
  background: linear-gradient(180deg, rgba(3, 18, 48, 0.96), rgba(5, 35, 83, 0.9));
}

.hero {
  min-height: calc(100vh - 52px);
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px) minmax(320px, 390px);
  align-items: center;
  background:
    linear-gradient(115deg, rgba(4, 20, 53, 0.96) 0%, rgba(7, 45, 105, 0.9) 48%, rgba(5, 58, 119, 0.72) 100%),
    url("https://myvisioncare.org/media/cache/clinic_huge/uploads/images/clinic/5y/5yahQrH6CJhFUZKw7VKWgP.jpg.jpeg") center / cover;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(140, 233, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(140, 233, 255, 0.12) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, black, transparent 70%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  max-width: 760px;
  font-size: clamp(3rem, 5.4vw, 5.8rem);
  line-height: 0.96;
}

.hero-copy p:last-child {
  max-width: 560px;
  font-size: 1.16rem;
}

.hero-doctor-portrait {
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: white;
  font-size: 3rem;
  font-weight: 950;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.hero-doctor-portrait img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: center top;
}

.hospital-strip {
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 4px;
}

.hospital-strip span {
  color: white;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(140, 233, 255, 0.35);
}

.hero-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-contact-row a,
.hero-contact-row button,
.row-action {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--blue-950);
  font-weight: 950;
  text-decoration: none;
  background: white;
}

.hero-contact-row .call-button {
  color: white;
  background: linear-gradient(135deg, var(--mint), var(--blue-500));
}

.adjacent-call-weeks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin-top: 16px;
}

.adjacent-week-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.07)),
    rgba(4, 20, 53, 0.42);
  border: 1px solid rgba(140, 233, 255, 0.3);
  box-shadow: 0 16px 34px rgba(2, 14, 36, 0.2);
  backdrop-filter: blur(14px);
}

.adjacent-week-card span {
  display: block;
  color: #8ce9ff;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adjacent-week-card strong,
.adjacent-week-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adjacent-week-card strong {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.adjacent-week-card small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.adjacent-photo-stack {
  position: relative;
  width: 54px;
  height: 54px;
}

.adjacent-week-photo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  color: var(--blue-950);
  font-size: 0.8rem;
  font-weight: 950;
  background: linear-gradient(135deg, #fff, var(--doctor-color));
  border: 2px solid rgba(255, 255, 255, 0.75);
}

.adjacent-week-photo.secondary {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  box-shadow: 0 10px 18px rgba(2, 14, 36, 0.28);
}

.adjacent-week-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.lookup-panel {
  align-self: center;
}

.result-doctor {
  grid-template-columns: 1fr;
}

.row-action {
  color: var(--blue-900);
  background: var(--blue-100);
  white-space: nowrap;
}

.doctor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 11px 5px 5px;
  border-radius: 999px;
  color: var(--blue-950);
  font-weight: 950;
  background: linear-gradient(135deg, white, var(--doctor-color));
  border: 1px solid color-mix(in srgb, var(--doctor-color), #0b2f6c 20%);
}

.doctor-inline-photo,
.week-doctor-photo {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(9, 45, 102, 0.16);
}

.doctor-inline-photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.doctor-inline-photo img,
.week-doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.coverage-card {
  display: grid;
  gap: 5px;
  min-width: 210px;
  min-height: 92px;
  padding: 12px;
  border-radius: 8px;
  color: var(--blue-950);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--doctor-color), white 18%), rgba(255, 255, 255, 0.92));
  border: 1px solid color-mix(in srgb, var(--doctor-color), #0b2f6c 20%);
  box-shadow: 0 10px 22px rgba(9, 45, 102, 0.08);
}

td[colspan="2"] .coverage-card {
  min-width: 420px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--doctor-color), white 8%), rgba(255, 255, 255, 0.94));
}

.coverage-card span {
  color: rgba(7, 29, 73, 0.65);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.coverage-card strong {
  font-size: 1rem;
  line-height: 1.15;
}

.coverage-card small {
  color: rgba(18, 32, 51, 0.72);
  font-weight: 800;
}

.handoff-actions {
  grid-template-columns: 1fr;
}

.profile-link {
  display: none;
}

@media (max-width: 1180px) {
  main {
    order: 1;
  }

  .sidebar {
    order: 2;
    position: relative;
    height: auto;
    padding: 14px 18px;
    gap: 12px;
  }

  .security-card {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: minmax(190px, 42vw) minmax(0, 1fr);
  }

  .hero-doctor-portrait {
    order: 0;
    min-height: 330px;
  }

  .hero-doctor-portrait img {
    min-height: 330px;
  }

  .hero-copy {
    order: 0;
  }

  .hero h2 {
    font-size: clamp(2rem, 7vw, 3.7rem);
  }

  .hero-copy p:last-child {
    font-size: 1rem;
  }

  .lookup-panel {
    grid-column: 1 / -1;
  }
}

/* Editorial polish pass: CEI private call board. */
:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-ui: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --deep-navy: #07152f;
  --ceil-blue: #0a4f9e;
  --ice: #edf7ff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.96);
}

body {
  font-family: var(--font-ui);
  color: #102035;
  background:
    radial-gradient(circle at 78% 8%, rgba(99, 205, 255, 0.28), transparent 25rem),
    linear-gradient(132deg, rgba(4, 18, 44, 0.96), rgba(8, 66, 136, 0.86)),
    url("https://myvisioncare.org/media/cache/clinic_huge/uploads/images/clinic/5y/5yahQrH6CJhFUZKw7VKWgP.jpg.jpeg") center / cover fixed;
}

.app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(5, 18, 43, 0.98), rgba(4, 39, 83, 0.92)),
    linear-gradient(135deg, rgba(140, 233, 255, 0.08), transparent);
  box-shadow: 18px 0 54px rgba(2, 12, 31, 0.24);
}

.brand-lockup {
  align-items: flex-start;
}

.brand-lockup h1,
.login-card h1,
.hero h2,
.section-header h2,
.doctor-hero strong,
.coverage-card strong {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-lockup h1 {
  font-size: 1rem;
  line-height: 1.1;
}

.brand-mark {
  border-radius: 18px 18px 18px 4px;
  background:
    radial-gradient(circle at 52% 52%, #ffffff 0 9%, #7ae8ff 10% 24%, #0a4f9e 25% 55%, #061633 56%);
}

.nav-list a,
.signout-button {
  border-radius: 10px;
  font-size: 0.92rem;
}

main {
  padding: 18px;
  gap: 18px;
}

.topbar {
  top: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(5, 20, 49, 0.82);
  box-shadow: 0 18px 46px rgba(1, 13, 34, 0.24);
}

.topbar strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0;
}

.topbar-actions a {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  min-height: calc(100vh - 104px);
  grid-template-columns: minmax(300px, 0.78fr) minmax(360px, 1fr) minmax(330px, 410px);
  align-items: stretch;
  gap: 22px;
  padding: clamp(20px, 2.2vw, 32px);
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(4, 16, 40, 0.96) 0%, rgba(8, 50, 110, 0.9) 48%, rgba(6, 69, 137, 0.78) 100%),
    url("https://myvisioncare.org/media/cache/clinic_huge/uploads/images/clinic/5y/5yahQrH6CJhFUZKw7VKWgP.jpg.jpeg") center / cover;
  box-shadow: 0 32px 86px rgba(3, 16, 41, 0.36);
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(140, 233, 255, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(140, 233, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 22% 20%, rgba(140, 233, 255, 0.24), transparent 19rem);
  background-size: 74px 74px, 74px 74px, auto;
  opacity: 0.72;
}

.hero-doctor-portrait {
  order: 1;
  min-height: 0;
  align-self: stretch;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(221, 238, 255, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.hero-doctor-portrait img {
  min-height: 100%;
  object-fit: cover;
  object-position: center 12%;
  filter: saturate(0.98) contrast(1.03);
}

.hero-copy {
  order: 2;
  align-self: center;
  max-width: none;
  padding: clamp(8px, 1vw, 18px) 0;
}

.hero .eyebrow,
.lookup-panel .eyebrow,
.section-header .eyebrow {
  color: #8ce9ff;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.hero h2 {
  max-width: 600px;
  font-size: clamp(2.9rem, 4.6vw, 5rem);
  line-height: 0.96;
  text-wrap: balance;
}

.hero-copy p:last-child {
  max-width: 540px;
  margin-top: 14px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.hospital-strip {
  margin-top: 20px;
  gap: 10px;
}

.hospital-strip span {
  padding: 9px 12px;
  border-radius: 10px;
  color: #eafbff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(140, 233, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-contact-row {
  margin-top: 22px;
}

.hero-contact-row a,
.hero-contact-row button,
.row-action,
.date-row button,
.week-controls button,
.correction-panel button,
.primary-button,
.compose-bar button,
.handoff-actions button {
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(5, 38, 88, 0.16);
}

.hero-contact-row .call-button {
  background: linear-gradient(135deg, #38d39f, #0b76d1);
}

.lookup-panel {
  order: 3;
  align-self: stretch;
  padding: 22px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(231, 240, 252, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 28px 70px rgba(1, 13, 34, 0.28);
  backdrop-filter: blur(24px);
}

.lookup-panel > label {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
}

.handoff-rule {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(226, 250, 255, 0.98), rgba(239, 246, 255, 0.92));
}

input[type="date"],
input[type="search"],
.correction-panel input,
.compose-bar input {
  border-radius: 12px;
  padding: 13px 14px;
  border-color: rgba(13, 52, 110, 0.16);
  box-shadow: inset 0 1px 2px rgba(5, 30, 68, 0.04);
}

.lookup-result {
  gap: 8px;
}

.result-doctor {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(13, 52, 110, 0.08);
}

.correction-panel {
  border-radius: 14px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(240, 247, 255, 0.92), rgba(224, 235, 250, 0.86));
}

.correction-panel h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.correction-panel .is-hidden {
  display: none;
}

.swap-summary {
  display: grid;
  gap: 10px;
}

.swap-summary div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(13, 52, 110, 0.1);
}

.swap-summary span,
.swap-grid span {
  display: block;
  color: #65748a;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.swap-summary strong,
.swap-summary small {
  display: block;
}

.swap-summary strong {
  margin-top: 4px;
  color: var(--blue-950);
  font-family: var(--font-display);
  font-size: 1.03rem;
}

.swap-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

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

.swap-mode label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 14px;
  color: var(--blue-950);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(13, 52, 110, 0.12);
}

.swap-mode input,
.radio-line input,
.specific-days-panel input {
  width: auto;
}

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

.swap-grid label {
  display: grid;
  gap: 6px;
}

.swap-grid input {
  width: 100%;
  min-width: 0;
}

.swap-grid #swapDateThreeRow {
  grid-column: 1 / -1;
}

.day-exception-fieldset {
  display: grid;
  gap: 8px;
}

.workspace-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.schedule-section,
.handoff-panel,
.messages-section,
.contacts-section,
.compliance-section {
  border-radius: 18px;
  background:
    linear-gradient(180deg, var(--panel-strong), rgba(236, 246, 255, 0.9));
  box-shadow: 0 26px 68px rgba(3, 20, 52, 0.18);
}

.section-header h2 {
  font-size: 1.85rem;
}

.filter-button {
  border-radius: 10px;
}

.table-wrap {
  border-radius: 16px;
  background: white;
}

th {
  background: #f4f8fc;
}

td {
  background: rgba(255, 255, 255, 0.64);
}

tr.is-current td {
  background: rgba(223, 247, 255, 0.82);
}

.coverage-card {
  border-radius: 14px;
  min-height: 86px;
  padding: 14px;
}

.doctor-badge {
  border-radius: 10px;
}

.call-card .doctor-hero {
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(5, 30, 71, 0.96), rgba(10, 79, 158, 0.88));
}

.doctor-card {
  border-radius: 16px;
}

.doctor-photo-wrap {
  height: 230px;
}

@media (max-width: 1320px) {
  .hero {
    grid-template-columns: minmax(260px, 0.65fr) minmax(320px, 1fr);
  }

  .lookup-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
    min-height: auto;
  }

  .hero-doctor-portrait,
  .hero-copy {
    order: initial;
  }

  .lookup-panel {
    order: initial;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  main {
    padding: 12px;
  }

  .topbar {
    position: relative;
    top: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .hero-doctor-portrait {
    min-height: 360px;
  }

  .hero h2 {
    font-size: clamp(2.35rem, 14vw, 3.6rem);
  }
}

/* Fine tune the first screen after visual review. */
.hero {
  grid-template-columns: minmax(280px, 360px) minmax(360px, 1fr) minmax(330px, 410px);
}

.hero-doctor-portrait {
  max-height: 560px;
  aspect-ratio: 0.78;
  align-self: start;
  margin-top: 32px;
  padding: 14px;
}

.hero-doctor-portrait img {
  border-radius: 10px;
  object-fit: contain;
  object-position: center center;
  background: white;
}

.hero-copy {
  display: grid;
  align-self: start;
  align-content: start;
  padding-top: clamp(52px, 6vh, 88px);
}

.hero h2 {
  max-width: 560px;
  font-size: clamp(2.45rem, 3.65vw, 3.85rem);
  line-height: 1.02;
}

.hero-copy p:last-child {
  font-size: 0.98rem;
}

.mini-list div {
  align-items: center;
  border-radius: 12px;
}

.mini-list div span:first-child {
  line-height: 1.25;
}

@media (max-width: 1320px) {
  .hero {
    grid-template-columns: minmax(240px, 320px) minmax(320px, 1fr);
  }
}

@media (max-width: 1180px) {
  .hero-doctor-portrait {
    max-height: 460px;
  }
}

/* Landing-page focus: only the on-call physician is visible at first. */
.app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  display: none;
}

main {
  min-height: 100vh;
  padding: 18px clamp(18px, 3vw, 42px) 42px;
}

.topbar {
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  color: #eafbff;
  background:
    linear-gradient(135deg, rgba(56, 211, 159, 0.28), rgba(140, 233, 255, 0.15)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(140, 233, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 30px rgba(5, 30, 68, 0.18);
}

.compliance-badge::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, white 0 12%, #8ce9ff 13% 32%, #2f80ed 33% 64%, #07152f 65%);
  box-shadow: 0 0 0 3px rgba(140, 233, 255, 0.16);
}

.compliance-badge span,
.compliance-badge strong {
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0;
}

.compliance-badge span {
  color: #8ce9ff;
  font-weight: 950;
}

.compliance-badge strong {
  color: white;
  font-weight: 950;
}

.warning-badge {
  background:
    linear-gradient(135deg, rgba(255, 176, 72, 0.22), rgba(255, 255, 255, 0.1)),
    rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 210, 120, 0.5);
}

.warning-badge::before {
  background:
    radial-gradient(circle at 50% 50%, white 0 10%, #ffd36f 11% 36%, #c26a18 37% 64%, #07152f 65%);
}

.warning-badge span {
  color: #ffd36f;
}

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

.topbar-actions a,
.topbar-actions button {
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.topbar-actions button {
  border-radius: 10px;
  padding: 7px 10px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.topbar-actions a {
  padding: 7px 10px;
}

.hero {
  max-width: 1480px;
  width: 100%;
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  grid-template-columns: minmax(310px, 430px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 74px);
  align-items: center;
  padding: clamp(28px, 4vw, 64px);
}

.hero-portrait-stack {
  display: grid;
  gap: 14px;
  align-self: center;
}

.hero-portrait-stack .hero-doctor-portrait {
  order: 1;
}

.hero-portrait-stack .call-progress-card {
  order: 2;
}

.hero-doctor-portrait {
  max-height: min(650px, calc(100vh - 220px));
  margin-top: 0;
}

.call-progress-card {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  color: white;
  background: rgba(5, 20, 49, 0.72);
  border: 1px solid rgba(140, 233, 255, 0.26);
  box-shadow: 0 18px 40px rgba(3, 16, 41, 0.24);
  backdrop-filter: blur(14px);
}

.call-progress-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.call-progress-card span {
  color: #8ce9ff;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.call-progress-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.call-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.call-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38d39f, #8ce9ff);
  box-shadow: 0 0 20px rgba(140, 233, 255, 0.5);
}

.hero-copy {
  padding-top: 0;
}

.hero h2 {
  max-width: 780px;
  font-size: clamp(3rem, 5.6vw, 6.5rem);
  line-height: 0.96;
}

.hero-copy p:last-child {
  font-size: clamp(1rem, 1.3vw, 1.25rem);
}

.hero-contact-row a,
.hero-contact-row button {
  padding: 14px 18px;
}

.change-date-section {
  max-width: 1120px;
  width: 100%;
  margin: 18px auto 0;
  padding: 24px;
  scroll-margin-top: 112px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, var(--panel-strong), rgba(236, 246, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 26px 68px rgba(3, 20, 52, 0.18);
}

.change-date-section .lookup-panel {
  box-shadow: none;
}

.workspace-grid,
.messages-section,
.contacts-section,
.new-schedule-section,
.compliance-section {
  max-width: 1480px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  scroll-margin-top: 112px;
}

.new-schedule-section {
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, var(--panel-strong), rgba(236, 246, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 26px 68px rgba(3, 20, 52, 0.18);
}

.schedule-import-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.drop-zone {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  border-radius: 18px;
  color: #0b1f46;
  background:
    linear-gradient(135deg, rgba(140, 233, 255, 0.18), rgba(255, 255, 255, 0.82));
  border: 2px dashed rgba(10, 79, 158, 0.34);
  cursor: pointer;
}

.drop-zone.is-dragging {
  background:
    linear-gradient(135deg, rgba(56, 211, 159, 0.22), rgba(140, 233, 255, 0.24));
  border-color: #38d39f;
}

.drop-zone input {
  display: none;
}

.drop-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: white;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(135deg, #0a4f9e, #38d39f);
  box-shadow: 0 20px 40px rgba(5, 30, 68, 0.18);
}

.drop-zone strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.drop-zone small {
  max-width: 360px;
  color: rgba(16, 32, 53, 0.68);
  line-height: 1.45;
}

.import-review {
  display: grid;
  gap: 14px;
}

.import-status {
  padding: 14px 16px;
  border-radius: 14px;
  color: #0b1f46;
  font-weight: 850;
  background: rgba(223, 247, 255, 0.74);
  border: 1px solid rgba(10, 79, 158, 0.12);
}

.import-preview {
  min-height: 210px;
  overflow: auto;
  border-radius: 16px;
  background: white;
  border: 1px solid rgba(13, 52, 110, 0.12);
}

.import-preview p {
  margin: 16px;
  color: rgba(16, 32, 53, 0.68);
  line-height: 1.5;
}

.import-preview table {
  min-width: 520px;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.import-actions button {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  color: white;
  font-family: var(--font-display);
  font-weight: 900;
  background: linear-gradient(135deg, #0a4f9e, #38d39f);
}

.import-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.import-actions button:last-child {
  color: #0b1f46;
  background: white;
  border: 1px solid rgba(13, 52, 110, 0.16);
}

.workspace-grid {
  grid-template-columns: 1fr;
}

body.is-authenticated .app-shell main > section:not(.is-active-view),
body.is-authenticated .app-shell main > .workspace-grid:not(.is-active-view) {
  display: none;
}

.topbar-actions a.is-active,
.nav-list a.is-active {
  border-color: rgba(140, 233, 255, 0.55);
  background: rgba(140, 233, 255, 0.18);
  color: #ffffff;
}

.empty-schedule {
  padding: 28px;
  text-align: center;
  color: rgba(16, 32, 53, 0.68);
  font-weight: 850;
}

@media (max-width: 1320px) {
  .hero {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  }

  .lookup-panel {
    grid-column: auto;
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-portrait-stack {
    width: min(420px, 100%);
  }

  .topbar {
    align-items: flex-start;
  }

  .compliance-badge {
    margin-left: 0;
  }
}

/* Keep the on-call landing composition centered above the fold. */
.hero {
  min-height: calc(100vh - 152px);
  align-items: center;
  justify-content: center;
  padding-top: clamp(22px, 3vh, 42px);
  padding-bottom: clamp(22px, 3vh, 42px);
}

.hero-portrait-stack {
  width: min(420px, 28vw);
  min-width: 300px;
  justify-self: end;
  align-self: center;
}

.hero-portrait-stack .hero-doctor-portrait {
  max-height: clamp(330px, 52vh, 520px);
  width: 100%;
}

.hero-doctor-portrait img {
  max-height: clamp(300px, 49vh, 490px);
}

.hero-copy {
  align-self: center;
  justify-self: start;
}

.call-progress-card {
  width: 100%;
}

@media (max-width: 1100px) {
  .hero-portrait-stack {
    width: min(380px, 38vw);
  }

  .hero h2 {
    font-size: clamp(2.7rem, 6vw, 5.2rem);
  }
}

@media (max-width: 920px) {
  .hero-portrait-stack {
    width: min(420px, 100%);
    min-width: 0;
    justify-self: center;
  }

  .hero-copy {
    justify-self: center;
  }

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

/* Hard cap the portrait stack so progress never falls below the first fold. */
.hero {
  min-height: calc(100vh - 142px);
  padding-top: clamp(16px, 2vh, 28px);
  padding-bottom: clamp(16px, 2vh, 28px);
}

.hero-portrait-stack {
  width: min(350px, 23vw);
  min-width: 260px;
  gap: 10px;
}

.hero-portrait-stack .hero-doctor-portrait {
  height: clamp(300px, 45vh, 430px);
  max-height: none;
  min-height: 0;
  aspect-ratio: auto;
  padding: 10px;
}

.hero-doctor-portrait img {
  height: 100%;
  max-height: none;
  min-height: 0;
  object-fit: contain;
}

.call-progress-card {
  padding: 11px 12px;
  gap: 8px;
}

.call-progress-track {
  height: 8px;
}

.hero h2 {
  font-size: clamp(2.6rem, 4.4vw, 5.2rem);
}

@media (max-width: 1120px) {
  .adjacent-call-weeks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .hero-portrait-stack {
    width: min(360px, 100%);
  }
}

/* Keep login and registration above the fold. */
.login-screen {
  overflow: hidden;
  grid-template-columns: minmax(260px, 0.78fr) minmax(420px, 520px);
  gap: clamp(18px, 4vw, 48px);
  padding: clamp(16px, 3vw, 42px);
}

.login-graphic {
  min-height: min(440px, 58vh);
}

.login-card {
  max-height: calc(100vh - 28px);
  overflow: hidden;
  padding: 18px;
  border-radius: 18px;
}

.brand-mark.large {
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 16px;
}

.login-card h1 {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
}

.login-copy {
  margin: 6px 0 8px;
  font-size: 0.84rem;
  line-height: 1.32;
}

.auth-tabs {
  margin: 10px 0;
}

.auth-tab {
  padding: 7px 8px;
  font-size: 0.84rem;
}

.login-card label {
  margin: 5px 0 3px;
  font-size: 0.78rem;
}

.login-card input,
.login-card select {
  padding: 8px 9px;
  font-size: 0.9rem;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin: 9px 0 2px;
  color: #425673;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.2;
}

.remember-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0a4f9e;
}

.remember-row span {
  white-space: normal;
}

.login-card button {
  margin-top: 8px;
  padding: 9px 10px;
}

.login-card small {
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
}

#registerPanel.is-active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
  align-items: end;
}

#registerPanel button {
  grid-column: 1 / -1;
}

.auth-message {
  min-height: 18px;
  margin-top: 8px;
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .login-screen {
    overflow: auto;
    grid-template-columns: 1fr;
  }

  .login-graphic {
    display: none;
  }

  .login-card {
    max-height: none;
  }

  #registerPanel.is-active {
    display: block;
  }
}

/* Final directory and bulletin board polish. */
.doctor-grid {
  align-items: stretch;
}

.doctor-card {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.94)),
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--doctor-color) 28%, transparent), transparent 14rem);
  border: 1px solid rgba(13, 52, 110, 0.12);
  box-shadow: 0 18px 44px rgba(9, 45, 102, 0.14);
}

.doctor-photo-wrap {
  height: 236px;
  padding: 16px 16px 0;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%),
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--doctor-color) 35%, white), transparent 10rem);
}

.doctor-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
  filter: saturate(1.02) contrast(1.02);
}

.doctor-card[data-doctor="prescott"] .doctor-photo-wrap img,
.doctor-card[data-doctor="schmidt"] .doctor-photo-wrap img {
  object-position: center bottom;
  transform: none;
}

.doctor-card header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 18px 18px 10px;
  background: transparent;
}

.doctor-card header .avatar {
  width: 46px;
  min-width: 46px;
  height: 46px;
}

.doctor-card h3 {
  max-width: 100%;
  color: var(--blue-950);
  font-size: 1.13rem;
  line-height: 1.18;
}

.doctor-card header p {
  margin: 7px 0 0;
  color: #65738c;
  line-height: 1.35;
}

.doctor-card > p {
  margin: auto 18px 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(13, 52, 110, 0.1);
  color: #53627a;
}

.bulletin-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.bulletin-composer {
  grid-column: 1 / 2;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 244, 255, 0.9)),
    radial-gradient(circle at 100% 0%, rgba(140, 233, 255, 0.34), transparent 12rem);
  border: 1px solid rgba(13, 52, 110, 0.12);
  box-shadow: 0 16px 36px rgba(3, 20, 52, 0.08);
}

.conversation-window {
  grid-column: 1 / 2;
  min-height: 460px;
  max-height: min(62vh, 680px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(239, 247, 255, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(140, 233, 255, 0.28), transparent 16rem);
  border: 1px solid rgba(13, 52, 110, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 18px 42px rgba(9, 45, 102, 0.1);
}

.conversation-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: -16px -16px 14px;
  padding: 14px 16px;
  color: var(--blue-950);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(13, 52, 110, 0.1);
  backdrop-filter: blur(12px);
}

.conversation-heading span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
}

.conversation-heading strong {
  color: #66758d;
  font-size: 0.86rem;
}

.conversation-stream {
  display: grid;
  gap: 12px;
}

.conversation-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.message-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--blue-950);
  font-size: 0.78rem;
  font-weight: 950;
  background:
    linear-gradient(135deg, #ffffff, rgba(140, 233, 255, 0.7));
  border: 1px solid rgba(13, 52, 110, 0.12);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(9, 45, 102, 0.1);
}

.message-avatar-photo {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--doctor-color) 30%, white));
  border: 2px solid white;
}

.message-avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.message-avatar-fallback {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.message-bubble {
  width: fit-content;
  max-width: min(760px, 100%);
  padding: 12px 14px;
  border-radius: 16px 16px 16px 4px;
  background: white;
  border: 1px solid rgba(13, 52, 110, 0.1);
  box-shadow: 0 12px 26px rgba(9, 45, 102, 0.08);
}

.message-bubble header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.message-delete {
  margin-left: auto;
  border: 1px solid rgba(143, 45, 20, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: #8f2d14;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(255, 238, 232, 0.9);
}

.message-bubble strong {
  color: var(--blue-950);
  font-family: var(--font-display);
  font-size: 1rem;
}

.message-bubble small {
  color: #697892;
  font-weight: 800;
}

.message-bubble p,
.empty-board {
  margin: 0;
  color: #4f5f78;
  line-height: 1.52;
}

.message-save-error {
  display: block;
  margin-top: 8px;
  color: #8f2d14;
  font-family: var(--professional-text);
  font-size: 0.78rem;
  font-weight: 500;
}

.empty-board {
  padding: 18px;
  text-align: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

@media (max-width: 860px) {
  .bulletin-board {
    grid-template-columns: 1fr;
  }

  .bulletin-composer,
  .conversation-window {
    grid-column: 1;
  }
}

/* Clean directory cards that cannot overlap at narrow widths. */
.doctor-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  justify-content: center;
  gap: clamp(18px, 2vw, 26px);
  align-items: stretch;
}

.directory-profile {
  display: grid;
  grid-template-rows: 320px 236px;
  justify-self: center;
  width: 100%;
  max-width: 560px;
  min-height: 556px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(13, 52, 110, 0.13);
  box-shadow: 0 18px 44px rgba(9, 45, 102, 0.14);
}

.directory-photo {
  display: grid;
  place-items: end center;
  min-width: 0;
  overflow: hidden;
  padding: 16px 16px 0;
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%),
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--doctor-color) 34%, white), transparent 12rem);
}

.directory-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.directory-profile[data-doctor="prescott"] .directory-photo img,
.directory-profile[data-doctor="schmidt"] .directory-photo img {
  width: auto;
  max-width: 88%;
  height: 88%;
  object-fit: contain;
  object-position: center bottom;
}

.directory-profile[data-doctor="prescott"] .directory-photo {
  place-items: start center;
}

.directory-profile[data-doctor="prescott"] .directory-photo img {
  max-width: 76%;
  height: 76%;
  margin-top: 18px;
  object-position: center top;
}

.directory-profile[data-doctor="schmidt"] .directory-photo img {
  max-width: 82%;
  height: 84%;
}

.directory-profile[data-doctor="mehta"] .directory-photo img,
.directory-profile[data-doctor="schmidt"] .directory-photo img {
  max-width: 88%;
  height: 88%;
  object-fit: contain;
  object-position: center center;
}

.directory-photo span {
  place-self: center;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  color: var(--blue-950);
  font-weight: 950;
  background: color-mix(in srgb, var(--doctor-color) 55%, white);
}

.directory-details {
  display: grid;
  grid-template-rows: 32px 30px 1fr;
  justify-items: center;
  align-items: start;
  gap: 6px;
  min-width: 0;
  padding: 22px 20px 20px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.96)),
    linear-gradient(90deg, color-mix(in srgb, var(--doctor-color) 16%, transparent), transparent);
}

.directory-details .avatar {
  display: none;
  width: 48px;
  min-width: 48px;
  height: 48px;
  border: 2px solid white;
  box-shadow: 0 8px 20px rgba(9, 45, 102, 0.14);
}

.directory-details h3 {
  margin: 0;
  max-width: 100%;
  color: var(--blue-950);
  font-size: clamp(1rem, 1.06vw, 1.18rem);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-details p {
  margin: 0;
  max-width: 100%;
  color: #65738c;
  font-family: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-links {
  display: grid;
  justify-items: center;
  align-content: start;
  width: 100%;
  gap: 9px;
  margin-top: 8px;
}

.directory-details a,
.directory-details .directory-links span {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  width: min(100%, 286px);
  min-height: 46px;
  padding: 9px 14px;
  border-radius: 16px;
  color: #19304f;
  font-family: "Avenir Next", Avenir, "Optima", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 255, 0.92)),
    linear-gradient(90deg, color-mix(in srgb, var(--doctor-color) 15%, transparent), transparent);
  border: 1px solid rgba(13, 52, 110, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 22px rgba(9, 45, 102, 0.06);
}

.directory-details a small,
.directory-details .directory-links span small {
  color: #73839c;
  font-family: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.directory-details a strong,
.directory-details .directory-links span strong {
  min-width: 0;
  max-width: 100%;
  color: #182e4d;
  font-family: "Avenir Next", Avenir, "Optima", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.78rem, 0.9vw, 0.94rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-details .directory-links span {
  color: #64738c;
  background: rgba(13, 52, 110, 0.045);
}

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

.week-edit-grid label {
  display: grid;
  gap: 6px;
}

.week-edit-grid span {
  color: #67748d;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.week-edit-grid input,
.week-edit-grid select {
  width: 100%;
  min-width: 0;
}

.simple-helper {
  margin: 0;
  color: #64738c;
  line-height: 1.45;
}

.week-edit-summary {
  display: grid;
  gap: 8px;
}

.week-edit-summary .week-edit-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 247, 255, 0.78));
  border: 1px solid rgba(13, 52, 110, 0.12);
  box-shadow: 0 16px 32px rgba(9, 45, 102, 0.1);
}

.week-edit-summary span,
.week-edit-summary small {
  color: #64738c;
  font-weight: 800;
}

.week-edit-summary strong {
  color: var(--blue-950);
  font-family: var(--font-display);
  font-size: 1.04rem;
  line-height: 1.12;
}

.week-edit-doctors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.week-doctor-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--doctor-color) 44%, transparent), transparent 7rem);
  border: 1px solid color-mix(in srgb, var(--doctor-color), #0b2f6c 18%);
}

.week-doctor-photo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.week-doctor-card span,
.week-doctor-card small {
  display: block;
}

.week-doctor-card span {
  margin-bottom: 3px;
  color: #6a7b96;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.week-doctor-card small {
  margin-top: 3px;
  color: #61718b;
  font-weight: 850;
}

.week-edit-summary em {
  display: block;
  margin-top: 7px;
  color: #8f2d14;
  font-style: normal;
  font-weight: 850;
}

.manual-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(13, 52, 110, 0.12);
}

.manual-scope legend {
  padding: 0 4px;
  color: #67748d;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.manual-scope label,
.manual-days-panel label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-950);
  font-weight: 850;
}

.manual-scope input,
.manual-days-panel input {
  width: auto;
}

.manual-days-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-days-panel label {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(140, 233, 255, 0.28);
  border: 1px solid rgba(13, 52, 110, 0.12);
}

@media (max-width: 1800px) {
  .contacts-section .doctor-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 360px));
  }

  .contacts-section .directory-profile {
    grid-template-rows: 240px 220px;
    max-width: 360px;
    min-height: 460px;
  }

  .contacts-section .directory-details {
    grid-template-rows: 28px 26px 1fr;
    padding: 18px 18px 18px;
  }

  .contacts-section .directory-details h3 {
    font-size: 1rem;
  }

  .contacts-section .directory-details p {
    font-size: 0.86rem;
  }

  .contacts-section .directory-details a,
  .contacts-section .directory-details .directory-links span {
    width: min(100%, 260px);
    min-height: 42px;
    padding: 8px 12px;
  }
}

@media (max-width: 1400px) {
  .contacts-section .doctor-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
  }

  .contacts-section .directory-profile {
    grid-template-rows: 214px 208px;
    max-width: 320px;
    min-height: 422px;
  }
}

@media (max-width: 1180px) {
  .contacts-section .doctor-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  }

  .contacts-section .directory-profile {
    grid-template-rows: 200px 204px;
    max-width: 300px;
    min-height: 404px;
  }

  .contacts-section .directory-details h3 {
    font-size: 0.92rem;
  }

  .contacts-section .directory-details p {
    font-size: 0.8rem;
  }

  .contacts-section .directory-details a strong,
  .contacts-section .directory-details .directory-links span strong {
    font-size: 0.76rem;
  }
}

@media (max-width: 940px) {
  .contacts-section .section-header {
    display: grid;
  }

  .contacts-section .section-header input {
    width: 100%;
  }

  .week-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .doctor-grid {
    grid-template-columns: minmax(0, 330px);
    justify-content: center;
  }

  .directory-profile {
    grid-template-rows: 220px 208px;
    max-width: 330px;
    min-height: 428px;
  }

  .directory-details {
    grid-template-columns: none;
    grid-template-rows: 32px 30px 1fr;
    padding: 20px 16px 18px;
  }

  .directory-details .avatar {
    display: none;
    width: 42px;
    min-width: 42px;
    height: 42px;
  }
}

/* Phone-only portrait tuning. Desktop/tablet card sizing stays unchanged. */
@media (max-width: 760px) {
  .directory-profile[data-doctor="ghajar"] .directory-photo,
  .directory-profile[data-doctor="schmidt"] .directory-photo {
    place-items: center;
  }

  .directory-profile[data-doctor="ghajar"] .directory-photo img {
    width: 92%;
    max-width: 92%;
    height: 92%;
    object-fit: contain;
    object-position: center center;
    transform: none;
  }

  .directory-profile[data-doctor="schmidt"] .directory-photo img {
    width: auto;
    max-width: 78%;
    height: 94%;
    object-fit: contain;
    object-position: center center;
    transform: none;
  }
}

/* Keep the header controls visible at every width. */
.topbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
}

.topbar > div:first-child,
.compliance-badge {
  min-width: max-content;
}

.topbar-actions {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 7px;
  overflow: visible;
}

.topbar-actions a,
.topbar-actions button {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 7px 9px;
  font-size: clamp(0.78rem, 0.85vw, 0.92rem);
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 4px;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar > div:first-child,
  .compliance-badge {
    min-width: 0;
  }

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

/* Phone-first landing polish: keep navigation compact and put the on-call doctor first. */
@media (max-width: 760px) {
  main {
    padding: 8px 8px 28px;
  }

  .topbar {
    position: sticky;
    top: 6px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    width: calc(100vw - 16px);
    margin: 0 auto 8px;
    padding: 10px;
    border-radius: 16px;
    transition:
      padding 180ms ease,
      border-radius 180ms ease,
      min-height 180ms ease,
      background-color 180ms ease,
      backdrop-filter 180ms ease;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .topbar .eyebrow {
    margin-bottom: 1px;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    transition: opacity 160ms ease, max-height 180ms ease, margin 180ms ease;
  }

  .topbar strong {
    display: block;
    overflow: hidden;
    max-width: 46vw;
    font-size: 0.98rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: max-width 180ms ease, font-size 180ms ease;
  }

  .compliance-badge {
    justify-self: end;
    max-width: 43vw;
    gap: 6px;
    padding: 6px 8px 6px 6px;
    border-radius: 999px;
    transition: max-width 180ms ease, padding 180ms ease, opacity 160ms ease, transform 180ms ease;
  }

  .compliance-badge::before {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    transition: width 180ms ease, height 180ms ease;
  }

  .compliance-badge span {
    font-size: 0.62rem;
  }

  .compliance-badge strong {
    display: none;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    transition: padding 180ms ease, gap 180ms ease, opacity 160ms ease, max-height 180ms ease, transform 180ms ease;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar-actions a,
  .topbar-actions button {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1;
    transition: padding 180ms ease, font-size 180ms ease;
  }

  body.is-mobile-header-compact .topbar {
    top: 4px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    width: calc(100vw - 16px);
    min-height: 34px;
    margin-bottom: 6px;
    padding: 8px 12px;
    overflow: hidden;
    border-radius: 999px;
    opacity: 0.96;
    background-color: rgba(7, 21, 47, 0.9);
    box-shadow: 0 10px 26px rgba(3, 16, 41, 0.24);
    transform: translateY(-1px);
    backdrop-filter: blur(18px);
  }

  body.is-mobile-header-compact .topbar .eyebrow {
    max-height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
  }

  body.is-mobile-header-compact .topbar strong {
    max-width: 100%;
    font-size: 0.88rem;
    line-height: 1;
  }

  body.is-mobile-header-compact .topbar strong::before {
    content: "California Eye Institute Call Hub";
  }

  body.is-mobile-header-compact .topbar strong {
    font-size: 0;
  }

  body.is-mobile-header-compact .topbar strong::before {
    color: white;
    font-family: var(--font-display);
    font-size: 0.88rem;
    letter-spacing: 0;
    white-space: nowrap;
  }

  body.is-mobile-header-compact .compliance-badge {
    max-width: 0;
    padding: 0;
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
  }

  body.is-mobile-header-compact .compliance-badge::before {
    width: 17px;
    height: 17px;
  }

  body.is-mobile-header-compact .compliance-badge span,
  body.is-mobile-header-compact .compliance-badge strong {
    display: none;
  }

  body.is-mobile-header-compact .topbar-actions {
    grid-column: 1 / -1;
    max-height: 0;
    gap: 0;
    padding: 1px 0 0;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
  }

  body.is-mobile-header-compact .topbar-actions a,
  body.is-mobile-header-compact .topbar-actions button {
    padding: 5px 8px;
    font-size: 0.62rem;
    opacity: 0.82;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: calc(100svh - 104px);
    width: calc(100vw - 16px);
    margin: 0 auto;
    padding: 12px;
    border-radius: 20px;
    align-content: start;
  }

  .hero-portrait-stack {
    order: -1;
    width: min(290px, 78vw);
    min-width: 0;
    justify-self: center;
    gap: 8px;
  }

  .hero-portrait-stack .hero-doctor-portrait {
    height: min(42svh, 330px);
    min-height: 235px;
    padding: 8px;
    border-radius: 18px;
  }

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

  .hero-doctor-portrait[data-doctor="mehta"] img,
  .hero-doctor-portrait[data-doctor="schmidt"] img,
  .directory-profile[data-doctor="mehta"] .directory-photo img,
  .directory-profile[data-doctor="schmidt"] .directory-photo img {
    object-position: center center;
    transform: none;
  }

  .call-progress-card {
    padding: 9px 10px;
    border-radius: 14px;
  }

  .call-progress-card span {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .call-progress-card strong {
    font-size: 0.86rem;
  }

  .hero-copy {
    display: grid;
    justify-items: center;
    text-align: center;
    width: 100%;
  }

  .hero-copy .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }

  .hero h2 {
    max-width: 100%;
    margin: 2px 0;
    font-size: clamp(2rem, 12vw, 3.2rem);
    line-height: 0.95;
  }

  #heroCallMeta {
    margin: 4px 0 8px;
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .hospital-strip {
    max-width: 100%;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .adjacent-call-weeks {
    width: 100%;
    margin-top: 8px;
  }

  .adjacent-week-card {
    min-height: 0;
    padding: 9px 10px;
  }

  .hero-contact-row {
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
  }

  .hero-contact-row a,
  .hero-contact-row button {
    min-width: 0;
    padding: 11px 13px;
    border-radius: 13px;
    font-size: 0.86rem;
  }
}

@media (max-width: 420px) {
  .topbar strong {
    max-width: 42vw;
    font-size: 0.9rem;
  }

  .compliance-badge {
    max-width: 45vw;
  }

  .compliance-badge span {
    font-size: 0.56rem;
  }

  .hero-portrait-stack {
    width: min(270px, 76vw);
  }

  .hero-portrait-stack .hero-doctor-portrait {
    height: min(38svh, 300px);
    min-height: 220px;
  }
}

/* Final mobile header: one stable line, no collapsing jump. */
@media (max-width: 760px) {
  .topbar,
  body.is-mobile-header-compact .topbar {
    position: sticky;
    top: 6px;
    z-index: 20;
    display: block;
    width: calc(100vw - 16px);
    min-height: 0;
    margin: 0 auto 8px;
    padding: 9px 12px;
    overflow: hidden;
    border-radius: 999px;
    opacity: 1;
    background: rgba(7, 21, 47, 0.92);
    border: 1px solid rgba(140, 233, 255, 0.22);
    box-shadow: 0 10px 26px rgba(3, 16, 41, 0.2);
    transform: none;
    backdrop-filter: blur(18px);
    transition: none;
  }

  .topbar > div:first-child {
    display: block;
    min-width: 0;
  }

  .topbar .eyebrow,
  body.is-mobile-header-compact .topbar .eyebrow,
  .topbar-actions,
  body.is-mobile-header-compact .topbar-actions,
  .compliance-badge,
  body.is-mobile-header-compact .compliance-badge {
    display: none;
  }

  .topbar strong,
  body.is-mobile-header-compact .topbar strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    line-height: 1;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
  }

  .topbar strong::before,
  body.is-mobile-header-compact .topbar strong::before {
    content: "The California Eye Institute shared physician call is not HIPAA compliant.";
    color: white;
    font-family: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(0.58rem, 2.35vw, 0.78rem);
    font-weight: 500;
    letter-spacing: 0;
  }
}

/* Definitive mobile header behavior: full header smoothly contracts with scroll progress. */
@media (max-width: 760px) {
  body .topbar,
  body.is-mobile-header-compact .topbar {
    position: sticky !important;
    top: 6px !important;
    z-index: 20 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: var(--mobile-header-gap-row, 8px) 10px !important;
    align-items: center !important;
    width: calc(100vw - 16px) !important;
    max-height: var(--mobile-header-height, 126px) !important;
    min-height: 0 !important;
    margin: 0 auto 8px !important;
    padding: var(--mobile-header-pad-y, 10px) 10px !important;
    overflow: hidden !important;
    border-radius: var(--mobile-header-radius, 16px) !important;
    opacity: 1 !important;
    background:
      linear-gradient(135deg, rgba(7, 21, 47, 0.95), rgba(16, 42, 86, 0.92)) !important;
    border: 1px solid rgba(140, 233, 255, 0.18) !important;
    box-shadow: 0 18px 42px rgba(3, 16, 41, 0.22) !important;
    transform: none !important;
    backdrop-filter: blur(18px) !important;
    transition: none !important;
  }

  body .topbar > div:first-child,
  body.is-mobile-header-compact .topbar > div:first-child {
    display: block !important;
    min-width: 0 !important;
    transform: none !important;
  }

  body .topbar .eyebrow,
  body.is-mobile-header-compact .topbar .eyebrow {
    display: block !important;
    max-height: var(--mobile-eyebrow-height, 14px) !important;
    margin: 0 0 1px !important;
    overflow: hidden !important;
    opacity: var(--mobile-eyebrow-opacity, 1) !important;
    color: #8ce9ff !important;
    font-size: 0.55rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.12em !important;
  }

  body .topbar strong,
  body.is-mobile-header-compact .topbar strong {
    display: block !important;
    max-width: var(--mobile-title-width, 46vw) !important;
    overflow: hidden !important;
    color: white !important;
    font-family: var(--font-display) !important;
    font-size: var(--mobile-title-size, 0.98rem) !important;
    line-height: 1.05 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body .topbar strong::before,
  body.is-mobile-header-compact .topbar strong::before {
    content: none !important;
  }

  body .compliance-badge,
  body.is-mobile-header-compact .compliance-badge {
    display: inline-flex !important;
    justify-self: end !important;
    max-width: var(--mobile-badge-width, 43vw) !important;
    gap: 6px !important;
    padding: 6px 8px 6px 6px !important;
    overflow: hidden !important;
    opacity: var(--mobile-badge-opacity, 1) !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body .compliance-badge::before,
  body.is-mobile-header-compact .compliance-badge::before {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
  }

  body .compliance-badge span,
  body.is-mobile-header-compact .compliance-badge span {
    display: inline !important;
    font-size: 0.62rem !important;
    white-space: nowrap !important;
  }

  body .compliance-badge strong,
  body.is-mobile-header-compact .compliance-badge strong {
    display: none !important;
  }

  body .topbar-actions,
  body.is-mobile-header-compact .topbar-actions {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: var(--mobile-nav-height, 38px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 3px !important;
    opacity: var(--mobile-nav-opacity, 1) !important;
    transform: translateY(var(--mobile-nav-y, 0)) !important;
    pointer-events: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body .topbar-actions a,
  body .topbar-actions button,
  body.is-mobile-header-compact .topbar-actions a,
  body.is-mobile-header-compact .topbar-actions button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: var(--mobile-nav-button-pad-y, 7px) var(--mobile-nav-button-pad-x, 6px) !important;
    border-radius: 13px !important;
    font-size: var(--mobile-nav-button-size, 0.68rem) !important;
    line-height: 1 !important;
    opacity: 1 !important;
    text-align: center !important;
    white-space: normal !important;
  }
}

/* Absolute final login override. Keep below every other rule. */
.login-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  min-height: 100svh !important;
  height: 100svh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(10px, 2vh, 20px) clamp(14px, 2.4vw, 28px) !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(140, 233, 255, 0.28), transparent 18rem),
    radial-gradient(circle at 84% 76%, rgba(87, 214, 163, 0.2), transparent 24rem),
    linear-gradient(135deg, #061638 0%, #0a3474 48%, #061c46 100%) !important;
}

.login-screen.is-hidden {
  display: none !important;
}

.login-screen .login-graphic {
  position: absolute !important;
  left: 7% !important;
  bottom: 7% !important;
  width: min(38vw, 420px) !important;
  min-height: 0 !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  opacity: 0.44 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle, #ffffff 0 4%, #87ebff 5% 14%, #1e6fca 15% 34%, #061638 35% 48%, transparent 49%),
    conic-gradient(from 20deg, rgba(140, 233, 255, 0.14), rgba(255, 255, 255, 0.22), rgba(87, 214, 163, 0.14), rgba(140, 233, 255, 0.14)) !important;
  border: 1px solid rgba(140, 233, 255, 0.28) !important;
  box-shadow: 0 0 90px rgba(140, 233, 255, 0.18) !important;
}

.login-screen .login-graphic span {
  display: none !important;
}

.login-screen .login-card {
  position: relative !important;
  z-index: 1 !important;
  width: min(900px, calc(100vw - 32px)) !important;
  max-height: calc(100svh - 24px) !important;
  display: grid !important;
  grid-template-columns: minmax(230px, 0.78fr) minmax(320px, 1fr) !important;
  gap: clamp(18px, 2.6vw, 30px) !important;
  align-items: center !important;
  margin: 0 !important;
  padding: clamp(18px, 2.7vw, 30px) !important;
  overflow: auto !important;
  color: #102345 !important;
  border-radius: 30px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0 39%, rgba(246, 250, 255, 0.96) 39% 100%),
    radial-gradient(circle at 92% 10%, rgba(140, 233, 255, 0.22), transparent 18rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 34px 90px rgba(0, 9, 33, 0.36) !important;
  backdrop-filter: blur(22px) !important;
}

.login-screen .login-logo {
  grid-column: 1 !important;
  width: min(250px, 100%) !important;
  height: auto !important;
  margin: 0 0 12px !important;
  padding: 12px 14px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(13, 52, 110, 0.1) !important;
  box-shadow: 0 18px 42px rgba(7, 29, 73, 0.11) !important;
}

.login-screen .login-card > .eyebrow,
.login-screen .login-card > h1,
.login-screen .login-card > .login-copy {
  grid-column: 1 !important;
}

.login-screen .login-card > .auth-tabs,
.login-screen .login-card > .auth-panel,
.login-screen .login-card > .auth-message,
.login-screen .login-card > small {
  grid-column: 2 !important;
}

.login-screen .login-card h1 {
  max-width: 9.5ch !important;
  margin: 0 !important;
  color: #071d49 !important;
  font-family: "Optima", Georgia, serif !important;
  font-size: clamp(1.95rem, 3.4vw, 2.95rem) !important;
  font-weight: 500 !important;
  line-height: 0.98 !important;
}

.login-screen .login-copy {
  max-width: 27ch !important;
  margin: 12px 0 0 !important;
  color: #526681 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.92rem !important;
  line-height: 1.38 !important;
}

.login-screen .auth-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 10px !important;
  padding: 5px !important;
  border-radius: 18px !important;
  background: rgba(7, 29, 73, 0.07) !important;
  border: 1px solid rgba(13, 52, 110, 0.08) !important;
}

.login-screen .auth-tab {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  color: #273b5f !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.login-screen .auth-tab.is-active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f56a6, #16a9bd) !important;
  box-shadow: 0 10px 24px rgba(17, 88, 181, 0.18) !important;
}

.login-screen .auth-panel.is-active {
  display: grid !important;
  gap: 6px !important;
}

.login-screen .login-card label {
  margin: 2px 0 0 !important;
  color: #52637c !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.login-screen .login-card input,
.login-screen .login-card select {
  min-height: 42px !important;
  padding: 10px 13px !important;
  border-radius: 15px !important;
  color: #172840 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.98rem !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(13, 52, 110, 0.15) !important;
}

.login-screen .remember-row {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 24px !important;
  margin: 2px 0 0 !important;
  color: #50627b !important;
  font-size: 0.88rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.login-screen .remember-row input {
  width: 16px !important;
  min-height: 16px !important;
}

.login-screen .login-card button[type="submit"],
.login-screen #registerButton,
.login-screen #forgotPasswordButton,
.login-screen #updatePasswordButton {
  min-height: 46px !important;
  margin-top: 6px !important;
  border-radius: 16px !important;
  color: #ffffff !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #1158b5, #11abc5) !important;
  box-shadow: 0 16px 30px rgba(17, 88, 181, 0.22) !important;
}

.login-screen .login-card > small {
  margin-top: 4px !important;
  color: #697b94 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

@media (max-width: 780px) {
  .login-screen {
    align-items: start !important;
    overflow: auto !important;
    padding: 12px !important;
  }

  .login-screen .login-graphic {
    display: none !important;
  }

  .login-screen .login-card {
    width: min(100%, 520px) !important;
    max-height: none !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 20px !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95)) !important;
  }

  .login-screen .login-card > * {
    grid-column: 1 !important;
  }

  .login-screen .login-logo {
    width: min(220px, 72vw) !important;
    margin-bottom: 6px !important;
  }

  .login-screen .login-card h1 {
    max-width: 100% !important;
    font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
  }

  .login-screen .login-copy {
    max-width: 100% !important;
    margin-top: 4px !important;
    font-size: 0.86rem !important;
  }
}

/* Final login redesign: compact above-the-fold private portal gate. */
.login-screen {
  min-height: 100svh !important;
  height: 100svh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(14px, 2.6vw, 28px) !important;
  overflow: hidden !important;
  color: #071d49 !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(140, 233, 255, 0.28), transparent 18rem),
    radial-gradient(circle at 84% 76%, rgba(87, 214, 163, 0.2), transparent 24rem),
    linear-gradient(135deg, #061638 0%, #0a3474 48%, #061c46 100%) !important;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 34px;
  pointer-events: none;
  background:
    linear-gradient(rgba(140, 233, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 233, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.login-graphic {
  position: absolute !important;
  inset: auto auto 7% 7% !important;
  width: min(38vw, 440px) !important;
  min-height: 0 !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  opacity: 0.52 !important;
  background:
    radial-gradient(circle, #ffffff 0 4%, #87ebff 5% 14%, #1e6fca 15% 34%, #061638 35% 48%, transparent 49%),
    conic-gradient(from 20deg, rgba(140, 233, 255, 0.14), rgba(255, 255, 255, 0.22), rgba(87, 214, 163, 0.14), rgba(140, 233, 255, 0.14)) !important;
  border: 1px solid rgba(140, 233, 255, 0.28) !important;
  box-shadow: 0 0 90px rgba(140, 233, 255, 0.18) !important;
}

.login-graphic span {
  display: none !important;
}

.login-card {
  position: relative !important;
  z-index: 1 !important;
  width: min(980px, calc(100vw - 32px)) !important;
  max-height: calc(100svh - 32px) !important;
  display: grid !important;
  grid-template-columns: minmax(240px, 0.82fr) minmax(320px, 1fr) !important;
  gap: clamp(20px, 3vw, 38px) !important;
  align-items: center !important;
  padding: clamp(22px, 3.2vw, 38px) !important;
  overflow: auto !important;
  color: #102345 !important;
  border-radius: 30px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0 39%, rgba(246, 250, 255, 0.96) 39% 100%),
    radial-gradient(circle at 92% 10%, rgba(140, 233, 255, 0.22), transparent 18rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 34px 90px rgba(0, 9, 33, 0.36) !important;
  backdrop-filter: blur(22px) !important;
}

/* Center and compact the preferred login design. */
.login-screen {
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(10px, 2vh, 20px) clamp(14px, 2.4vw, 28px) !important;
}

.login-card {
  width: min(900px, calc(100vw - 32px)) !important;
  max-height: calc(100svh - 24px) !important;
  gap: clamp(18px, 2.6vw, 30px) !important;
  padding: clamp(18px, 2.7vw, 30px) !important;
}

.login-card > .brand-mark.large {
  width: 52px !important;
  height: 52px !important;
  margin-bottom: 8px !important;
}

.login-card h1 {
  font-size: clamp(1.95rem, 3.4vw, 2.95rem) !important;
}

.login-copy {
  margin-top: 12px !important;
  font-size: 0.92rem !important;
  line-height: 1.38 !important;
}

.auth-tabs {
  margin-bottom: 10px !important;
}

.auth-tab {
  min-height: 38px !important;
  font-size: 0.88rem !important;
}

.auth-panel.is-active {
  gap: 6px !important;
}

.login-card input,
.login-card select {
  min-height: 42px !important;
}

.remember-row {
  min-height: 24px !important;
}

.login-card button[type="submit"],
#registerButton,
#forgotPasswordButton,
#updatePasswordButton {
  min-height: 46px !important;
  margin-top: 6px !important;
}

.login-card > small {
  font-size: 0.78rem !important;
}

.login-card > .brand-mark,
.login-card > .eyebrow,
.login-card > h1,
.login-card > .login-copy {
  grid-column: 1 !important;
}

.login-card > .brand-mark.large {
  width: 58px !important;
  height: 58px !important;
  margin: 0 0 12px !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(17, 88, 181, 0.22) !important;
}

.login-card > .eyebrow {
  margin: 0 0 8px !important;
  color: #1099bf !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
}

.login-card h1 {
  max-width: 9.5ch !important;
  margin: 0 !important;
  color: #071d49 !important;
  font-family: "Optima", Georgia, serif !important;
  font-size: clamp(2.05rem, 4vw, 3.35rem) !important;
  font-weight: 500 !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

.login-copy {
  max-width: 27ch !important;
  margin: 16px 0 0 !important;
  color: #526681 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.98rem !important;
  line-height: 1.48 !important;
}

.login-card > .auth-tabs,
.login-card > .auth-panel,
.login-card > .auth-message,
.login-card > small {
  grid-column: 2 !important;
}

.auth-tabs {
  align-self: end !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 14px !important;
  padding: 5px !important;
  border-radius: 18px !important;
  background: rgba(7, 29, 73, 0.07) !important;
  border: 1px solid rgba(13, 52, 110, 0.08) !important;
}

.auth-tab {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  color: #273b5f !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.auth-tab.is-active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f56a6, #16a9bd) !important;
  box-shadow: 0 10px 24px rgba(17, 88, 181, 0.18) !important;
}

.auth-panel.is-active {
  display: grid !important;
  gap: 8px !important;
  align-self: start !important;
}

.login-card label {
  margin: 2px 0 0 !important;
  color: #52637c !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.login-card input,
.login-card select {
  min-height: 46px !important;
  padding: 10px 13px !important;
  border-radius: 15px !important;
  color: #172840 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(13, 52, 110, 0.15) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

.remember-row {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 28px !important;
  margin: 2px 0 0 !important;
  color: #50627b !important;
  font-size: 0.88rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.remember-row input {
  width: 16px !important;
  min-height: 16px !important;
}

.remember-row span {
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-weight: 400 !important;
}

.login-card button[type="submit"],
#registerButton,
#forgotPasswordButton,
#updatePasswordButton {
  min-height: 50px !important;
  margin-top: 8px !important;
  border-radius: 16px !important;
  color: #ffffff !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  background: linear-gradient(135deg, #1158b5, #11abc5) !important;
  box-shadow: 0 16px 30px rgba(17, 88, 181, 0.22) !important;
}

.auth-message {
  min-height: 18px !important;
  margin: 4px 0 0 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}

.login-card > small {
  margin-top: 4px !important;
  color: #697b94 !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.82rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

@media (max-height: 760px) and (min-width: 781px) {
  .login-card {
    grid-template-columns: minmax(210px, 0.72fr) minmax(320px, 1fr) !important;
    padding: 20px 28px !important;
  }

  .login-card h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.7rem) !important;
  }

  .login-copy {
    font-size: 0.9rem !important;
    line-height: 1.35 !important;
  }

  .login-card input,
  .login-card select {
    min-height: 40px !important;
  }

  .login-card button[type="submit"],
  #registerButton,
  #forgotPasswordButton,
  #updatePasswordButton {
    min-height: 44px !important;
  }
}

@media (max-width: 780px) {
  .login-screen {
    align-items: start !important;
    padding: 12px !important;
    overflow: auto !important;
  }

  .login-graphic {
    display: none !important;
  }

  .login-card {
    width: min(100%, 520px) !important;
    max-height: none !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 20px !important;
    border-radius: 24px !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95)) !important;
  }

  .login-card > .brand-mark,
  .login-card > .eyebrow,
  .login-card > h1,
  .login-card > .login-copy,
  .login-card > .auth-tabs,
  .login-card > .auth-panel,
  .login-card > .auth-message,
  .login-card > small {
    grid-column: 1 !important;
  }

  .login-card > .brand-mark.large {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 2px !important;
  }

  .login-card h1 {
    max-width: 100% !important;
    font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
  }

  .login-copy {
    max-width: 100% !important;
    margin-top: 4px !important;
    font-size: 0.86rem !important;
    line-height: 1.35 !important;
  }

  .auth-tabs {
    margin-top: 4px !important;
  }
}

/* Match the refined schedule typography in the main header. */
.topbar,
.topbar-actions a,
.topbar-actions button,
.nav-list a,
.signout-button {
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

.topbar strong,
.brand-lockup h1 {
  font-family: "Optima", Georgia, serif !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

.topbar .eyebrow,
.brand-lockup .eyebrow {
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif) !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
}

.compliance-badge,
.compliance-badge span,
.compliance-badge strong {
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* Refined on-call landing page. */
.hero {
  position: relative !important;
  min-height: calc(100svh - 142px) !important;
  max-width: 1480px !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px) !important;
  gap: clamp(28px, 4.5vw, 72px) !important;
  align-items: center !important;
  padding: clamp(28px, 4vw, 54px) !important;
  overflow: hidden !important;
  border-radius: 34px !important;
  background:
    linear-gradient(120deg, rgba(5, 18, 45, 0.94), rgba(12, 50, 106, 0.86)),
    radial-gradient(circle at 18% 20%, rgba(140, 233, 255, 0.2), transparent 20rem),
    radial-gradient(circle at 82% 80%, rgba(87, 214, 163, 0.16), transparent 22rem) !important;
  border: 1px solid rgba(140, 233, 255, 0.18) !important;
  box-shadow: 0 34px 90px rgba(2, 16, 43, 0.34) !important;
}

.hero::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(rgba(140, 233, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 233, 255, 0.07) 1px, transparent 1px) !important;
  background-size: 58px 58px !important;
  mask-image: linear-gradient(90deg, black, transparent 78%) !important;
  opacity: 0.7 !important;
}

.hero > * {
  position: relative !important;
  z-index: 1 !important;
}

.hero-copy {
  display: grid !important;
  align-content: center !important;
  justify-self: start !important;
  max-width: 760px !important;
  padding: 0 !important;
}

.hero .eyebrow {
  color: #8ce9ff !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
}

.hero h2 {
  max-width: 780px !important;
  margin: 4px 0 0 !important;
  color: #ffffff !important;
  font-family: "Optima", Georgia, serif !important;
  font-size: clamp(2.7rem, 5vw, 5.55rem) !important;
  font-weight: 500 !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

#heroCallMeta {
  max-width: 620px !important;
  margin: 16px 0 0 !important;
  color: rgba(255, 255, 255, 0.78) !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: clamp(0.98rem, 1.2vw, 1.15rem) !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}

.hospital-strip {
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 20px !important;
  padding: 8px 11px !important;
  border-radius: 999px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  background: rgba(255, 255, 255, 0.09) !important;
  border: 1px solid rgba(140, 233, 255, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.hospital-strip span {
  padding: 0 !important;
  color: inherit !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  background: transparent !important;
  border: 0 !important;
}

.adjacent-call-weeks {
  width: min(100%, 680px) !important;
  margin-top: 18px !important;
  gap: 12px !important;
}

.adjacent-week-card {
  min-height: 82px !important;
  padding: 12px !important;
  border-radius: 22px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)),
    rgba(3, 17, 43, 0.48) !important;
  border-color: rgba(140, 233, 255, 0.22) !important;
}

.adjacent-week-card span,
.call-progress-card span {
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-weight: 600 !important;
  letter-spacing: 0.13em !important;
}

.adjacent-week-card strong,
.call-progress-card strong {
  font-family: "Optima", Georgia, serif !important;
  font-weight: 500 !important;
}

.adjacent-week-card small {
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-weight: 400 !important;
}

.hero-contact-row {
  margin-top: 18px !important;
  gap: 12px !important;
}

.hero-contact-row a,
.hero-contact-row button {
  min-height: 48px !important;
  padding: 0 18px !important;
  border-radius: 16px !important;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif) !important;
  font-size: 0.98rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 16px 34px rgba(2, 16, 43, 0.18) !important;
}

.hero-contact-row .call-button {
  background: linear-gradient(135deg, #20bfa5, #2f82e6) !important;
}

.hero-portrait-stack {
  width: min(390px, 28vw) !important;
  min-width: 300px !important;
  justify-self: end !important;
  gap: 12px !important;
}

.hero-portrait-stack .hero-doctor-portrait {
  height: clamp(330px, 47vh, 480px) !important;
  padding: 12px !important;
  border-radius: 30px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 255, 0.94)) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 24px 60px rgba(2, 16, 43, 0.26) !important;
}

.hero-doctor-portrait img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 22px !important;
  background: #ffffff !important;
}

.call-progress-card {
  padding: 13px 14px !important;
  border-radius: 22px !important;
  background: rgba(4, 18, 45, 0.72) !important;
  border-color: rgba(140, 233, 255, 0.2) !important;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    min-height: auto !important;
  }

  .hero-portrait-stack {
    order: -1 !important;
    width: min(360px, 80vw) !important;
    min-width: 0 !important;
    justify-self: center !important;
  }

  .hero-copy {
    justify-self: center !important;
    text-align: center !important;
  }

  .hospital-strip,
  .adjacent-call-weeks,
  .hero-contact-row {
    justify-self: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 760px) {
  .hero {
    width: calc(100vw - 16px) !important;
    padding: 14px !important;
    border-radius: 24px !important;
  }

  .hero-portrait-stack .hero-doctor-portrait {
    height: min(38svh, 300px) !important;
    min-height: 210px !important;
    border-radius: 22px !important;
  }

  .hero h2 {
    font-size: clamp(2rem, 11vw, 3.25rem) !important;
  }

  #heroCallMeta {
    margin-top: 8px !important;
    font-size: 0.9rem !important;
  }

  .adjacent-call-weeks {
    grid-template-columns: 1fr !important;
  }
}

/* Absolute final phone-only directory portrait alignment. */
@media (max-width: 760px) {
  .directory-profile[data-doctor="mehta"] .directory-photo,
  .directory-profile[data-doctor="schmidt"] .directory-photo,
  .directory-profile[data-doctor="remington"] .directory-photo,
  .directory-profile[data-doctor="fogg"] .directory-photo {
    place-items: center !important;
  }

  .directory-profile[data-doctor="mehta"] .directory-photo img,
  .directory-profile[data-doctor="remington"] .directory-photo img,
  .directory-profile[data-doctor="fogg"] .directory-photo img {
    width: 90% !important;
    max-width: 90% !important;
    height: 90% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  .directory-profile[data-doctor="schmidt"] .directory-photo img {
    width: auto !important;
    max-width: 78% !important;
    height: 94% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }
}

/* Final phone-only directory portrait alignment. */
@media (max-width: 760px) {
  .directory-profile[data-doctor="mehta"] .directory-photo,
  .directory-profile[data-doctor="schmidt"] .directory-photo,
  .directory-profile[data-doctor="remington"] .directory-photo,
  .directory-profile[data-doctor="fogg"] .directory-photo {
    place-items: center !important;
  }

  .directory-profile[data-doctor="mehta"] .directory-photo img,
  .directory-profile[data-doctor="remington"] .directory-photo img,
  .directory-profile[data-doctor="fogg"] .directory-photo img {
    width: 90% !important;
    max-width: 90% !important;
    height: 90% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  .directory-profile[data-doctor="schmidt"] .directory-photo img {
    width: auto !important;
    max-width: 78% !important;
    height: 94% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }
}

/* Smooth mobile collapse: full header at top, compact title bar while scrolling. */
@media (max-width: 760px) {
  .topbar {
    position: sticky;
    top: 6px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    width: calc(100vw - 16px);
    max-height: 132px;
    margin: 0 auto 8px;
    padding: 10px;
    overflow: hidden;
    border-radius: 16px;
    opacity: 1;
    background:
      linear-gradient(135deg, rgba(7, 21, 47, 0.95), rgba(16, 42, 86, 0.92));
    border: 1px solid rgba(140, 233, 255, 0.18);
    box-shadow: 0 18px 42px rgba(3, 16, 41, 0.22);
    transform: translateY(0);
    backdrop-filter: blur(18px);
    transition:
      max-height 260ms ease,
      padding 260ms ease,
      border-radius 260ms ease,
      box-shadow 260ms ease,
      background-color 260ms ease,
      transform 260ms ease;
  }

  .topbar > div:first-child {
    display: block;
    min-width: 0;
    transition: transform 240ms ease;
  }

  .topbar .eyebrow {
    display: block;
    max-height: 18px;
    margin-bottom: 1px;
    opacity: 1;
    overflow: hidden;
    color: #8ce9ff;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    transition: max-height 240ms ease, opacity 180ms ease, margin 240ms ease;
  }

  .topbar strong {
    display: block;
    max-width: 46vw;
    overflow: hidden;
    color: white;
    font-family: var(--font-display);
    font-size: 0.98rem;
    line-height: 1.05;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: max-width 240ms ease, font-size 240ms ease, opacity 180ms ease;
  }

  .topbar strong::before {
    content: none;
  }

  .compliance-badge {
    display: inline-flex;
    justify-self: end;
    max-width: 43vw;
    gap: 6px;
    padding: 6px 8px 6px 6px;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    transition:
      max-width 240ms ease,
      padding 240ms ease,
      opacity 180ms ease,
      transform 240ms ease;
  }

  .compliance-badge::before {
    width: 22px;
    height: 22px;
    transition: width 240ms ease, height 240ms ease;
  }

  .compliance-badge span {
    display: inline;
    font-size: 0.62rem;
  }

  .compliance-badge strong {
    display: none;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    max-height: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 3px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    transition:
      max-height 240ms ease,
      padding 240ms ease,
      opacity 180ms ease,
      transform 240ms ease,
      gap 240ms ease;
  }

  .topbar-actions a,
  .topbar-actions button {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1;
    opacity: 1;
    transition: padding 240ms ease, font-size 240ms ease, opacity 180ms ease;
  }

  body.is-mobile-header-compact .topbar {
    max-height: 42px;
    padding: 8px 12px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(3, 16, 41, 0.24);
    transform: translateY(-1px);
  }

  body.is-mobile-header-compact .topbar > div:first-child {
    transform: translateY(0);
  }

  body.is-mobile-header-compact .topbar .eyebrow {
    max-height: 0;
    margin: 0;
    opacity: 0;
  }

  body.is-mobile-header-compact .topbar strong {
    max-width: 100%;
    color: transparent;
    font-size: 0;
    text-align: center;
  }

  body.is-mobile-header-compact .topbar strong::before {
    content: "California Eye Institute Call Hub";
    color: white;
    font-family: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0;
  }

  body.is-mobile-header-compact .compliance-badge {
    max-width: 0;
    padding: 0;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
  }

  body.is-mobile-header-compact .compliance-badge::before {
    width: 0;
    height: 0;
  }

  body.is-mobile-header-compact .topbar-actions {
    max-height: 0;
    gap: 0;
    padding: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
  }

  body.is-mobile-header-compact .topbar-actions a,
  body.is-mobile-header-compact .topbar-actions button {
    padding-top: 0;
    padding-bottom: 0;
    font-size: 0.7rem;
    opacity: 0;
  }
}

/* Refined professional typography for Call Change and Messages. */
.change-date-section,
.messages-section {
  --professional-text: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

.change-date-section .lookup-panel,
.change-date-section .correction-panel,
.change-date-section input,
.change-date-section select,
.change-date-section button,
.messages-section,
.messages-section input,
.messages-section button {
  font-family: var(--professional-text);
}

.change-date-section .lookup-panel > label,
.change-date-section .correction-panel h3,
.change-date-section .week-edit-summary strong,
.messages-section .conversation-heading span,
.messages-section .message-bubble strong {
  font-family: "Optima", "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0;
}

.change-date-section .lookup-panel > label {
  font-size: clamp(1.15rem, 2vw, 1.38rem);
}

.change-date-section .correction-panel h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.week-edit-grid span,
.manual-scope legend,
.manual-scope label,
.manual-days-panel label,
.week-edit-summary span,
.week-edit-summary small,
.week-doctor-card span,
.week-doctor-card small,
.week-edit-summary em,
.message-banner,
.messages-section .message-bubble small,
.messages-section .message-delete {
  font-family: var(--professional-text);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.week-edit-grid span,
.manual-scope legend,
.week-doctor-card span {
  color: #6d7890;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.manual-scope label,
.manual-days-panel label {
  color: #263755;
}

.change-date-section input,
.change-date-section select,
.messages-section input {
  color: #182840;
  font-family: var(--professional-text);
  font-size: 1rem;
  font-weight: 400;
}

.compose-bar input {
  font-family: var(--professional-text);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.message-bubble p,
.empty-board {
  color: #314159;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: 0;
}

.messages-section .message-bubble strong {
  color: #13284b;
  font-size: 0.96rem;
}

.messages-section .conversation-heading strong {
  color: #65718a;
  font-family: var(--professional-text);
  font-weight: 400;
}

/* Polished schedule and login refresh. */
.login-screen {
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 560px);
  gap: clamp(28px, 5vw, 76px);
  background:
    radial-gradient(circle at 18% 16%, rgba(140, 233, 255, 0.24), transparent 20rem),
    radial-gradient(circle at 78% 78%, rgba(87, 214, 163, 0.2), transparent 24rem),
    linear-gradient(135deg, #06183b 0%, #0a3576 52%, #082452 100%);
}

.login-graphic {
  min-height: min(62vh, 560px);
  border-radius: 34px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    linear-gradient(rgba(140, 233, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 233, 255, 0.1) 1px, transparent 1px);
  background-size: auto, 54px 54px, 54px 54px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 30px 90px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.login-graphic::before,
.login-graphic::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-graphic::before {
  width: 360px;
  height: 360px;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  background:
    radial-gradient(circle, #ffffff 0 4%, #86e9ff 5% 13%, #155db5 14% 34%, #06183b 35% 47%, transparent 48%),
    conic-gradient(from 30deg, rgba(140, 233, 255, 0.08), rgba(255, 255, 255, 0.28), rgba(87, 214, 163, 0.18), rgba(140, 233, 255, 0.08));
  box-shadow: 0 0 90px rgba(140, 233, 255, 0.28);
}

.login-graphic::after {
  width: 76%;
  height: 76%;
  left: 12%;
  top: 12%;
  border: 1px solid rgba(140, 233, 255, 0.3);
  box-shadow: inset 0 0 80px rgba(140, 233, 255, 0.08);
}

.login-card {
  position: relative;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(243, 248, 255, 0.93)),
    radial-gradient(circle at 100% 0%, rgba(140, 233, 255, 0.25), transparent 15rem);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 34px 90px rgba(0, 11, 36, 0.34);
}

.login-card h1 {
  max-width: 12ch;
  font-size: clamp(2.1rem, 4.7vw, 3.55rem);
  letter-spacing: 0;
}

.login-copy {
  max-width: 44rem;
  color: #546783;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 1.04rem;
}

.auth-tabs {
  gap: 7px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(13, 52, 110, 0.07);
  border: 1px solid rgba(13, 52, 110, 0.08);
}

.auth-tab,
.login-card button {
  font-family: "Optima", "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-tab {
  margin: 0;
  color: #243a5d;
  border-radius: 14px;
}

.auth-tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #155db5, #1ebaa2);
}

.login-card label {
  color: #21385d;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card input,
.login-card select {
  min-height: 50px;
  border-radius: 16px;
  color: #182840;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 1rem;
  border-color: rgba(13, 52, 110, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-card button[type="submit"],
#registerButton,
#forgotPasswordButton,
#updatePasswordButton {
  min-height: 54px;
  border-radius: 16px;
  font-size: 1.05rem;
  box-shadow: 0 16px 30px rgba(17, 88, 181, 0.22);
}

.schedule-section {
  padding: clamp(22px, 3vw, 34px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 94% 8%, rgba(140, 233, 255, 0.32), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92));
}

.schedule-section .section-header {
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(13, 52, 110, 0.1);
}

.schedule-section .section-header h2 {
  margin-top: 4px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.95;
}

.schedule-section .controls {
  padding: 6px;
  border-radius: 999px;
  background: rgba(7, 29, 73, 0.06);
  border: 1px solid rgba(13, 52, 110, 0.08);
}

.schedule-section .filter-button {
  min-width: 48px;
  border-radius: 999px;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-weight: 500;
  border: 0;
  background: transparent;
}

.schedule-section .filter-button.is-active {
  background: linear-gradient(135deg, #0b2f6c, #2f82e6);
  box-shadow: 0 10px 20px rgba(17, 88, 181, 0.18);
}

.schedule-section .table-wrap {
  margin-top: 20px;
  overflow: auto;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(13, 52, 110, 0.1);
  box-shadow: 0 20px 50px rgba(9, 45, 102, 0.08);
}

.schedule-section table {
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0 12px;
  padding: 0 14px 14px;
}

.schedule-section thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 18px 12px 8px;
  color: #687894;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-weight: 600;
  background: rgba(248, 252, 255, 0.94);
  backdrop-filter: blur(10px);
}

.schedule-section td {
  padding: 10px 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.7);
  vertical-align: middle;
}

.schedule-section tbody tr td:first-child {
  border-radius: 20px 0 0 20px;
}

.schedule-section tbody tr td:last-child {
  border-radius: 0 20px 20px 0;
}

.schedule-section tbody tr {
  filter: drop-shadow(0 12px 24px rgba(9, 45, 102, 0.07));
}

.schedule-section tbody tr:hover td {
  background: rgba(238, 249, 255, 0.92);
}

.schedule-section tr.is-current td {
  background: rgba(222, 247, 255, 0.92);
}

.schedule-week-card {
  display: grid;
  gap: 5px;
  min-width: 158px;
  padding: 14px 12px;
}

.schedule-week-card span {
  color: #2087a8;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.schedule-week-card strong {
  color: #0a214e;
  font-family: "Optima", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.12;
}

.schedule-week-card small,
.schedule-notes .muted {
  color: #6a7890;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 0.84rem;
  font-weight: 400;
}

.schedule-section .coverage-card {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  min-width: 250px;
  min-height: 104px;
  padding: 12px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--doctor-color) 42%, transparent), transparent 8rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.schedule-section td[colspan="2"] .coverage-card {
  min-width: 430px;
}

.schedule-doctor-photo {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(9, 45, 102, 0.14);
}

.schedule-doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.schedule-section .coverage-card span {
  color: #6b7890;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.schedule-section .coverage-card strong {
  display: block;
  color: #102954;
  font-family: "Optima", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-section .coverage-card small {
  display: block;
  margin-top: 5px;
  color: #66758d;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 0.82rem;
  font-weight: 400;
}

.schedule-notes {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.schedule-section .note {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  color: #244061;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 235, 165, 0.76);
  border: 1px solid rgba(160, 119, 14, 0.16);
}

.schedule-edit-action {
  min-width: 72px;
  border-radius: 999px;
  font-family: var(--professional-text, "Avenir Next", Avenir, "Segoe UI", sans-serif);
  font-weight: 500;
  background: rgba(17, 88, 181, 0.1);
  border: 1px solid rgba(17, 88, 181, 0.16);
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .login-graphic {
    display: none;
  }

  .login-card {
    width: min(100%, 560px);
    margin-inline: auto;
  }

  .schedule-section .section-header {
    display: grid;
  }
}

@media (max-width: 620px) {
  .login-screen {
    padding: 16px;
  }

  .login-card {
    padding: 22px;
    border-radius: 24px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .schedule-section {
    padding: 18px;
    border-radius: 24px;
  }

  .schedule-section .controls {
    width: 100%;
    justify-content: space-between;
  }
}

/* Mobile header should keep the full options at the top, then scroll away naturally. */
@media (max-width: 760px) {
  .topbar,
  body.is-mobile-header-compact .topbar {
    position: relative;
    top: auto;
    z-index: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    width: calc(100vw - 16px);
    min-height: 0;
    margin: 0 auto 8px;
    padding: 10px;
    overflow: visible;
    border-radius: 16px;
    opacity: 1;
    background:
      linear-gradient(135deg, rgba(7, 21, 47, 0.95), rgba(16, 42, 86, 0.92));
    border: 1px solid rgba(140, 233, 255, 0.18);
    box-shadow: 0 18px 42px rgba(3, 16, 41, 0.22);
    transform: none;
    backdrop-filter: blur(18px);
  }

  .topbar > div:first-child,
  body.is-mobile-header-compact .topbar > div:first-child {
    display: block;
    min-width: 0;
  }

  .topbar .eyebrow,
  body.is-mobile-header-compact .topbar .eyebrow {
    display: block;
    max-height: none;
    margin-bottom: 1px;
    opacity: 1;
    overflow: visible;
    color: #8ce9ff;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
  }

  .topbar strong,
  body.is-mobile-header-compact .topbar strong {
    display: block;
    max-width: 46vw;
    overflow: hidden;
    color: white;
    font-family: var(--font-display);
    font-size: 0.98rem;
    line-height: 1.05;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar strong::before,
  body.is-mobile-header-compact .topbar strong::before {
    content: none;
  }

  .compliance-badge,
  body.is-mobile-header-compact .compliance-badge {
    display: inline-flex;
    justify-self: end;
    max-width: 43vw;
    gap: 6px;
    padding: 6px 8px 6px 6px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .compliance-badge::before,
  body.is-mobile-header-compact .compliance-badge::before {
    width: 22px;
    height: 22px;
  }

  .compliance-badge span,
  body.is-mobile-header-compact .compliance-badge span {
    display: inline;
    font-size: 0.62rem;
  }

  .compliance-badge strong,
  body.is-mobile-header-compact .compliance-badge strong {
    display: none;
  }

  .topbar-actions,
  body.is-mobile-header-compact .topbar-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 3px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar-actions a,
  .topbar-actions button,
  body.is-mobile-header-compact .topbar-actions a,
  body.is-mobile-header-compact .topbar-actions button {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1;
    opacity: 1;
  }
}

/* Absolute final mobile header rule: options visible at top, contracting with scroll. */
@media (max-width: 760px) {
  body .topbar,
  body.is-mobile-header-compact .topbar {
    position: sticky !important;
    top: 6px !important;
    z-index: 1000 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: var(--mobile-header-gap-row, 8px) 10px !important;
    align-items: center !important;
    width: calc(100vw - 16px) !important;
    max-height: var(--mobile-header-height, 150px) !important;
    min-height: 0 !important;
    margin: 0 auto 8px !important;
    padding: var(--mobile-header-pad-y, 10px) 10px !important;
    overflow: hidden !important;
    border-radius: var(--mobile-header-radius, 16px) !important;
    opacity: 1 !important;
    isolation: isolate !important;
    background: linear-gradient(135deg, #07152f, #102a56) !important;
    border: 1px solid rgba(140, 233, 255, 0.18) !important;
    box-shadow: 0 18px 42px rgba(3, 16, 41, 0.26) !important;
    transform: none !important;
    backdrop-filter: blur(18px) !important;
  }

  body .topbar > div:first-child,
  body.is-mobile-header-compact .topbar > div:first-child {
    display: block !important;
    min-width: 0 !important;
  }

  body .topbar .eyebrow,
  body.is-mobile-header-compact .topbar .eyebrow {
    display: block !important;
    max-height: var(--mobile-eyebrow-height, 14px) !important;
    margin: 0 0 1px !important;
    overflow: hidden !important;
    opacity: var(--mobile-eyebrow-opacity, 1) !important;
    color: #8ce9ff !important;
    font-size: 0.55rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.12em !important;
  }

  body .topbar strong,
  body.is-mobile-header-compact .topbar strong {
    display: block !important;
    max-width: var(--mobile-title-width, 46vw) !important;
    overflow: hidden !important;
    color: white !important;
    font-family: var(--font-display) !important;
    font-size: var(--mobile-title-size, 0.98rem) !important;
    line-height: 1.05 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body .topbar strong::before,
  body.is-mobile-header-compact .topbar strong::before {
    content: none !important;
  }

  body .compliance-badge,
  body.is-mobile-header-compact .compliance-badge {
    display: inline-flex !important;
    justify-self: end !important;
    max-width: var(--mobile-badge-width, 43vw) !important;
    gap: 6px !important;
    padding: 6px 8px 6px 6px !important;
    overflow: hidden !important;
    opacity: var(--mobile-badge-opacity, 1) !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body .compliance-badge::before,
  body.is-mobile-header-compact .compliance-badge::before {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
  }

  body .compliance-badge span,
  body.is-mobile-header-compact .compliance-badge span {
    display: inline !important;
    font-size: 0.62rem !important;
    white-space: nowrap !important;
  }

  body .compliance-badge strong,
  body.is-mobile-header-compact .compliance-badge strong {
    display: none !important;
  }

  body .topbar-actions,
  body.is-mobile-header-compact .topbar-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: var(--mobile-nav-height, 80px) !important;
    overflow: hidden !important;
    padding: 2px 0 3px !important;
    opacity: var(--mobile-nav-opacity, 1) !important;
    transform: translateY(var(--mobile-nav-y, 0)) !important;
    pointer-events: auto !important;
    scrollbar-width: none !important;
  }

  body .topbar-actions a,
  body .topbar-actions button,
  body.is-mobile-header-compact .topbar-actions a,
  body.is-mobile-header-compact .topbar-actions button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: var(--mobile-nav-button-height, 34px) !important;
    padding: var(--mobile-nav-button-pad-y, 7px) var(--mobile-nav-button-pad-x, 6px) !important;
    border-radius: var(--mobile-nav-button-radius, 13px) !important;
    font-size: var(--mobile-nav-button-size, 0.68rem) !important;
    line-height: 1 !important;
    opacity: 1 !important;
    text-align: center !important;
    white-space: normal !important;
  }
}
