/* HEADER CONTAINER */


   html, body {
     overflow-x: hidden;
   }



.container, #app {
    background-color: transparent !important;
}


.header 
{
    width: 100%;
    background-color: #003366;
    color: white;
    padding: 20px 0 0;   /* remove bottom padding */
    box-sizing: border-box;
    margin-bottom: 0;    /* gap now handled by body padding */
    position: fixed;     /* 🔒 stick to the top */
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;        /* stays above page content, below drawer (1000+) */
}


.header-container{
  display:flex;
  align-items:center;
  justify-content:space-between; /* or flex-start */
}


.header-title 
{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.header-center-title {
  text-align: center;
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 5px;
  margin-bottom: 10px;
}

.header-title a 
{
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: underline;
}



.logo-link 
{
    display: inline-block;
    border: none;
}

.logo-link img 
{
    display: block;
}




.navigation-section {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    padding-left: 15px;     /* ← Match left padding of logo block */
    padding-right: 15px;
    line-height: 1.5;
    word-break: keep-all;
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}




.analysis-toolbar { max-width: 100%; overflow: hidden; flex-wrap: wrap; }
.analysis-toolbar > * { min-width: 0; }





/* Use the existing .submit-btn style, plus: */
.go-button {
    width: 70px;
    height: 35px;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: #003366;
    color: white;
    border: none;
    cursor: pointer;
}

.go-button:hover {
    background-color: #0055aa;
}


.popup-section
{
    display: flex;
    justify-content: right;
    align-items: right;
    gap: 10px;
    margin-right: 20px;
    margin-bottom: 10px;
}

/* === Logout section container === */
.logout-section
{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
    margin-right: 20px;
}

/* === Email text next to logout === */
.logout-email {
  margin-right: 10px;
  font-weight: bold;
  color: #000;            /* base = black for readability on light surfaces */
  font-size: 0.95rem;
}


/* If a page has a light header background, wrap it with .light-surface and override: */
/* .light-surface .logout-email { color: #003366; } */



.button-section,
.dropdown-section 
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}



