:root {
  --app-font-family: "Inter", "Segoe UI", sans-serif;
  --app-width: 1700px;
  --app-padding-x: 100px;  /*left/right padding */
  --app-scrollbar-thumb: #c7d0df;
  --app-scrollbar-thumb-hover: #94a3b8;
  --modal-backdrop-bg: rgba(3, 7, 18, 0.62);
  --modal-backdrop-blur: blur(4px);
}

html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--app-font-family);
  background: #eaf4ff;
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--app-scrollbar-thumb) transparent;
}

*:hover {
  scrollbar-color: var(--app-scrollbar-thumb-hover) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--app-scrollbar-thumb);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--app-scrollbar-thumb-hover);
  background-clip: content-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* ===== Top Navigation Bar (full width, aligned to page) ===== */
.main-nav {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0; /* keep padding on nav-inner */
  position: sticky;
  top: 0;
  z-index: 2000;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.nav-item-with-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* The green pill */
.nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;

  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;

  background: #bbf7d0;
  color: #166534;
  opacity: 0.3;

  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.18);
  border-radius: 999px;
  line-height: 1;

  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-item.active .nav-badge {
  background: #22c55e;
  color: white;
  opacity: 1;
}

.project-switcher{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5eaf2;
}

.project-switcher-control{
  position: relative;
  display: inline-block;
}

.project-switcher-toggle{
  min-width: 220px;
  max-width: 280px;
  height: 38px;
  padding: 0 42px 0 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #ffffff;

  font-size: 13px;
  font-weight: 600;
  color: #111827;
  text-align: center;

  cursor: pointer;
  list-style: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.project-switcher-toggle::-webkit-details-marker {
  display: none;
}

.project-switcher-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-switcher-control::after{
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-50%) rotate(-135deg);
  transition: transform 0.15s ease, color 0.15s ease;
  pointer-events: none;
  color: #64748b;
}

.project-switcher-control[open]::after{
  color: #2b4cff;
  transform: translateY(-50%) rotate(-45deg);
  animation: projectSwitcherChevronOpen 0.22s ease;
}

@keyframes projectSwitcherChevronOpen {
  0% {
    transform: translateY(-50%) rotate(-135deg);
  }
  70% {
    transform: translateY(-50%) rotate(-32deg);
  }
  100% {
    transform: translateY(-50%) rotate(-45deg);
  }
}

.project-switcher-toggle:hover,
.project-switcher-control[open] .project-switcher-toggle{
  background: #e9eefc;
  border-color: #b8c7ff;
  color: #2b4cff;
}

.project-switcher-toggle:focus-visible{
  outline: none;
  border-color: #2b4cff;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.13);
}

.project-switcher-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  max-width: min(420px, calc(100vw - 32px));

  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;

  transition:
  opacity 0.18s ease,
  transform 0.18s ease;

  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  z-index: 2100;
}

.project-switcher-control[open] .project-switcher-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.project-switcher-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  box-sizing: border-box;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.project-switcher-option:hover,
.project-switcher-option:focus-visible,
.project-switcher-option.is-active {
  background: #e9eefc;
  color: #2b4cff;
}

.project-switcher-option:focus-visible {
  outline: 0;
}

.project-switcher-option.is-active {
  font-weight: 800;
}

.project-switcher-option--all {
  margin-bottom: 6px;
  color: #2b4cff;
  font-weight: 800;
}

.project-switcher-fallback{
  font-size: 10px;
  font-weight: 700;
  color: #111827;
}

.dashboard-home-link {
  min-width: 96px;
  height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #ffffff;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dashboard-home-link:hover,
.dashboard-home-link:focus-visible {
  background: #e9eefc;
  border-color: #b8c7ff;
  color: #2b4cff;
  transform: translateY(-1px);
}

.dashboard-home-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.13);
}

.header-subtitle{
  min-height: 12px;   /* 👈 matches one line of small text */
}


/* Inner container matches .page width so edges align */
.nav-inner {
  max-width: var(--app-width);
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  padding-left: 20px;    /* custom left gap */
  padding-right: 20px;   /* custom right gap */

  display: flex;
  align-items: center;
  justify-content: space-between;

  flex-wrap: nowrap;   /* ✅ prevent title dropping */
  gap: 16px;           /* ✅ gives breathing space */
}

.nav-inner--dashboard {
  max-width: none;
  margin: 0;
  padding-left: 20px;
  padding-right: 20px;
}

.global-flash {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2600;
  width: min(720px, calc(100% - 32px));
  box-sizing: border-box;
  margin: 0;
  padding: 15px 20px;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
  animation: globalFlashLifecycle 5s ease forwards;
}

.global-flash--success {
  background: #2fd14a;
  color: #ffffff;
}

.global-flash--error {
  background: #fff4f4;
  color: #b42318;
}

@keyframes globalFlashLifecycle {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px);
  }
  8%,
  82% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 18px);
    visibility: hidden;
  }
}

/* Reduce huge side padding on smaller screens */
@media (max-width: 1100px) {
  .nav-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
}


.nav-left {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 16px);

  min-width: 0;        /* ✅ CRITICAL in flex layouts */
  flex: 1 1 auto;      /* ✅ allow left to shrink */
  flex-wrap: nowrap;
}

.project-switcher--left .project-switcher-toggle {
  width: 280px;
  max-width: 280px;
}

.nav-left--dashboard {
  flex: 1 1 auto;
  width: 100%;
  gap: 14px;
}

.nav-left--researcher-dashboard-home {
  flex: 1 1 auto;
  width: 100%;
}

.nav-left--researcher-dashboard-home .dashboard-nav-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-nav-title {
  display: inline-block;
  margin-left: 0;
  font-family: var(--app-font-family);
  font-size: 25px;
  font-weight: 640;
  line-height: 1.5;
  color: #172033;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ===== Nav Tabs ===== */
.nav-item {
  display: inline-flex;          /* 👈 key */
  align-items: center;           /* vertical center */
  justify-content: center;       /* horizontal center */

  
  font-family: var(--app-font-family);
  font-size: 20px;              /* BIG text (from your first script) */
  font-weight: 600;
  color: #555;
  text-decoration: none;
  white-space: nowrap;  /* 👈 key fix */

  padding: 10px 15px;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;

  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #f1f5ff 0%, #e7eeff 100%);
  box-shadow: inset 0 0 0 1px rgba(43, 76, 255, 0.18), 0 6px 14px rgba(43, 76, 255, 0.12);
  color: #2b4cff;
}

.nav-item:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.16);
}

.nav-item.active {
  background: #e9eefc;
  color: #2b4cff;
}

/* ===== Right side App Title ===== */
.nav-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;             /* helps ellipsis work */
  margin-left: auto;
  justify-content: flex-end;
  gap: 10px;
}

.nav-right--dashboard {
  gap: 12px;
}

.nav-right--dashboard .nav-tabs:empty {
  display: none;
}

.nav-right--researcher-dashboard-home {
  margin-left: auto;
  justify-content: flex-end;
}

.nav-owner-initials-toggle {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(43, 76, 255, 0.16);
  border-radius: 50%;
  background: linear-gradient(180deg, #f8fbff 0%, #e9eefc 100%);
  color: #2b4cff;
  font-family: var(--app-font-family);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(43, 76, 255, 0.1);
}

.nav-owner-initials-text {
  transform: translateY(0);
}

.notification-center {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.notification-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #172033;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.notification-toggle::-webkit-details-marker {
  display: none;
}

.notification-toggle:hover,
.notification-center[open] .notification-toggle {
  background: #e9eefc;
  color: #2b4cff;
}

.notification-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.16);
}

.notification-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-toggle--has-unread .notification-icon {
  animation: notificationBellRing 1.4s ease-in-out infinite;
  transform-origin: 50% 12%;
}

@keyframes notificationBellRing {
  0%,
  45%,
  100% {
    transform: rotate(0deg);
  }
  8%,
  24% {
    transform: rotate(14deg);
  }
  16%,
  32% {
    transform: rotate(-14deg);
  }
  38% {
    transform: rotate(7deg);
  }
}

.notification-count {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 96px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  z-index: 2100;
}

.notification-center[open] .notification-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: notificationDropdownIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notificationDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #eef2f7;
}

.notification-title {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.notification-subtitle {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.notification-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.notification-action-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #2b4cff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.notification-action-button:hover,
.notification-action-button:focus-visible {
  border-color: #bfd0ff;
  background: #eef4ff;
  outline: 0;
}

.notification-action-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.notification-filter {
  position: relative;
}

.notification-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 3;
  min-width: 220px;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-filter-menu[hidden] {
  display: none !important;
}

.notification-filter-option {
  display: inline-flex;
  flex-direction: row; /* force horizontal */
  align-items: center;
  gap: 2px;
  min-height: 30px;
  padding: 0 4px;
  border-radius: 6px;
  color: #111827;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  width: fit-content; /* important */
  white-space: nowrap;
}

.notification-filter-option:hover {
  background: #f4f7ff;
}

.notification-filter-option input {
  width: 14px;
  height: 14px;
  accent-color: #2b4cff;
}

.notification-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
}

.notification-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  max-height: 180px;
  padding: 10px;
  overflow: hidden;
  border-radius: 10px;
  color: #111827;
  opacity: 1;
  text-decoration: none;
  transform: translateY(0);
  transition:
    max-height 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.16s ease,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.15s ease;
}

.notification-item:hover,
.notification-item:focus-visible {
  background: #f4f7ff;
  outline: 0;
}

.notification-item.is-unread {
  background: #f8fbff;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: transparent;
}

.notification-item.is-unread .notification-dot {
  background: #2b4cff;
}

.notification-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notification-item-title {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.notification-item-body {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.notification-time {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.notification-empty {
  padding: 28px 16px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.notification-search-wrap {
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
}

.notification-search {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.notification-search:focus {
  outline: 0;
  border-color: #2b4cff;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.12);
}

.notification-footer {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

.notification-footer button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: #2b4cff;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.notification-footer button:hover,
.notification-footer button:focus-visible {
  background: #2340dc;
  box-shadow: 0 8px 18px rgba(43, 76, 255, 0.18);
  outline: 0;
}

.notification-footer button:active {
  transform: scale(0.98);
}

.notification-footer button:disabled {
  opacity: 0.55;
  cursor: default;
}

.notification-item.is-hidden-read {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
  .notification-panel,
  .notification-center[open] .notification-panel,
  .notification-item,
  .notification-toggle--has-unread .notification-icon,
  .notification-footer button {
    animation: none;
    transition: none;
  }
}

.dashboard-user-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: min(260px, 24vw);
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  background: #fff;
  color: #172033;
  text-decoration: none;
  font-family: var(--app-font-family);
  font-size: 20px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.dashboard-user-link[href]:hover,
.dashboard-user-link[href]:focus-visible {
  color: #2b4cff;
  transform: translateY(-1px);
}

.dashboard-user-link[href]:focus-visible {
  outline: 3px solid rgba(43, 76, 255, 0.24);
  outline-offset: 3px;
}


.app-title {
  font-family: var(--app-font-family);

  /* Fluid font size */
  font-size: clamp(16px, 1.6vw, 30px);

  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.25;
  margin: 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* Fluid max width */
  max-width: clamp(220px, 45vw, 700px);
}

.title-short { display: none; }

@media (max-width: 1200px) {
  .app-title {
    font-size: 18px;
    max-width: 160px;
    color: transparent;
    position: relative;
  }

  .app-title::before {
    content: "VFAMS";
    color: #111;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
  }
}



/* ===== Page Content Area (centered, max width) ===== */
.page {
  max-width: var(--app-width);
  margin: 0 auto;
  padding: 24px var(--app-padding-x) 48px; /* top | left-right | bottom */
}

.project-wide-shell {
  width: calc(100% + 100px);
  margin-inline: -50px;
}

.project-wide-shell .card {
  margin-inline: 0;
}

.page-header {
  margin-bottom: 24px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin: 0px 10px 0px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  min-width: 0; /* prevents grid overflow */
}

@media (max-width: 1100px) {
  .project-wide-shell {
    width: 100%;
    margin-inline: 0;
  }
}

/* Right Patient View */

.grid-2.db-grid{
  display: grid;
  grid-template-columns: 1fr 0.60fr; /* right wider */
  gap: 5px;
  align-items: start;
}

.db-grid > .card{ min-width: 0; }

.tbl td.muted{
  padding: 8px 6px;
  text-align: center;
}

.db-grid .actions{
  margin-top: 0;
}

.db-grid tr td[colspan] + .actions{
  display: none;
}

.db-grid .card.empty .actions{
  display: none;
}


.viewed-list{
  display: flex;
  flex-direction: column;
  gap: 8px;          /* 👈 THIS controls list ↔ button spacing */
}

.viewed-list .actions{
  margin-top: 0;     /* kill inherited margins */
}

/* Keep the expander button compact in tables */
.btn.small.expander {
  padding: 4px 8px;
  min-width: 28px;
}

/* Collapsible exams area */
.exam-drop-row td { padding: 0; }
.exam-drop {
  padding: 10px 12px;
  border-top: 1px solid #eee;
}

.exam-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.exam-item:hover { background: rgba(0,0,0,0.04); }



.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.25fr; /* LEFT wider, RIGHT tighter */
  gap: 0px;
  align-items: start;
}

.grid-2 > .card:last-child {
  background: #fafafa;
}

.selection-pill {
  position: fixed;

  left: 24px;
  right: auto;
  bottom: 24px;

  z-index: 1200;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  width: auto;
  max-width: fit-content;

  border: 0;
  border-radius: 999px;

  padding: 12px 18px;

  background: #2b4cff;
  color: #ffffff;

  font-weight: 700;
  font-size: 14px;
  line-height: 1;

  box-shadow: 0 14px 28px rgba(43, 76, 255, 0.26);

  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.selection-pill.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.selection-pill:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

.selection-stack {
  position: fixed;
  top: 200px;     /* adjust */
  left: 10px;   /* align with your content */
  z-index: 1000;

  display: flex;
  flex-direction: column;
  gap: 8px;

  transition: opacity 0.15s ease, transform 0.15s ease;
}

.selection-stack.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

/* your pill style (keep as-is if you already like it) */
.selection-pill {
  background: #2b4cff;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* floating delete button */
.floating-delete {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;

  background: #fff;
  color: #c0392b;
  font-weight: 700;

  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.floating-delete:hover {
  background: #fff5f5;
}

.floating-help-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  background: #2b4cff;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 14px 28px rgba(43, 76, 255, 0.26);
}

.floating-help-button:hover {
  background: #1f3fd6;
}

#parentHelpModal {
  position: fixed;
  inset: auto 24px 82px auto;
  z-index: 1210;
  display: block;
  width: min(420px, calc(100vw - 32px));
  padding: 0;
}

#parentHelpModal.hidden {
  display: none !important;
}

#parentHelpBackdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: transparent;
}

.parent-help-modal-card {
  width: min(900px, calc(100% - 24px));
  height: min(92vh, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  margin: 0 auto;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.parent-help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #e9edf5;
  background: #ffffff;
  flex-shrink: 0;
  min-height: 30px;
}

.parent-help-modal-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
}

.parent-help-appointment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  width: auto;
  min-width: 300px;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  background: #2b4cff;
  color: #fff;
  border: 1px solid #2b4cff;
  font-weight: 700;
  flex: 0 0 auto;
}

.parent-help-modal-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  background: #f7f9fc;
}

.app-help-modal-card {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 116px);
  border-radius: 22px;
  transform-origin: calc(100% - 76px) 100%;
  animation: appHelpBubbleIn 0.18s ease-out;
}

.app-help-modal-card::after {
  content: "";
  position: absolute;
  right: 52px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-right: 1px solid #e9edf5;
  border-bottom: 1px solid #e9edf5;
  transform: rotate(45deg);
}

@keyframes appHelpBubbleIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-help-subtitle {
  margin-top: 3px;
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.app-help-modal-body {
  background: #f7f9fc;
}

.app-help-chatbot {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.app-help-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, #f7f9fc 0%, #f4f7fb 100%);
}

.app-help-message {
  max-width: min(84%, 460px);
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  word-break: break-word;
}

.app-help-message--bot {
  align-self: flex-start;
  border: 1px solid #e7edf5;
  border-bottom-left-radius: 8px;
  background: #ffffff;
  color: #172033;
}

.app-help-message--user {
  align-self: flex-end;
  border: 1px solid #d5e4ff;
  border-bottom-right-radius: 8px;
  background: #eaf2ff;
  color: #172033;
}

.app-help-message-label {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.app-help-message-body {
  color: #172033;
  font-size: 15px;
  line-height: 1.5;
}

.app-help-low-confidence {
  margin-top: 8px;
  font-size: 12px;
  color: #98a2b3;
}

.app-help-suggestions,
.app-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-help-suggestions button,
.app-help-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfd8ff;
  border-radius: 999px;
  background: #eef3ff;
  color: #2b4cff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.app-help-suggestions button:hover,
.app-help-actions a:hover {
  background: #e3ebff;
}

.app-help-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}

.app-help-input-wrap input {
  width: 100%;
}

.app-help-typeahead {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 20;
}

.app-help-typeahead-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.app-help-typeahead-item:hover {
  background: #f3f6ff;
}

.app-help-suggestions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.app-help-suggestions-inline button {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.app-help-suggestions-inline button:hover {
  background: #eef2f7;
}

.app-help-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid #e5eaf2;
  background: #ffffff;
}

.app-help-compose input {
  width: 100%;
  height: 44px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  padding: 0 14px;
  color: #172033;
  font: inherit;
  outline: none;
}

.app-help-compose input:focus {
  border-color: #9cb8ff;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.08);
}

.app-help-compose > button {
  height: 44px;
  min-width: 84px;
  border: 0;
  border-radius: 14px;
  background: #2b4cff;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.app-help-compose > button:hover {
  background: #1f3fd6;
}

.parent-help-comm-widget {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  background: #f7f9fc;
}

#parentHelpModal .comm-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
  background: #f7f9fc;
  height: 100%;
}

#parentHelpModal .comm-widget {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  background: #f7f9fc;
}