.action-button 
{
    background-color: #5050ff;
    color: white;
    width: 120px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* "fit button text and color" rule */
.add-patient-btn {
  background-color: #003366; /* same darker blue as logout */
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  margin-top: 12px; /* optional spacing above the button */

  height: 36px;
  padding: 0 7px;    /* exactly 7px left + 7px right */
  width: 100px;       /* shrink-wrap to text + padding */
  min-width: unset;  /* ensure no inherited min-width */
}

.add-patient-btn:hover {
  background-color: #0055aa; /* same hover as logout */
}


.patient-buttons 
{
    background-color: #5050ff;
    color: white;
    width: 160px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

nav 
{
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

nav a 
{
    color: white;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover 
{
    text-decoration: underline;
}

main 
{
    padding: 2rem;
    text-align: center;
    background-color: white;
}

@media (max-width: 600px) 
{
    .header-container 
    {
        align-items: flex-start;
    }

    nav 
    {
        margin-top: 1rem;
    }
}


/* Enhanced header layout */
.header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 10px;
}


.left-title .header-logo {
    height: 40px;
    margin-right: 10px;
}

.brand-name{
  white-space: nowrap;
  margin-left: 0;          /* moved spacing to .brand-block */
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}



/* Remove extra left offset on the logo so it hugs the edge */
.header-logo{ margin-left:0; }


/* Medium screens (e.g., tablets) */
@media (max-width: 768px) {
    .brand-name {
        font-size: 22px;
    }
}

/* Small screens (e.g., phones) */
@media (max-width: 480px) {
    .brand-name {
        font-size: 18px;
    }
}


.center-links {
    flex-grow: 1;
    text-align: center;
    font-size: 1rem;
}

.center-links a {
    margin: 0 8px;
    color: white;
    text-decoration: underline;
}

/* Responsive adjustment */
@media (max-width: 600px) {
    .header-title {
        flex-direction: column;
        align-items: flex-start;
    }
    .center-links {
        text-align: left;
        margin-top: 8px;
    }
}



.header-title {
    justify-content: space-between;
    width: 100%;
}


.left-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-right: auto;
}


.blue-button {
  background-color: #003366; color: #fff; border: none; border-radius: 6px;
  padding: 6px 10px; cursor: pointer;
}
.blue-button:hover { opacity: .9; }

/* === Sticky footer layout: base === */
html, body
{
    height: 100%;
    margin: 0;
}


/* === Sticky footer layout: flex column === */
body
{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* === Sticky footer layout: grow main to push footer down === */
main
{
    flex: 1;
}

/* === Sticky footer container === */

/* === Footer skeleton (before footer.html arrives) === */
#footer-placeholder
{
    margin-top: auto;
    width: 100%;
    display: block;

    /* Skeleton: show blue bar to prevent layout jump */
    background-color: #003366;
    min-height: 80px;      /* tighter skeleton height */

    /* No padding here — avoid double vertical space */
    padding: 0;

    /* Hide any text if it flashes early */
    color: transparent;
}

/* When real footer HTML is injected, let the real footer control size/bg */
#footer-placeholder.ready
{
    color: inherit;        /* real text color will apply */
    min-height: 0;         /* remove skeleton height */
    background-color: transparent;  /* hand off BG to .site-footer */
}

/* === Real footer (inside footer.html) === */
.site-footer
{
    background-color: #003366;
    color: white;
    text-align: center;

    /* Flex centering ensures equal blue space above/below text */
    display: flex;
    align-items: center;
    justify-content: center;

    height: 60px;          /* fixed height for consistent look */

    font-size: 18px;
    line-height: 1.4;
}

.site-footer p
{
    margin: 0;             /* remove default paragraph spacing */
}

.site-footer a
{
    color: white;
    text-decoration: underline;
    margin: 0 8px;
}


/* === Index hero (logo + tagline) === */
.logo
{
    margin-top: 60px;
    width: 300px;
    max-width: 80%;
    height: auto;       /* keep aspect ratio */
    display: inline-block;
}

.banner-wrapper
{
    margin: 40px auto 0 auto;
    max-width: 600px;   /* keeps line length readable */
    padding: 0 20px;
    box-sizing: border-box;
}

.banner
{
    text-align: center;
}

.coming-soon
{
    font-size: 12px;    /* 50% smaller than 24px */
    font-weight: bold;
}

/* Unify empowering styles for both class names */
.empowering,
.empowering-full
{
    font-size: 20.4px;  /* 15% smaller than 24px */
    font-weight: bold;
}

/* Full-width, no-wrap headline until screens get narrow */
.empowering-full
{
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
}

/* Allow wrapping on smaller screens */
@media (max-width: 768px)
{
    .empowering-full
    {
        white-space: normal;
    }
}


#userEmail
{
    color: white;
    font-size: 0.95rem;
}

/* Mobile/tablet: guarantee the blue header fills the screen */
@media (max-width: 768px) {
  .header,
  .header-container {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  /* Ensure the logo/email row doesn’t constrain width */
  .header table {
    width: 100% !important;
    table-layout: fixed;
  }

  .header td {
    width: auto !important;
    white-space: normal;
  }

  /* Kill any horizontal scroll that can trigger “shrink” behavior */
  html, body {
    overflow-x: hidden;
  }
}



/* Physician Query field — clamp width to parent and align with toolbar */
#physicianQuery {
  font: inherit;
  box-sizing: border-box;

  /* let it share the row, but never overflow */
  flex: 0 1 420px;
  min-width: 0;
  width: auto;
  max-width: auto;

  /* match toolbar height on desktop */
  height: 32px;
  padding: 6px 10px;

  /* avoid horizontal overflow when long text/placeholder */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* only applies to <input> */
}

/* If you changed it to a <textarea>, keep it compact but growable */
textarea#physicianQuery {
  height: 32px;       /* same row height as the toolbar */
  min-height: 32px;
  line-height: 1.2;
  resize: vertical;   /* user can pull it taller if needed */
  white-space: normal; /* allow wrapping inside the textarea */
}

@media (max-width: 480px) {
  #physicianQuery {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
.analysis-toolbar--stack { gap: 16px; }
.analysis-row { gap: 2px; }
.analysis-row--top { margin-bottom: 8px; }
}

/* === Physician Query mobile clamp (your base) === */
@media (max-width: 480px) {
  #physicianQuery {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* === Patient Info: switch from table to responsive grid === */
#patient-form-grid {
  display: grid;
  grid-template-columns: 260px 1fr; /* right edge of labels aligns to input */
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
  border: none !important;
}

/* allow header & buttons to span full width */
#patient-form-grid .span-2 {
  grid-column: 1 / -1;
}

#patient-form-grid .form-label {
  text-align: right;           /* right-justify labels */
  font-weight: 600;
  white-space: nowrap;
}

#patient-form-grid .form-field > input,
#patient-form-grid .form-field > select,
#patient-form-grid .form-field > textarea {
  width: 100%;
  box-sizing: border-box;
}

/* keep field heights tidy to match your toolbar/buttons */
#patient-form-grid .form-field > input,
#patient-form-grid .form-field > select {
  height: 32px;
}

/* textareas: comfortable but compact */
#patient-form-grid .form-field > textarea {
  min-height: 90px;
  resize: vertical;
}

/* On narrower screens, stack: label on top, field below */
@media (max-width: 680px) {
  #patient-form-grid {
    grid-template-columns: 1fr;
  }
  #patient-form-grid .form-label {
    text-align: left;
    margin-bottom: 2px;
  }
}

@media (min-width: 681px) and (max-width: 800px) {
  #patient-form-grid {
    grid-template-columns: 220px 1fr; /* slightly slimmer label column */
  }
}

/* optional: tighten long inline helper text */
#patient-form-grid .hint {
  font-size: 12px;
  color: #64748b;
}

/* Force white background for patient dropdown on mobile (iOS/WebKit) */
/* Force white background for patient dropdown on mobile (iOS/WebKit) and restore chevron */
#patientDropdown {
  background-color: #f0f0f0 !important;
  color: #000;
  max-width: 130px;  /* adjust as needed */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-clip: padding-box; /* iOS gray-fill fix */
  border: 1px solid #ccc;
  border-radius: 4px;
  padding-right: 1.2rem; /* tighter space for chevron, reduces gap */


  /* custom chevron */
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='12' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M2 4l4 4 4-4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.75rem;
}

#patientDropdown:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
}

/* iOS-specific safety net */
@supports (-webkit-touch-callout: none) and (not (translate: none)) {
  #patientDropdown {
    background-color: #fff !important;
  }
}

/* Full-bleed helper for elements inside padded containers */
.full-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}




/* Tighten label ↔ dropdown spacing inside toolbar without changing global gap */
.toolbar label[for="patientDropdown"] {
  margin-right: 6px !important;  /* desired final spacing */
}
.toolbar #patientDropdown {
  margin-left: -14px;            /* 20px flex gap - 14px = 6px net */
}


/* Small screens: allow the row to grow vertically if wrapping */
@media (max-width: 480px) {
  .toolbar {
    height: auto;
    min-height: 54px;
    padding-top: 12px;
    padding-bottom: 16px;
    margin-bottom: 22px;   /* more space under gray bar on phones */
  }
}


/* Primary link row at bottom of blue header */
.primary-nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 15px 10px 15px; /* tuck under the welcome text */
  box-sizing: border-box;
  background: transparent;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.primary-nav a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

.primary-nav .divider {
  opacity: 0.6;
}

/* Stack nicely on small screens */
@media (max-width: 600px) {
  .primary-nav {
    flex-wrap: wrap;
    gap: 8px;
  }
  .primary-nav .divider {
    display: none;
  }
}

.dx-nav-footer {
  text-align: center;
  margin-top: 6px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
}

.dx-nav-footer a {
  text-decoration: underline;
  color: white;
  margin: 0 6px;
}

.dx-nav-footer a:hover {
  text-decoration: underline;
  color: #A0A0FF;

}

.dx-nav-footer span {
  color: white;
  margin: 0 4px;
}


.edit-personal-btn {
  background-color: #003366;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;

  height: 36px;
  padding: 8px 7px;   /* ✅ 7px left + 7px right */
  width: auto;        /* ✅ shrink-wrap to text + padding */
  min-width: unset;   /* ✅ remove enforced min width */
  font-weight: bold;
}


.edit-personal-btn:hover {
  opacity: 0.92;
}




/* Prevent label wrapping and rebalance columns on mobile */
@media (max-width: 600px) {
  #doctor-info-panel table {
    table-layout: fixed;   /* helps the widths below take effect */
    width: 100%;
  }
  #doctor-info-panel td:first-child {
    white-space: nowrap;   /* keep "Number of Patients:" on one line */
    width: 42% !important; /* give the label more room than the 30% inline width */
    padding-right: 8px;    /* tighten a bit on small screens */
  }
  #doctor-info-panel td:last-child {
    width: 58% !important;
  }
  /* ensure value spans can shrink as needed */
  #doctor-info-panel td:last-child span {
    display: inline-block;
    min-width: 0;
  }
}

.logout-col {
  width: 200px;          /* room for the button */
  text-align: center;    /* horizontal centering */
  vertical-align: middle;/* vertical centering inside table cell */
}

.logout-col .logout-btn {
  width: 70px;
  height: 36px;
  font-weight: bold;
}


/* Keep left-column labels (e.g., "Number of Patients:") from wrapping */
#doctor-info-panel td:first-child > strong {
  white-space: nowrap;
}