#parentHelpModal .comm-head {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 14px;
  background: #ffffff;
  border: 1px solid #e5eaf2;
  border-bottom: 1px solid #edf1f7;
  border-radius: 14px 14px 0 0;
}

#parentHelpModal .comm-head strong {
  font-size: 16px;
  color: #172033;
}

#parentHelpModal .comm-thread {
  grid-column: 2;
  grid-row: 2;
  border-radius: 0 0 14px 14px;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #f7f9fc 0%, #f4f7fb 100%);
  border: 1px solid #e5eaf2;
  border-top: 0;
}

#parentHelpModal .comm-history-toggle {
  position: sticky;
  top: 0;
  z-index: 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #d8e2ff;
  border-radius: 999px;
  background: rgba(234, 242, 255, 0.96);
  color: #2b4cff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  margin: -4px 0 6px;
}

#parentHelpModal .comm-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

#parentHelpModal .comm-history.is-fading-out {
  opacity: 0;
  transform: translateY(-10px);
}

#parentHelpModal .comm-history[hidden],
#parentHelpModal .comm-history.hidden {
  display: none !important;
}

#parentHelpModal .comm-compose,
#parentHelpModal .comm-thread {
  height: 100%;
}

#parentHelpModal .comm-msg {
  max-width: min(78%, 560px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  word-break: break-word;
}

#parentHelpModal .comm-msg--recv {
  align-self: flex-start;
  background: #ffffff;
  color: #172033;
  border: 1px solid #e7edf5;
  border-bottom-left-radius: 8px;
}

#parentHelpModal .comm-msg--sent {
  align-self: flex-end;
  background: #eaf2ff;
  color: #172033;
  border: 1px solid #d5e4ff;
  border-bottom-right-radius: 8px;
}

#parentHelpModal .comm-msg-body {
  font-size: 16px;
  line-height: 1.45;
  color: #172033;
}

#parentHelpModal .comm-msg-meta {
  font-size: 12px;
  color: #667085;
  line-height: 1.3;
}

#parentHelpModal .comm-compose {
  grid-column: 1;
  grid-row: 1 / span 2;
  border-radius: 18px;
  border: 1px solid #e5eaf2;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  background: #ffffff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#parentHelpModal .comm-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

#parentHelpModal .comm-recipient-label {
  font-size: 13px;
  color: #667085;
}

#parentHelpModal .comm-compose label.small {
  margin-top: 0 !important;
  font-size: 13px;
  color: #667085;
}

#parentHelpModal .comm-body {
  flex: 1;
  width: 100%;
  min-height: 180px;
  max-height: none;
  resize: none;
  border-radius: 16px;
  border: 1px solid #dbe4f0;
  background: #fbfcfe;
  padding: 14px 15px;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  color: #172033;
  box-sizing: border-box;
  outline: none;
}

#parentHelpModal .comm-body:focus {
  border-color: #9cb8ff;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.08);
  background: #ffffff;
}

#parentHelpModal .comm-refresh-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex: 0 0 auto;
}

#parentHelpModal .comm-send-btn {
  min-width: 88px;
  height: 46px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 700;
}

#parentHelpModal .comm-error {
  min-height: 18px;
  color: #b42318;
  margin-top: 0 !important;
}

#closeParentHelpBtn {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#closeParentHelpBtn:hover {
  background: #e9edf3;
}

@media (max-width: 800px) {
  #parentHelpModal .comm-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  #parentHelpModal .comm-compose {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  #parentHelpModal {
    inset: auto 16px 78px auto;
    width: min(420px, calc(100vw - 32px));
  }

  .parent-help-modal-card {
    width: calc(100% - 16px);
    height: calc(100vh - 88px - 16px);
    max-height: calc(100vh - 88px - 16px);
    border-radius: 20px;
  }

  .parent-help-modal-card.app-help-modal-card {
    width: 100%;
    height: min(560px, calc(100vh - 110px));
    max-height: calc(100vh - 110px);
    border-radius: 20px;
  }

  .parent-help-modal-header,
  #parentHelpModal .comm-head,
  #parentHelpModal .comm-compose {
    padding-left: 16px;
    padding-right: 16px;
  }

  #parentHelpModal .comm-msg {
    max-width: 90%;
  }

  #parentHelpModal .comm-body {
    min-height: 96px;
    margin-bottom: 12px;
  }
}
#closeParentHelpBtn:hover {
  background: #e9edf3;
}




.tbl, table { width: 100%; border-collapse: collapse; table-layout: fixed; }

.tbl {
  table-layout: fixed;
  width: 100%;
}

.tbl td:nth-child(3) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tbl td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


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

.tbl th, .tbl td{
  white-space: nowrap;   /* keep one-line cells */
}

.tbl td:nth-child(3){     /* Name column */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;       /* adjust to taste */
}

.tbl thead th{
  position: sticky;
  top: var(--nav-h);
  background: #fff;
  z-index: 10;
}

.sortable{
  cursor: pointer;
  user-select: none;
}

.sort-indicator{
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.6;
}

th, td {
  border-bottom: 1px solid #eee;
  padding: 10px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a { text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.grid .full { grid-column: 1 / -1; }

label { display:flex; flex-direction: column; font-size: 12px; gap: 6px; }
input { padding: 8px; border:1px solid #ccc; border-radius: 8px; }
button { padding: 10px 14px; border:0; border-radius: 10px; cursor:pointer; }

.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two-col .full { grid-column: 1 / -1; }

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

/* Hover highlight for patient rows */
.patient-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.patient-row:hover {
  background-color: rgba(0, 0, 0, 0.06); /* subtle dark */
}

.patient-row.active {
  background: rgba(0,0,0,0.05);
}

.patient-row.selected {
  outline: 2px solid #4a90e2;
  background: rgba(74,144,226,0.12);
}


.hidden { display: none; }

/* when selection mode is ON, show checkbox column */
.selection-mode .select-col {
  display: table-cell !important;
}

/* optional: make row feel clickable only in selection mode */
.selection-mode .patient-row {
  cursor: default;
  user-select: none;
}

.modal.hidden { display: none; }

/* Scrollable middle area */
.modal-body-scroll {
  flex: 1 1 auto;
  overflow-y: auto;     /* ✅ this is the scrollbar */
  min-height: 0;        /* ✅ critical in flex layouts */
  max-height: 60vh;      /* optional: limit max height */
  padding-right: 8px;   /* optional */
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

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

.form-grid label {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.form-grid input, .form-grid textarea {
  width: 100%;
  padding: 10px 10px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  outline: none;
}

/* Hide helper */
.hidden { display: none !important; }

/* Fullscreen overlay container */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* Dark background */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
}

/* The actual modal box */
.modal-card {
  position: relative;
  width: min(700px, calc(100% - 32px));
  margin: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  z-index: 1001; /* above backdrop */
  max-height: 80vh;
  overflow-y: auto;
}

/* Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.modal-title { font-weight: 700; }

/* Body */
.modal-body {   
  padding: 16px 20px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0; 
}

  /* Footer actions */
.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  margin-top: 14px;
}

.modal-actions .left-actions{ display:flex; gap:10px; }
.modal-actions .right-actions{ display:flex; gap:10px; }



/* Parent consent side panel */
.parent-consent {
  position: fixed;
  top: 50%;
  left: calc(50% + 600px);
  transform: translateY(-50%);
  width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1101; /* above modal backdrop */
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  background: white;
}

/* Hide completely when not needed */
.parent-consent.hidden {
  display: none !important;
}

/* Consent card */
#parentConsentCard{
  position: fixed;
  width: 360px;
  max-height: 80vh;
  overflow-y: auto;

  z-index: 1101;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

#parentConsentCard.hidden{
  display:none !important;
}

/* Small screens: stack (JS can still override, but this is a safe fallback) */
@media (max-width: 1000px){
  #parentConsentCard{
    width: min(92vw, 420px);
    max-height: 45vh;
  }
}

/* Form layout- Add new patient form */
.form-grid {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 14px 18px;
}

/* ✅ Wrapper spans full width and becomes 2-column */
.grid-2{
  grid-column: 1 / -1;          /* take all 3 columns */
  display: grid;
  grid-template-columns: 2fr 1fr; /* LEFT wider, RIGHT tighter */
  gap: 14px 18px;
  align-items: start;
}

/* ✅ stack on smaller screens */
@media (max-width: 1100px){
  .grid-2{
    grid-template-columns: 1fr;
  }
}

.grid-3{
  grid-column: 1 / -1;          /* take all 3 columns */
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 14px 14px;
}

.grid-4{
  grid-column: 1 / -1;          
  display: grid;
  grid-template-columns: 1fr 1fr; /* perfectly balanced */
  gap: 14px 14px;
}

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}
.form-row.two-col > div { min-width: 0; }

textarea[name="address"] {
  width: 100%;
  min-height: 80px;   /* 👈 controls default height */
  resize: vertical;  /* 👈 user can resize up/down only */
}

/* place items explicitly */
.patient-id       { grid-column: 1; grid-row: 1; }
.clinic           { grid-column: 2; grid-row: 1; }
.next-appointment { grid-column: 3; grid-row: 1; }

.title            { grid-column: 1; grid-row: 2; }
.first-name       { grid-column: 2; grid-row: 2; }
.last-name        { grid-column: 3; grid-row: 2; }

.dob              { grid-column: 1; grid-row: 3; }
.gender           { grid-column: 2; grid-row: 3; }

.phone            { grid-column: 1; grid-row: 4; }
.email            { grid-column: 2; grid-row: 4; }

.notes            { grid-column: 1 / -1; grid-row: 5; }

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

/* DOB + Age inline layout */
.dob-inline{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* override the global width:100% for the date input in this row */
.dob-inline input[type="date"]{
  width: auto !important;      /* key */
  min-width: 0;     /* key for grid */
}

.dob-age{
  white-space: nowrap;
  color: #666;
  font-size: 0.9em;
}

.dob-cell {
  white-space: nowrap;
}

.dob-age {
  margin-left: 6px;
  color: #666;
  font-size: 0.85em;
}

.form-grid label {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.form-grid select {
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: white;
  font-size: 14px;
}

.form-grid select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, #555 50%),
    linear-gradient(135deg, #555 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.preferred-contact{
  margin-top: 10px;   /* pull it UP */
  margin-bottom: 10px; /* space from next field */
}

.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid textarea {
  width: 100%;
  padding: 10px 0px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  outline: none;
}

/* Preferred Way To Contact */
.check-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, max-content));
  gap: 10px 24px;
  margin-top: 6px;
  align-items: start;
}

.check{
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 0;
  min-height: 0px; 
  cursor: pointer;
  margin: 0;
}

.check input{
margin: 10px;
  transform: translateY(+3px); /* tweak: -1px or +1px */
}

.form-grid input[type="checkbox"]{
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 10px;
  border: none;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
}