/* (deprecated) account-meta nested table rules removed — row now lives in main table columns */

/* keep these generic sizes if you want to reuse the class elsewhere */
/* unified logout size */
.logout-btn {
  width: 70px;
  height: 36px;
  font-weight: bold;
}


.account-meta-row td:last-child > div,
td:last-child > div {
  margin: 4px 0;
  line-height: 1.35;
}


/* Lock the main doctor info table to prevent the initial reflow “jump” */
#doctor-info-panel > table {
  table-layout: fixed;     /* prevents width recalculation on data load */
  width: 100%;
}

#doctor-info-panel > table td:first-child {
  width: 32%;
  white-space: nowrap;
  padding-right: 10px;
  text-align: right;
}

#doctor-info-panel > table td:last-child {
  width: 68%;
}

/* Make label + dropdown act as one item inside .toolbar, with a 6px internal gap */
.patient-picker {
  display: flex;
  align-items: center;
  gap: 2px;          /* ← the exact space you want between label and select */
}





/* Visually-hidden label for a11y */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}



.toolbar-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

/* Centered dropdown, same “white on mobile” behavior as dashboard */
.diagnosis-dropdown {
  background-color: #fff;
  color: #000;
  height: 35px;
  border-radius: 4px;
  border: 1px solid #ccc;
  padding: 0 1.6rem 0 8px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='black'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.9rem;
}





/* Keep row-2 content nicely centered and contained */
.toolbar-row--bottom #physician-query-group {
  max-width: 680px;
  width: 100%;
}

/* Ensure the submit button keeps height if global styles change */
.submit-btn-inline {
  height: 32px;
}



/* Stack the toolbar into two rows, centered */
.analysis-toolbar--stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;     /* more vertical breathing room by default */
  width: 100%;
}




/* Ensure the inner container spans full width inside the gray bar */
.toolbar-center {
  width: 100%;
  max-width: 1100px;              /* keep your layout cap if desired */
  margin: 0 auto;
}


/* Prevent any accidental margin collapse pushing content outside the gray */
.toolbar-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
  margin: 0;                      /* important: no collapsing margins */
}

/* Keep the bottom row (textarea + submit) centered and contained */
.toolbar-row--bottom #physician-query-group {
  width: 100%;
  max-width: 680px;
}



/* The bar must wrap BOTH rows and not collapse */
.toolbar {
  background-color: #ffffff;  
  padding: 12px 12px;
  box-sizing: border-box;
  position: relative;          /* ensures stacking/containment */
  margin-bottom: 18px;         /* space below the whole gray bar */
}

/* Slim toolbar when only the tabs row is visible */
.toolbar--slim {
  padding-top: 6px;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

/* Compact spacing for the first heading under the toolbar */
.toolbar + .tab-section .pi-title { margin-top: 6px; }


/* Make the toolbar a vertical stack of two rows */
.analysis-toolbar {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Each row is a centered flex line contained by the gray bar */

.analysis-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;   /* slightly larger spacing between controls */
  flex-wrap: wrap;
  width: 100%;
  margin: 0;   /* prevent margin-collapsing out of the gray */
}




/* Bottom row: textarea grows, button sits to the right (same row) */
.analysis-row--bottom #physician-query-group {
  flex: 1 1 520px;             /* grows but wraps nicely on small screens */
  max-width: 720px;
  min-width: 240px;
  display: flex;
}

.analysis-row--bottom #physicianQuery {
  width: auto;
  height: 36px;                /* matches button height */
  padding: 6px 8px;
  box-sizing: border-box;
  line-height: 1.2;
  resize: vertical;
 margin-bottom: 4px; /* tighten space under text box */
}

/* Submit button on the same line as the textarea */
.analysis-row--bottom .analysis-submit {
  background-color: #FFFFFF;
  color: #fff;
  width: 120px;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  flex: 0 0 auto;
}

/* Keep the account strip clearly below the header/toolbar block */
.account-strip {
  position: relative;
  z-index: 1;                  /* stays above page background, not overlapped */
  margin-top: 6px;             /* small breathing room under gray bar */
}



/* Very small phones: ensure no horizontal overflow */
@media (max-width: 480px) {
  .analysis-row--bottom #physician-query-group {
    flex-basis: 100%;
    max-width: 100%;
  }
  .analysis-row--bottom .analysis-submit {
    width: 100%;
    max-width: 320px;
  }
}