/* Clinics */
.inline-form { display:flex; gap:10px; align-items:center; margin:0; }
.row-selected { outline: 2px solid rgba(0,0,0,0.12); border-radius: 6px; }
.muted { color:#777; }

/* ===== Toolbar layout (Patients & Clinics) ===== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Inline forms inside toolbar (Add / Delete) */
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Pushes search to the right */
.spacer {
  flex: 1;
}

/* Search form on the right */
.search {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Selected text */
.muted.small {
  font-size: 13px;
  color: #777;
}

/* Make header block spacing consistent on all pages */
.page-header {
  padding: 14px 18px;      /* same left/right + top/bottom */
  margin-bottom: 0px;     /* consistent gap to cards below */
}

.page-header h2 {
  margin: 0 0 12px 0;      /* consistent gap title -> toolbar */
}

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

/* push search to the right */
.spacer { flex: 1; }

/* keep forms on a single line */
.inline-form, .search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Make buttons and inputs visually aligned */
.btn, button {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
}

input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  box-sizing: border-box;
}

/* Optional: stable widths so header doesn't shift */
.inline-form input[name="name"] {
  width: 220px;
}
.search input[name="q"] {
  width: 190px;
}

.exam-mini-list {
  display: grid;
  gap: 6px;
  padding: 10px 6px;
}

.exam-mini-link {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.exam-mini-link:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: underline;
}

.exam-mini-link.is-past{
  opacity: 0.55;
}

.exam-mini-link.is-past:hover{
  opacity: 0.85; /* still shows it’s clickable */
}

/* Ensure exam mini list items can be clicked */
.exam-drop { pointer-events: auto; }
.exam-mini-list { pointer-events: auto; }
.exam-mini-link { pointer-events: auto; cursor: pointer; }

.exam-drop.muted,
.exam-drop.muted.small {
  pointer-events: auto !important;
}

/* OCT Image viewer */

.oct-panel{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.eye-block{
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  min-width: 0;
}

.image-viewer.oct-viewer{
  position: relative;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 10px;
  height: 420px;             /* match HFA feel */
  overflow: auto;            /* allows scroll for Actual */
  display: flex;
  align-items: center;
  justify-content: center;
}

.oct-img{
  max-width: 100%;
  max-height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.empty-hint{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(0,0,0,0.45);
  font-size: 14px;
  pointer-events: none;
}

.nav-inline-form {
  margin: 0;
}

.nav-login-link,
.nav-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
}

.nav-login-link {
  color: inherit;
}

.nav-auth-btn {
  border: none;
  background: #111827;
  color: #fff;
  cursor: pointer;
}

.nav-auth-btn--ghost {
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
}

.nav-menu {
  position: relative;
  display: inline-block;   /* 👈 important */
  flex: 0 0 auto;
}

.nav-menu-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-menu-toggle::-webkit-details-marker {
  display: none;
}

.nav-menu-toggle.nav-owner-initials-toggle {
  box-sizing: border-box;

  width: auto;
  min-width: 60px;
  height: 36px;

  padding: 0 14px;

  border: 1px solid rgba(43, 76, 255, 0.16);
  border-radius: 999px;

  background: linear-gradient(180deg, #f8fbff 0%, #e9eefc 100%);
  color: #2b4cff;

  box-shadow: 0 6px 14px rgba(43, 76, 255, 0.1);

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.nav-menu-toggle:not(.nav-owner-initials-toggle):hover,
.nav-menu[open] .nav-menu-toggle:not(.nav-owner-initials-toggle) {
  background: #e9eefc;
  color: #2b4cff;
}

.nav-menu-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(43, 76, 255, 0.16);
}

.nav-owner-initials-toggle:hover,
.nav-owner-initials-toggle:focus-visible {
  border-color: rgba(43, 76, 255, 0.32);
  background: linear-gradient(180deg, #eef4ff 0%, #dfe8ff 100%);
  color: #1f3ed8;
  transform: translateY(-1px);
}

.nav-menu[open] .nav-owner-initials-toggle {
  border-color: #2b4cff;
  background: #2b4cff;
  color: #fff;
  box-shadow: 0 10px 22px rgba(43, 76, 255, 0.26);
}

.nav-menu[open] .nav-owner-initials-toggle:hover,
.nav-menu[open] .nav-owner-initials-toggle:focus-visible {
  background: #2340dc;
  color: #fff;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;              /* key fix */
  width: max-content;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));

  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;

  transition:
  opacity 0.18s ease,
  transform 0.18s ease;

  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  z-index: 2100;
}

.nav-menu[open] .nav-menu-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nav-right,
.nav-inner,
.main-nav {
  overflow: visible;
}

.nav-menu-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  box-sizing: border-box;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu .nav-inline-form {
  width: 100%;
}

.nav-menu-label {
  color: #4b5563;
  font-weight: 700;
  cursor: default;
}

.nav-menu-item:not(.nav-menu-label):hover,
.nav-menu-item:not(.nav-menu-label):focus-visible {
  background: #f3f4f6;
  outline: 0;
}

.auth-body {
  background: #f3f8ff;
}

.auth-welcome {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96), transparent 18%),
    radial-gradient(circle at 74% 74%, rgba(133, 206, 246, 0.58), transparent 28%),
    linear-gradient(135deg, #edf5ff 0%, #fbfdff 54%, #dff4ff 100%);
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.auth-welcome--hidden {
  opacity: 0;
  visibility: hidden;
}

.auth-welcome-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 34px 42px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 26px 70px rgba(47, 85, 126, 0.2);
  animation: authWelcomeRise 0.8s ease both;
}

.auth-welcome-logo {
  width: 200px;
  height: auto;
  object-fit: contain;
  animation: authWelcomePulse 1.35s ease-in-out infinite;
}

.auth-welcome-kicker {
  margin: 0;
  color: #4b5563;
  font-size: 18px;
  font-weight: 700;
}

@keyframes authWelcomeRise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authWelcomePulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 10px 22px rgba(31, 78, 216, 0.18));
  }

  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 16px 28px rgba(31, 78, 216, 0.28));
  }
}

.page--auth {
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

.auth-card > .auth-brand,
.auth-card > .auth-eyebrow,
.auth-card > .auth-title,
.auth-card > .auth-copy,
.auth-card > .auth-choice-grid {
  max-width: 398px;
}

.auth-card {
  position: relative;
  overflow: hidden;

  width: min(1100px, 92vw);   /* 👈 wider */
  min-height: 420px;          /* 👈 shorter */
  
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;        /* 👈 vertically center content inside */

  padding: 28px 36px;
  border-radius: 24px;

  background:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 48%, rgba(245,251,255,0.76) 100%);
}

.auth-card > * {
  position: relative;
  z-index: 1;
  grid-column: 1;
  width: min(100%, 620px);
  justify-self: start;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 0 45%;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.75), rgba(255,255,255,0.05)),
    url("/static/images/vision-eye-hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.95;
}

.auth-card::after {
  display: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: #101827;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-brand-mark {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #12699f, #76b36b);
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

.auth-brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px 11px;
  border-radius: 50%;
  background: #f7fbff;
}

.auth-brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px 17px;
  border-radius: 50%;
  background: #1474aa;
}

.auth-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.auth-title {
  margin: 0;
  color: #111827;
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-copy {
  margin-top: 14px;
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.auth-alert {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff4f2;
  color: #9f2d20;
  border: 1px solid #f3b6ad;
}

.auth-notice {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ecfbf7;
  color: #006c60;
  border: 1px solid #a8e6da;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  width: min(100%, 620px);
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  font-weight: 700;
  color: #111827;
  font-size: 17px;
}

.auth-field input {
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 17px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-field input::placeholder {
  color: #6b7280;
}

.auth-field input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.auth-submit {
  height: 50px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #081a3a, #1f4ed8);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.auth-submit:hover {
  box-shadow: 0 14px 28px rgba(31, 78, 216, 0.24);
  transform: translateY(-1px);
}

.auth-switch {
  margin: 14px 0 0;
  color: #4b5563;
  font-size: 17px;
  width: min(100%, 620px);
}

.auth-helper {
  margin: 12px 0 0;
  font-size: 17px;
  width: min(100%, 620px);
}

.auth-helper a,
.auth-switch a,
.auth-reset-link {
  color: #193a8a;
  font-weight: 700;
  text-decoration: none;
}

.auth-helper a:hover,
.auth-switch a:hover,
.auth-reset-link:hover {
  text-decoration: underline;
}

.auth-reset-box {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 14px;
  border-radius: 8px;
  background: #f4faf8;
  border: 1px solid #bdd5cf;
  width: min(100%, 620px);
}

.auth-reset-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b635e;
}

.auth-reset-link {
  word-break: break-all;
}

.auth-choice-card {
  width: min(900px, 94vw);
  min-height: 200px;
}

.auth-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  width: min(370px, 100%);
}

.auth-choice-btn {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 10px 10px 10px 20px;
  min-height: 110px;

  border-radius: 22px;
  border: 1px solid rgba(191, 208, 255, 0.85);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,251,255,0.9) 100%);

  color: #172033;
  text-decoration: none;
  box-shadow:
    0 14px 34px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.9);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
  width: 100%;
  box-sizing: border-box;
}

.auth-choice-btn::after {
  content: "→";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: #2b4cff;
  font-size: 18px;
  font-weight: 800;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-choice-btn:hover {
  transform: translateY(-4px);
  border-color: #8fb0ff;
  background: #ffffff;
  box-shadow:
    0 22px 44px rgba(43, 76, 255, 0.16),
    inset 0 1px 0 rgba(255,255,255,1);
}

.auth-choice-btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.auth-choice-title {
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 700;
  line-height: 1.5;
  color: #07142f;
}

.auth-choice-copy {
  color: #5d6b82;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.5;
  padding-right: 20px;
}

@media (max-width: 900px) {
  .auth-shell {
    padding: 18px 14px;
  }

  .auth-card::before,
  .auth-card::after {
    display: none;
  }

  .auth-card {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .auth-brand {
    margin-bottom: 22px;
    font-size: 23px;
  }

  .auth-title {
    font-size: 30px;
  }

  .auth-copy {
    font-size: 16px;
  }

  .auth-field input,
  .auth-submit,
  .auth-helper,
  .auth-switch {
    font-size: 17px;
  }

  .auth-choice-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-card {
    width: min(720px, 94vw);
    min-height: auto;
    grid-template-columns: 1fr;  /* stack */
    padding: 22px;
  }

  .auth-shell {
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-welcome,
  .auth-welcome-card,
  .auth-welcome-logo {
    animation: none;
    transition: none;
  }
}

.admin-maintenance-card {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-maintenance-title {
  margin: 0;
}

.auth-brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}

.auth-brand-logo--large {
  width: 64px;
  height: 64px;
}

/* ===== Auth page full-width background fix ===== */
.page:has(.auth-shell) {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

.auth-shell {
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  display: flex;                  /* 👈 better than grid here */
  align-items: center;            /* vertical center */
  justify-content: center;  
  padding: 24px;

  background:
    radial-gradient(circle at 78% 55%, rgba(114, 188, 255, 0.42), transparent 42%),
    radial-gradient(circle at 18% 25%, rgba(185, 215, 255, 0.55), transparent 36%),
    linear-gradient(135deg, #eaf4ff 0%, #f7fbff 45%, #d8edff 100%);
}

.portal-important-update-open {
  overflow: hidden;
}

.portal-important-update-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.portal-important-update-modal {
  z-index: 1510;
}

.portal-important-update-card {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 48px));
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

#aboutResearchUpdateModal .portal-important-update-card {
  margin: 72px auto auto;
  max-height: 84vh;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18), 0 8px 24px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
}

.portal-important-update-header {
  background: #ffffff;
}

.portal-important-update-close {
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;

  display: flex;              /* 👈 key */
  align-items: center;        /* vertical center */
  justify-content: center;    /* horizontal center */
}

.portal-important-update-close:hover {
  background: #eef3ff;
  border-color: #cfd8ff;
}

.portal-important-update-body {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding: 18px 20px;
  background: #f8fafc;
}

.portal-important-update-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.portal-important-update-context {
  color: #2b4cff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.portal-important-update-text {
  color: #172033;
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.portal-important-update-actions {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid #e8edf5;
  background: #ffffff;
  justify-content: flex-end;
}

.portal-important-update-dismiss-form {
  margin: 0;
}

.portal-important-update-actions .btn-primary,
.portal-important-update-actions .btn-secondary {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.portal-important-update-actions .btn-primary {
  background: #2b4cff;
  color: #ffffff;
}

.portal-important-update-actions .btn-secondary {
  background: #ffffff;
  color: #172033;
  border-color: #d7deea;
}

@media (max-width: 640px) {
  .portal-important-update-modal {
    padding: 14px;
  }

  .portal-important-update-card {
    width: 100%;
    max-height: calc(100vh - 28px);
  }

  .portal-important-update-body {
    max-height: calc(100vh - 210px);
    padding: 14px;
  }

  .portal-important-update-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-important-update-dismiss-form,
  .portal-important-update-actions .btn-primary,
  .portal-important-update-actions .btn-secondary {
    width: 100%;
  }
}

.study-page {
  max-width: var(--app-width);
  margin: 0 auto;
  padding: 32px 20px 60px;
  color: #172033;
}

.study-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.study-hero-text,
.study-hero-card,
.study-section,
.study-info-card {
  background: #ffffff;
  border: 1px solid #e6eaf2;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.study-hero-text {
  padding: 34px;
}

.study-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: #2b4cff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.study-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.study-hero p,
.study-section p,
.study-info-card p,
.faq-answer {
  color: #667085;
  line-height: 1.7;
  font-size: 16px;
}

.study-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.study-primary-btn,
.study-secondary-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.study-primary-btn {
  border: 0;
  color: white;
  background: #2b4cff;
  box-shadow: 0 10px 20px rgba(43, 76, 255, 0.22);
}

.study-secondary-btn {
  border: 1px solid #d0d5dd;
  background: #ffffff;
  color: #172033;
    display: inline-flex;   /* 👈 important for <a> */
  align-items: center;
  justify-content: center;
  text-decoration: none;  /* 👈 remove underline */
}

.study-primary-btn:hover,
.study-secondary-btn:hover {
  transform: translateY(-2px);
}

.study-hero-card {
  padding: 24px;
  height: fit-content;   /* 👈 key */
    background: linear-gradient(
    180deg,
    #f8fbff 0%,
    #eef4ff 100%
  );

  border: 1px solid #e3ebff;
}

.study-hero-card h3,
.study-section h2,
.study-info-card h3 {
  margin-top: 0;
}

.study-hero-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.6;
}

.study-section {
  padding: 28px;
  margin-bottom: 24px;
}

.study-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.study-info-card {
  padding: 24px;
}

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

.faq-item {
  border: 1px solid #e6eaf2;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.faq-question {
  width: 100%;
  border: 0;
  background: #ffffff;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #172033;
  cursor: pointer;
  text-align: left;
}

.faq-question span {
  font-size: 22px;
  color: #2b4cff;
  transition: transform 0.2s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 180px;
  padding: 0 20px 18px;
}

.faq-item.open .faq-question span {
  transform: rotate(45deg);
}

@media (max-width: 850px) {
  .study-hero,
  .study-info-grid {
    grid-template-columns: 1fr;
  }

  .study-hero-text {
    padding: 26px;
  }
}

@media (max-width: 520px) {
  .study-page {
    padding: 20px 14px 44px;
  }

  .study-actions {
    flex-direction: column;
  }

  .study-primary-btn,
  .study-secondary-btn {
    width: 100%;
  }
}

.study-page,
.study-hero,
.study-hero-text,
.study-hero-card,
.study-section,
.study-info-grid {
  position: relative;
  z-index: 1;
}

.study-bg {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.study-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(
      rgba(255, 255, 255, 0.82),
      rgba(255, 255, 255, 0.88)
    ),
    url("/static/images/Header.jpeg") center/cover no-repeat;
  z-index: -1;
  pointer-events: none;
}

.study-header {
  position: relative;
  height: 260px;
  margin: -34px -34px 24px;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  background: url("/static/images/Header.jpeg") center/cover no-repeat;
}

/* Soft overlay for readability */
.study-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(15, 23, 42, 0.45),
    rgba(15, 23, 42, 0.25)
  );
  display: flex;
  align-items: flex-end;
  padding: 32px;
}

.study-header-content {
  color: white;
  max-width: 600px;
}

.study-header-content h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
}