/* One-click action launcher */
.action-launcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.pill-btn{
  background:#003366;
  color:#fff;
  border:none;
  border-radius:999px;
  padding:8px 14px;
  font-weight:700;
  cursor:pointer;
  height:36px;
}
.pill-btn:hover{ opacity:.92; }

.menu{ position:relative; }
.more-btn{ background:#334155; } /* slate-ish for contrast */

/* Popover menu */
.menu-list{
  position:absolute;
  top:42px;
  right:0;
  min-width:220px;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:8px;
  padding:6px;
  list-style:none;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  z-index:50;
}
.menu-item{
  width:100%;
  text-align:left;
  background:transparent;
  border:none;
  padding:8px 10px;
  border-radius:6px;
  cursor:pointer;
  font-weight:600;
}
.menu-item:hover{ background:#f1f5f9; }
.menu-list .divider{
  height:1px;
  margin:6px 4px;
  background:#e2e8f0;
}

/* Let popovers escape their parents */
.header,
.header-container,
.toolbar,
.analysis-toolbar {
  overflow: visible !important;
}

/* Ensure the local positioning context for the menu */
.menu { position: relative; }

/* Popover sits on top of everything */
.menu-list {
  position: absolute;
  top: 42px;              /* drop below the button */
  right: 0;
  z-index: 1000;
}


/* ===== 3-D "press-in" action buttons (Holistic/Pharma/Hybrid/More) ===== */
.action-launcher .pill-btn,
.action-launcher .more-btn {
  --btn-bg: #e9eef5;          /* face */
  --btn-edge: #9aa9bf;        /* bottom edge */
  --btn-light: #ffffff;       /* top-left light */
  --btn-shadow: #b9c4d5;      /* bottom-right shadow */
  --btn-gloss: rgba(255,255,255,.6);

  appearance: none;
  border: 1px solid #b6c2d3;
  background:
    linear-gradient(180deg, var(--btn-gloss), transparent 60%),
    linear-gradient(180deg, #f7f9fc, var(--btn-bg));
  color: #0f172a;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;

  /* 3-D look: outer drop + raised edge */
  box-shadow:
    0 10px 0 var(--btn-edge),          /* hard bottom edge to look raised */
    -6px -6px 12px var(--btn-light),   /* soft top-left highlight */
    6px 6px 12px var(--btn-shadow);    /* soft bottom-right shadow */

  transform: translateY(0);
  transition:
    transform 60ms ease,
    box-shadow 60ms ease,
    filter 160ms ease;
}

/* Hover = slight lift / brighten */
.action-launcher .pill-btn:hover,
.action-launcher .more-btn:hover {
  filter: brightness(1.03);
  box-shadow:
    0 12px 0 var(--btn-edge),
    -7px -7px 14px var(--btn-light),
    7px 7px 14px var(--btn-shadow);
}

/* Pressed = "clicked in" (true inset) */
.action-launcher .pill-btn:active,
.action-launcher .more-btn:active,
.action-launcher .pill-btn.is-pressed,
.action-launcher .more-btn.is-pressed {
  transform: translateY(6px);
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,.15),     /* inner top shadow */
    inset 0 -3px 6px rgba(255,255,255,.5),/* inner bottom lift */
    0 4px 0 var(--btn-edge);              /* reduced outer edge */
  background:
    linear-gradient(180deg, rgba(255,255,255,.3), transparent 60%),
    linear-gradient(180deg, #e4eaf2, #d9e1ee);
}

/* Keyboard focus ring */
.action-launcher .pill-btn:focus-visible,
.action-launcher .more-btn:focus-visible {
  outline: 3px solid #38bdf8; /* sky-400 */
  outline-offset: 2px;
}

/* Prefer-reduced-motion respect */
@media (prefers-reduced-motion: reduce) {
  .action-launcher .pill-btn,
  .action-launcher .more-btn {
    transition: none;
  }
}

/* ==== Classic tabs inside the gray toolbar ==== */
.toolbar .tabs-bar{
  position: relative;
  display:flex;
  gap:2px;
  margin:0 0 8px 0;
  padding:0;
  border-bottom:none;
}

/* Full-bleed rail under tabs */
.toolbar .tabs-bar::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:-1px;
  width:100vw;
  border-bottom:1px solid #9aa3b0;
  pointer-events:none;
  z-index:0;
}

/* Inactive tabs = dim gray */
.toolbar .tabs-bar .tab-btn{
  appearance:none;
  background:#d8dbe2;         /* clearly dimmer than white */
  color:#475569;
  font-weight:600;
  padding:6px 12px;
  height:32px;
  line-height:20px;
  border:1px solid #9aa3b0;
  border-bottom-color:#9aa3b0;
  border-radius:4px 4px 0 0;
  margin:0;
  position:relative;
  top:1px;                    /* sit just above the rail */
  cursor:pointer;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset -1px -1px 0 #cfd3d9;
}
.toolbar .tabs-bar .tab-btn:hover{
  background:#cfd3da;
}

/* Active tab = white, no bottom border (opens into panel) */
.toolbar .tabs-bar .tab-btn.active {
  background: #fff;
  color: #0f172a;
  border-color: #000;          /* black like the others */
  border-bottom: none;         /* remove actual bottom border */
  position: relative;
  z-index: 2;
}

/* Panel under tabs */
/* all-styles.css */
.tab-section {
  background: #ffffff;
  /* remove the line above the title */
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  padding: 12px;
  max-width: 1100px;
  margin: 0 auto 6px auto;
}

/* Patch to cover the gap */
.toolbar .tabs-bar .tab-btn.active::after {
  content: "";
  position: absolute;
  left: -1px;                  /* overlap left corner */
  right: -1px;                 /* overlap right corner */
  bottom: -1px;
  height: 2px;                 /* covers the rail fully */
  background: #fff;            /* exact tab background */
  z-index: 3;                  /* sits above rail */
}

/* Small phones */
@media (max-width:480px){
  .toolbar .tabs-bar{ gap:0; }
  .toolbar .tabs-bar .tab-btn{ padding:6px 10px; height:30px; }
}




:root{
  --drawer-width: 280px;
  --drawer-max-h: 72vh;
}

.drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,.28);
  backdrop-filter:saturate(120%) blur(2px);
  z-index:1000;
  opacity:0;
  visibility:hidden;
  transition:opacity .25s ease, visibility 0s linear .25s;
}