.study-header-content p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

@media (max-width: 600px) {
  .study-header {
    height: 180px;
    border-radius: 16px;
  }

  .study-header-overlay {
    padding: 20px;
  }

  .study-header-content h1 {
    font-size: 22px;
  }
}

.study-intro-card p,
.study-paragraphs p {
  text-align: justify;
  text-justify: inter-word;
}

.study-header-overlay {
  backdrop-filter: blur(1.0px);
}

.study-header {
  animation: zoomIn 1.2s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

.study-hero-wide {
  background: #ffffff;
  border: 1px solid #e6eaf2;
  border-radius: 26px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  margin-bottom: 28px;
}

.study-header-wide {
  position: relative;
  min-height: 340px;
  background: url("/static/images/Header.jpeg") center/cover no-repeat;
}

.study-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.58),
    rgba(15, 23, 42, 0.28),
    rgba(15, 23, 42, 0.08)
  );
  display: flex;
  align-items: center;
  padding: 48px;
}

.study-header-content {
  max-width: 640px;
  color: #ffffff;
}

.study-header-content h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 800;
}

.study-header-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.study-floating-card {
  position: absolute;
  top: 50%;
  right: 38px;
  transform: translateY(-50%);
  width: 100%;
  max-width: 280px;  /* 👈 tighten here (try 260–320px) */
  height: fit-content;
  padding: 26px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.study-intro-card {
  padding: 30px 42px 38px;
  max-width: var(--app-width);
  text-align: justify;
}

.study-intro-card p {
  max-width: var(--app-width);
  color: #667085;
  line-height: 1.7;
  font-size: 17px;
}

.study-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

:root {
  --tick-offset: 34px;
}

.study-check-list li {
  position: relative;
  padding-left: var(--tick-offset);
  margin-bottom: 12px;
  line-height: 1.6;
}

.study-hero-card h3 {
  padding-left: var(--tick-offset);
  margin-bottom: 10px;
}

/* Round green tick */
.study-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;

  width: 20px;
  height: 20px;

  background: #16a34a;
  color: white;

  font-size: 12px;
  font-weight: 700;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.study-section p {
  margin-bottom: 14px;
  line-height: 1.7;
  color: #667085;
}

.study-info-card, 
.study-section,
.study-about-card {
  padding: 34px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e3ebff;
  border-radius: 24px;
}

.study-section-header {
  margin-bottom: 18px;
}


.study-section-tag {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2b4cff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.study-section-header h2 {
  margin: 0;
  color: #172033;
}

.study-paragraphs {
  max-width: var(--app-width);
}

.study-paragraphs p {
  margin: 0 0 16px;
  color: #667085;
  line-height: 1.8;
  font-size: 16px;
  text-align: justify;
  text-justify: inter-word;
}

.study-paragraphs p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .study-paragraphs p {
    text-align: left;
  }
}

/* BACKDROP */
.info-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: grid;
  place-items: center;
  z-index: 3000;
  padding: 20px;
}

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

/* MODAL CONTAINER */
.info-modal {
  width: min(760px, 100%);
  height: min(680px, 90vh);   /* fixed consistent height */
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  animation: modalFadeIn 0.25s ease;
}

/* HEADER */
.info-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.info-modal-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #2b4cff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: #172033;
}

.info-modal-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: #667085;
}

/* CLOSE BUTTON */
.info-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 24px;
  cursor: pointer;
}

/* TABS */
.info-modal-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  padding: 6px;
  margin: 12px 16px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.info-modal-tabs::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc((100% - 12px) / 6);
  height: calc(100% - 12px);
  border-radius: 999px;
  background: #2b4cff;
  box-shadow: 0 8px 18px rgba(43, 76, 255, 0.24);
  transform: translateX(calc(var(--active-tab-index, 0) * 100%));
  transition: transform 0.3s ease;
}

.info-tab {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;

  transition: color 0.2s ease 0.2s;
}

.info-tab.active {
  color: #ffffff;
  transition: color 0.2s ease 0.15s;
}

.info-tab:hover {
  background: #e2e8f0;
}

.info-tab.active {
  background: #2b4cff;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(43, 76, 255, 0.25);

}

/* BODY */
.info-modal-body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* CONTENT */
.info-panel {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;

  position: absolute;   /* stack panels */
  inset: 0;
  pointer-events: none;

  padding: 22px 26px;   /* 👈 restore inner spacing */
  box-sizing: border-box;
}

.info-modal-body {
  position: relative;   /* needed for stacking */
}

.info-panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.info-panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #172033;
}

.info-panel p {
  margin: 0;
  line-height: 1.6;
  color: #475569;
}

/* ANIMATION */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: contain;
}

/* Global modal backdrop treatment */
.modal-backdrop,
.info-modal-backdrop,
.portal-important-update-backdrop,
.communication-modal-backdrop,
.project-export-modal-backdrop,
.invitation-modal-backdrop,
.project-edit-modal-backdrop,
.contributor-profile-backdrop,
.contributor-role-password-backdrop,
.exam-backdrop,
#equipmentBackdrop,
#clinicBackdrop {
  background: var(--modal-backdrop-bg) !important;
  backdrop-filter: var(--modal-backdrop-blur) !important;
  -webkit-backdrop-filter: var(--modal-backdrop-blur) !important;
  overscroll-behavior: contain;
  touch-action: none;
}

.info-panel p + p {
  margin-top: 12px;
}


.info-modal-header,
.info-modal-tabs {
  flex-shrink: 0;
}

/* Chrome, Edge, Safari */
.info-modal-body::-webkit-scrollbar {
  width: 6px;
  opacity: 0;
}

.info-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.info-modal-body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0);   /* hidden */
  border-radius: 999px;
  transition: background 0.2s ease;
}

.info-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 👇 SHOW ONLY ON HOVER */
.info-modal-body:hover::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
}

.info-modal-body:hover::-webkit-scrollbar {
  opacity: 1;
}

/* Firefox */
.info-modal-body {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: none;  /* hide by default */
}

.info-modal-body:hover {
  scrollbar-width: thin;
  scrollbar-color: rgba(100,116,139,0.45) transparent;
}

.nav-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: var(--nav-pill-width, 0px);
  height: calc(100% - 8px);
  border-radius: 8px;

  background: #e9eefc;
  box-shadow: none;

  transform: translateX(var(--nav-pill-x, 0px));
  transition: transform 0.28s ease, width 0.28s ease;
  opacity: var(--nav-pill-opacity, 0);
  z-index: 0;
}

.nav-tabs .nav-item {
  position: relative;
  z-index: 1;
  background: transparent;
  color: #555;
}

.nav-tabs .nav-item.active {
  background: transparent;
  color: #2b4cff;
}

.nav-tabs .nav-item:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #f1f5ff 0%, #e7eeff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(43, 76, 255, 0.18),
    0 6px 14px rgba(43, 76, 255, 0.12);
  color: #2b4cff;
}

.nav-item.nav-item--disabled,
.nav-tabs .nav-item.nav-item--disabled,
.nav-tabs .nav-item.nav-item--disabled:hover {
  color: #9ca3af;
  background: transparent;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.58;
  pointer-events: none;
  transform: none;
}

.app-help-suggestions button:disabled,
.app-help-suggestions button[aria-disabled="true"] {
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.nav-tabs--no-transition::before {
  transition: none !important;
}

.site-footer {
background: linear-gradient(
  135deg,
  #0b1220 0%,
  #132238 50%,
  #0b1220 100%
);

border-top: 1px solid rgba(255,255,255,0.06);

box-shadow:
  0 -10px 40px rgba(0,0,0,0.25);

color: #ffffff;
padding: 56px 8vw 28px;
margin-top: 64px;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 42px;

  max-width: 1500px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .site-footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}

.site-footer-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer-column h4 {
  margin: 0 0 8px;
  color: #8bb0bd;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-footer-column a {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.site-footer-column a:hover {
  color: #8bd3d7;
}

.site-footer-apps img {
  width: 155px;
  height: auto;
  display: block;
}

.app-store-link {
  display: inline-flex;
}

.site-footer-bottom {
  max-width: 1500px;
  margin: 62px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer-bottom p {
  margin: 0;
  color: #8bb0bd;
  font-size: 15px;
}

.site-footer-socials {
  display: flex;
  gap: 18px;
  align-items: center;
}

.site-footer-socials a {
  color: #8bb0bd;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.site-footer-socials a:hover {
  color: #ffffff;
}

@media (max-width: 1100px) {
  .site-footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer-bottom {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

.footer-app-badge-wrap {
  position: relative;
  display: inline-flex;
  width: fit-content;
}

.footer-coming-soon-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  z-index: 5;
}

.footer-coming-soon-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  z-index: 5;

  opacity: 1 !important;
  filter: none !important;
}

.breadcrumb-nav {
  --breadcrumb-wide-offset: 30px;
  box-sizing: border-box;
  max-width: calc(var(--app-width) + (var(--app-padding-x) * 2));
  margin: 25px auto 0;
  padding-inline: calc(var(--app-padding-x) - var(--breadcrumb-wide-offset));
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.breadcrumb-item:not(:last-child)::after {
  content: "›";
  color: #94a3b8;
}

.breadcrumb-item a {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-item a:hover {
  color: #2b4cff;
}

.breadcrumb-item span {
  color: #172033;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .breadcrumb-nav {
    padding-inline: var(--app-padding-x);
  }
}

/* Shared macOS-style clear button for text inputs. Place inside a positioned input wrapper. */
.input-clear,
.ui-clear-button {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 18px;
  height: 18px;
  min-height: 0;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #e5e7eb;
  color: #667085;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
  padding: 0;
  transform: translateY(-50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.input-clear.hidden,
.ui-clear-button.hidden,
.input-clear[hidden],
.ui-clear-button[hidden] {
  display: none !important;
}

.input-clear:hover,
.input-clear:focus,
.ui-clear-button:hover,
.ui-clear-button:focus {
  color: #7a271a;
  border-color: #e0443e;
  background: #ff5f57;
  outline: none;
}

.input-clear:focus-visible,
.ui-clear-button:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 3px rgba(255, 95, 87, 0.22);
}

.input-clear:active,
.ui-clear-button:active {
  transform: translateY(-50%) scale(0.94);
}

/* Shared close controls for app modals. */
.info-modal-close,
#closeParentHelpBtn,
.portal-important-update-close,
#closeApptBtn,
#examCloseBtn,
#btnCloseClinicModal,
#closeAddPatientBtn,
#closeContactBtn,
#closeContributorRolePasswordModal,
.admin-warning-modal-close,
.admin-export-modal-close,
.communication-modal-close,
.equipment-modal-close,
.invitation-modal-close,
.project-export-modal-close,
.project-edit-modal-close,
.contributor-profile-close,
.kid-profile-modal-close,
.parent-consent-preview-close {
  box-sizing: border-box;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fbff;
  color: #172033;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.info-modal-close:hover,
.info-modal-close:focus-visible,
#closeParentHelpBtn:hover,
#closeParentHelpBtn:focus-visible,
.portal-important-update-close:hover,
.portal-important-update-close:focus-visible,
#closeApptBtn:hover,
#closeApptBtn:focus-visible,
#examCloseBtn:hover,
#examCloseBtn:focus-visible,
#btnCloseClinicModal:hover,
#btnCloseClinicModal:focus-visible,
#closeAddPatientBtn:hover,
#closeAddPatientBtn:focus-visible,
#closeContactBtn:hover,
#closeContactBtn:focus-visible,
#closeContributorRolePasswordModal:hover,
#closeContributorRolePasswordModal:focus-visible,
.admin-warning-modal-close:hover,
.admin-warning-modal-close:focus-visible,
.admin-export-modal-close:hover,
.admin-export-modal-close:focus-visible,
.communication-modal-close:hover,
.communication-modal-close:focus-visible,
.equipment-modal-close:hover,
.equipment-modal-close:focus-visible,
.invitation-modal-close:hover,
.invitation-modal-close:focus-visible,
.project-export-modal-close:hover,
.project-export-modal-close:focus-visible,
.project-edit-modal-close:hover,
.project-edit-modal-close:focus-visible,
.contributor-profile-close:hover,
.contributor-profile-close:focus-visible,
.kid-profile-modal-close:hover,
.kid-profile-modal-close:focus-visible,
.parent-consent-preview-close:hover,
.parent-consent-preview-close:focus-visible {
  border-color: #b8c7ff;
  background: #eef4ff;
  color: #172033;
  outline: 0;
}