.drawer{
  position: fixed;
  top: var(--drawerTop, 0px) !important;
  left:0;
  height:auto;
  max-height:var(--drawer-max-h);
  margin-top: 0 !important;                /* under your blue header; JS will adjust, see below */
  width:var(--drawer-width);
  background:#fff;
  border-right: 0;
  border-bottom:1px solid #e5e7eb;
  border-radius:0 12px 12px 0;
  box-shadow: 0 14px 38px rgba(2,6,23,.18);
  z-index:1001;

  transform:translateX(-100%);    /* fully off-screen left */
  opacity:0.01;
  pointer-events:none;
  transition:transform .28s ease, opacity .28s ease;
}

.drawer-inner{ display:flex; flex-direction:column; max-height:var(--drawer-max-h); }
.drawer-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:0 12px 0 0;
}
.drawer-title{ font-weight:700; color:#0f172a; }
.drawer-close{ border:none; background:transparent; font-size:18px; line-height:1; cursor:pointer; }

.drawer-list{ list-style:none; margin:0; padding:6px; overflow:auto; }
.drawer-link{
  display:block; width:100%; text-align:left;
  padding:10px 12px; border:none; background:transparent; cursor:pointer;
  border-radius:10px; font-weight:600; color:#0f172a;
}
.drawer-link:hover{ background:#f1f5f9; }
.drawer-link:focus{ outline:2px solid #0ea5e9; outline-offset:2px; }
.drawer-sep{ height:1px; background:#e5e7eb; margin:8px 4px; }

/* open states */
.drawer-backdrop.is-open{
  opacity:1; visibility:visible; transition:opacity .25s ease;
}
.drawer.is-open{
  transform:translateX(0);
  opacity:1;
  pointer-events:auto;
}



/* DESKTOP HOVER-TO-OPEN (optional): only on devices with a real pointer */
@media (pointer:fine){
  .logo-stack:hover ~ #drawerBackdrop,
  .logo-stack:hover ~ #sideDrawer{
    /* these selectors won't match since the drawer is outside header;
       we'll open via JS for reliability. Keeping media rule here for clarity. */
  }
}


.header-hamburger{
  display:inline-flex;
  flex-direction:column;
  gap:5px;
  width:38px;
  height:30px;
  margin-top:4px;
  padding:6px 8px;
  border:none;
  background:transparent;
  cursor:pointer;
}
.header-hamburger .bar{
  height:2px;
  width:100%;
  background:#fff; /* white bars on blue header */
  border-radius:2px;
}


/* Put the hamburger before the logo without changing HTML order */
.logo-stack { order:-1; }


/* Brand + email stacked and aligned */
.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  margin-left: 10px;           /* spacing from logo/hamburger */
}

/* Keep your original brand-name size (24px) and remove its left margin */
.brand-block .brand-name {
  color: #fff;
  font-size: 24px;             /* same as your .brand-name definition */
  font-weight: 700;
  margin-left: 0;              /* eliminate offset that misaligns */
}

/* Email sits directly under the brand, same left edge */
.brand-email {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 2px;
  margin-left: 0;              /* exact left alignment */
  text-align: left;
}


/* Email + status inline under the title */
.brand-meta {
  display: flex;
  align-items: baseline; /* align text nicely */
  gap: 6px;              /* space between email and (logged in) */
  margin-top: 2px;       /* spacing from the title */
}

/* keep the email tidy on the same row */
.brand-email { margin-top: 0; }

/* the "(logged in)" tag */
.login-status {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

/* On small screens, shrink the NevoMD title font */
/* Force smaller brand text on mobile (no wrap) */
@media (max-width: 600px) {
  .brand-block .brand-name {
    font-size: 0.85rem !important;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .brand-block .brand-name {
    font-size: 1.10rem !important;
    white-space: nowrap;
  }
}

/* iPhone / small phone fix: stack query box under buttons */
/* --- iPhone/small phones: fix query box overlap --- */
@media (max-width: 480px) {
  /* Ensure the bottom row stacks vertically and fills width */
  .analysis-row--bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;      /* a bit more gap inside the row */
    width: 100% !important;
    padding-bottom: 6px !important;  /* prevents the next section from riding up */
  }

  /* Make the input group full width */
  #physician-query-group {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Make the input full width and add bottom margin */
  #physicianQuery {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 8px !important;   /* space under the field */
  }

  /* Put the submit/go button on its own line, full width (or capped) */
  .analysis-row--bottom .analysis-submit {
    display: block !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
  }

  /* Add more breathing room below the gray bar so it can't collide with tabs */
  .toolbar {
    margin-bottom: 33px !important;
  }
}


/* Extra space under the top (Holistic/Pharma/Hybrid) row */
/* Extra space under the top (Holistic/Pharma/Hybrid) row */
.analysis-row--top {
  margin-bottom: 16px;
}


/* Tabs row inside the gray toolbar */
.analysis-row--tabs {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 0 10px 0; /* small spacing under the tabs inside the gray bar */
}

/* When tabs live inside the toolbar, drop their outside margins and hide the old rule line */
.toolbar .tabs-bar { margin: 0; }
.toolbar .tabs-rule { display: none; }

/* Force the Run AI-Diagnostic container background to white */
/* Only the two rows should be white, keep the toolbar gray */
.analysis-row--top,
.analysis-row--bottom {
  background:#ffffff;
}


/* Mask the baseline under the active tab so NO line peeks through */
.toolbar .tabs-bar .tab-btn.active::after{
  content:"";
  position:absolute;
  left:-1px;
  right:-1px;
  bottom:-1px;
  height:2px;               /* covers the 1px rail comfortably */
  background:#FFFFFF;       /* EXACT match to .toolbar bg */
  z-index:-1;               /* sits behind the tab face, above the rail */
}



#section-labs {
  background-color: #e6f3ff; /* light blue */
  padding: 20px;
}

#section-patient {
  background-color: #e6f3ff; /* light blue */
  padding: 20px;
}

#labs-section {
  background-color: #e6f3ff; /* light blue */
  padding: 20px;
}

#analysis-row--top {
  background-color: #e6f3ff; /* light blue */
  padding: 8px 12px 0px;   /* top | sides | bottom */
}


/* Make the header a vertical flex container so we can pin the toolbar to its bottom */
header.header
{
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Move THIS toolbar (the one inside header) to the bottom edge of the header */
header.header > .toolbar
{
    order: 9999;              /* ensure it’s last in the header */
    margin-top: auto;         /* pushes it down to the bottom edge */
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0 !important;
    box-shadow: none !important;

    /* keep it white so no blue shows under it */
    background: #ffffff;

}

/* Safety: kill any bottom margin on last header row above the toolbar */
header.header > *:not(.toolbar):last-child
{
    margin-bottom: 0;
    padding-bottom: 0;
}


/* Mobile: kill the gap below the toolbar when it lives inside the blue header */
@media (max-width: 600px) {
  header.header > .toolbar {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Desktop too, for safety (beats earlier base rule) */
header.header > .toolbar {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}


/* ==== Tabs: show only the active panel ==== */
.tab-section {
  display: none;
}
.tab-section.active {
  display: block;
}

/* Honor the HTML 'hidden' attribute everywhere (used by switchTab) */
[hidden] {
  display: none !important;
}


/* Make the two stacked Diagnosis sections meet tightly */
#section-diagnosis3 { padding-bottom: 1px; }  /* was 12px via .tab-section */
#section-diagnosis2 { padding-top: 1px; }     /* was 12px via .tab-section */


.nvx-range { position: relative; height: 12px; background: #eee; border-radius: 6px; overflow: hidden; }
.nvx-range > .bar { position: absolute; left: 0; top: 0; height: 100%; min-width: 2px; }

/* Nevonix: diagnosis toolbar centering + trial lock message line break */
.dx-query-row
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.dx-focus-row
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

#dxTrialLockMsg
{
    flex-basis: 100%;
    width: 100%;
    text-align: center;
    margin-top: 6px;
}



/* ===========================================================
   Nevonix custom select styling (shared look & feel)
   Used by: admin.html role dropdown (and can be reused elsewhere)
   =========================================================== */
select.nevonix-select
{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #e9e9e9;
    border: 1px solid #bdbdbd;
    border-radius: 4px;
    padding: 6px 34px 6px 10px;
    line-height: 1.2;
    background-image:
        linear-gradient(45deg, transparent 50%, #666 50%),
        linear-gradient(135deg, #666 50%, transparent 50%),
        linear-gradient(to right, #cfcfcf, #cfcfcf);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%,
        calc(100% - 32px) 50%;
    background-size:
        6px 6px,
        6px 6px,
        1px 22px;
    background-repeat: no-repeat;
    color: #000;
}

select.nevonix-select:focus
{
    outline: none;
    border-color: #6b6b6b;
}

/* ============================================================
   ADMIN PAGE: Normalize all dropdowns (width/height/chevron)
   - Ensures Delete Patient matches Select User and other selects
   - Slightly reduces select height to align with text inputs
   ============================================================ */


/* Shared dropdown styling (used by admin.html and other pages) */
select.admin-select
{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #f0f0f0;
    border: 1px solid #999;
    border-radius: 6px;
    padding: 6px 32px 6px 10px;
    font-size: 14px;
    line-height: 1.2;
    color: #000;
    background-image:
        linear-gradient(45deg, transparent 50%, #555 50%),
        linear-gradient(135deg, #555 50%, transparent 50%),
        linear-gradient(to right, #d0d0d0, #d0d0d0);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 11px) calc(50% - 2px),
        calc(100% - 30px) 50%;
    background-size:
        5px 5px,
        5px 5px,
        1px 60%;
    background-repeat: no-repeat;
}

select.admin-select:focus
{
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.20);
}


select.admin2-select
{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #f0f0f0;
    border: 1px solid #999;
    border-radius: 6px;
    padding: 6px 32px 6px 10px;
    font-size: 14px;
    line-height: 1.2;
    color: #000;
    background-image:
        linear-gradient(45deg, transparent 50%, #555 50%),
        linear-gradient(135deg, #555 50%, transparent 50%),
        linear-gradient(to right, #d0d0d0, #d0d0d0);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 11px) calc(50% - 2px),
        calc(100% - 30px) 50%;
    background-size:
        5px 5px,
        5px 5px,
        1px 60%;
    background-repeat: no-repeat;
}

select.admin2-select:focus
{
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.20);
}

/* Admin page: center 'Edit User Account' label + Submit button as a group */
body.admin-page .admin-edit-header
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

/* Admin page: ensure Delete Patient dropdown matches Select User dropdown width */
body.admin-page #patientDropdown
{
    width: 287px;
    max-width: 287px;
}

@media (max-width: 600px)
{
    body.admin-page #patientDropdown
    {
        width: 200px;
        max-width: 200px;
    }
}

/* Admin page mobile fixes */

body.admin-page select.admin-select,
body.admin-page .diagnosis-dropdown
{
  width: 117px;
  max-width: 117px;
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  padding-top: 5px;
  padding-bottom: 5px;
}

body.admin-page select.admin2-select,
body.admin-page .diagnosis-dropdown
{
  width: 287px;
  max-width: 287px;
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  padding-top: 5px;
  padding-bottom: 5px;
}

@media (max-width: 600px)
{
    
    body.admin-page select.admin-select
    {
                
  	width: 200px;
  	max-width: 200px;
    }

    body.admin-page select.admin2-select
    {
                
  	width: 200px;
  	max-width: 200px;
    }

    /* Prevent admin field labels from word-wrapping on mobile */
    body.admin-page #doctor-form td:first-child,
    body.admin-page #doctor-form td:first-child strong
    {
        white-space: nowrap !important;
    }
}
