body {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-left: clamp(12px, 4vw, 20px);
  padding-right: clamp(12px, 4vw, 20px);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  background: #ffffff;
  color: #1f1f1f;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.App-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background-color: #fff;
  padding-bottom: 5px;
  padding-top: 15px;
  padding-right: 15px;
  margin-bottom: 15px;
  border-bottom: 1.5px solid #d5cde1;
}

.header-left {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: left;
  background-color: #fff;
  padding-bottom: 5px;
  padding-top: 5px;
  padding-right: 5px;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .App-header {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 10px;
    text-align: center;
  }

  .header-left,
  .header-title,
  .header-right {
    justify-self: center;
  }

.header-right {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: row;
  gap: 15px;
  text-align: left;
  position: relative;
  padding-bottom: 5px;
  padding-top: 5px;
  padding-right: 2px;
  padding-left: 15px;
  margin-bottom: 5px;
  }
}

@media (max-width: 480px) {
  .header-right {
    flex-direction: column;
    align-items: center;
  }

  .user-info {
    text-align: center;
  }
}

.App-logo {
  height: clamp(60px, 20vw, 120px);
  padding-right: 15px;
  padding-bottom: 5px;
  padding-top: 15px;
  margin-bottom: 15px;
}

.header-title {
  text-align: center;
}

.header-title h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  color: black;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-size: 0.95rem;
  color: #222;
  margin-top: 3px;
  margin-left: 3px;
}

.user-info p {
  margin: 2px 0;
}

.logout-button {
  background-color: #5e3ea1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-self: flex-start;
  margin-top: 2px;
}

.logout-button:hover {
  background-color: #977dd9;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #e6e1f3;
  color: black;
  padding: 16px 0 12px 0;
  font-family: inherit;
  border-top: 1px solid #e2e2e2;
  border-bottom: 1px solid #e2e2e2;
  font-weight: 600;
}

.navbar .dropbtn {
  background-color: transparent;
  color: black;
  border: none;
  font-size: 1rem;
  line-height: normal;     /* let padding control spacing */
  padding: 8px 18px 2px;   /* taller nav bar tap target */
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.25s, color 0.25s;
  border-radius: 4px;
  display: flex;
  align-items: center;      /* ensures perfect vertical centering */
  justify-content: center;
}

.navbar .dropdown {
  position: relative;
  display: inline-block;
}

.navbar .dropdown .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  background-color: white;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 10;
  border-radius: 6px;
  overflow: hidden;
}

.navbar .dropdown .dropdown-content a,
.navbar .dropdown .dropdown-content button {
  color: black;
  padding: 10px 14px;
  text-align: left;
  text-decoration: none;
  display: block;
  background: white;
  border: none;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}

.navbar .dropdown .dropdown-content a:hover,
.navbar .dropdown .dropdown-content button:hover {
  background-color: #5e3ea1;
  color: white;
}

.navbar .dropdown:hover .dropdown-content {
  display: block;
}

.navbar .dropdown:hover .dropbtn {
  background-color: #d7cde8;
  color: black;
}

.navbar .dropdown + .dropdown {
  margin-left: 10px;
}

.dropdown-menu {
  text-align: left; 
  font-family: Arial, sans-serif;
}

.dropdown-menu label {
  display: block;
  font-size: 1.2rem; 
  font-weight: bold;
  margin-bottom: 10px;
}

.dropdown-menu select {
  width: 100%; 
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  border: 2px solid #6045a4;
  border-radius: 8px;
  background-color: #f8f9fa;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropdown-menu select:hover {
  background-color: #e8e8f0;
}

.dropdown-menu select:focus {
  outline: none;
  border-color: #0078d7;
  box-shadow: 0 0 8px rgba(0, 120, 215, 0.5);
}

.ds1-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0 12px;
}

.ds1-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  order: 1;
}

#content,
#content form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.jobseeker-sidebar {
  flex: 0 0 360px;
  max-width: 100%;
  background: #f8f9fb;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 20px;
  order: 2;
  display: flex;
  flex-direction: column;
}

.sidebar-resources {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar-resources-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f1f1f;
}

.sidebar-resources-group {
  margin-bottom: 12px;
}

.sidebar-resources-group h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #3e3e3e;
  text-transform: none;
}

.sidebar-resources-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-resources-list li {
  margin-bottom: 6px;
}

.sidebar-resources-list a {
  color: #3f62b8;
  text-decoration: underline;
  font-size: 0.92rem;
}

.sidebar-resources-list a:hover {
  color: #2d4ea0;
}

.sidebar-resources-empty {
  margin: 0;
  font-size: 0.92rem;
  color: #666;
}

.sidebar-section {
  margin-top: 12px;
}

.sidebar-panel {
  margin-top: 8px;
}

.sidebar-panel .menu-content {
  margin-bottom: 0;
}

.sidebar-panel {
  border: 1px solid #6045a4;
  border-radius: 1px;
  background: #ffffff;
  padding: 12px;
  box-shadow: none;
  max-width: 100%;
  overflow-x: hidden;
}

.sidebar-panel .menu-content {
  border: 0;
  box-shadow: none;
  padding: 0;
  width: 100%;
}

.sidebar-panel .menu-content.open {
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 0;
  width: 100%;
}

.sidebar-scoring .menu-content,
.sidebar-scoring .menu-content.open {
  border: 0;
  padding: 0;
  margin-top: 0;
}

.sidebar-section--scoring {
  margin-top: auto;
}

.scoring-source {
  display: none;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.sidebar-overlay.hidden {
  display: none;
}

.sidebar-overlay-panel {
  background: #ffffff;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.sidebar-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-overlay-body .menu-content {
  max-height: none;
  margin-bottom: 0;
}

.jobseeker-sidebar h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-family: Arial, sans-serif;
}

.jobseeker-label-wrap {
  position: relative;
}

.jobseeker-label-text {
  position: relative;
  cursor: help;
}

.jobseeker-tooltip {
  position: absolute;
  top: -8px;
  left: 0;
  transform: translateY(-100%);
  background: #2f2f2f;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  width: 260px;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 6px 16px rgba(0,0,0,0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.jobseeker-tooltip:before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 12px;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #2f2f2f transparent transparent transparent;
}

.jobseeker-tooltip.show {
  opacity: 1;
  transform: translateY(-110%);
}

.jobseeker-sidebar .dropdown-menu {
  width: 90%;
}

.jobseeker-sidebar .dropdown-menu select {
  width: 90%;
}

.jobseeker-sidebar .field-row {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.jobseeker-sidebar .field-row label {
  width: 100%;
  margin: 0;
  white-space: normal;
}

.jobseeker-sidebar .field-row input[type="text"],
.jobseeker-sidebar .field-row input[type="tel"],
.jobseeker-sidebar .field-row input[type="email"],
.jobseeker-sidebar .field-row input[type="date"],
.jobseeker-sidebar .field-row textarea,
.jobseeker-sidebar .field-row select {
  width: 100%;
  min-width: 0;
  background-color: #f7f7f7;
  border: 1px solid #b9b9b9;
  border-radius: 3px;
}

.sidebar-comments {
  margin-top: 12px;
}

.sidebar-comments-panel {
  margin-top: 8px;
  border: 1px solid #6045a4;
  border-radius: 1px;
  background: #fff;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: none;
  padding: 12px;
}

.sidebar-comment-list {
  padding: 8px;
}

.sidebar-comment-list .comment-item {
  border-left-color: #5e3ea1;
}

.time-log-table tbody tr {
  cursor: pointer;
}

.time-log-table tbody tr:hover {
  background: #f4f7ff;
}

#scoringOverviewTable tbody tr {
  cursor: pointer;
}

#scoringOverviewTable tbody tr:hover {
  background: #f4f7ff;
}

#hvScoring .menu-content.open {
  max-height: none;
}

.jobseeker-meta {
  margin: 8px 0;
  line-height: 1.4;
}

.menu-box-container {
  display: flex;
  flex-direction: column;
  --menu-box-gap: 12px;
  gap: var(--menu-box-gap);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0 auto 12px;
  padding: 0;
}

.menu-box {
  background: #e6e1f3;
  color: #1f1f1f;
  border: 2px solid #c9c1e2;
  border-radius: 6px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  appearance: none;
  font: inherit;
  min-width: 0;
  width: 100%;
  font-weight: 900;
}

.settings-intro {
  margin-bottom: 20px;
}

.settings-section {
  margin-bottom: 28px;
}

.settings-section-title {
  margin-bottom: 6px;
}

.settings-menu-grid {
  display: flex;
  flex-direction: column;
}

.menu-box .menu-box-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.menu-box .menu-box-subtitle {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3f3f46;
  margin-top: 4px;
}

.menu-box::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #8f83b7;
  border-radius: 3px;
  background: #f5f3fb;
  color: #3b2b62;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.menu-box[aria-expanded="true"]::before {
  content: "-";
}

.menu-box:hover {
  background-color: #ddd6f0;
  border-color: #b9aedf;
  color: #1f1f1f;
}

.menu-box.active {
  background-color: #d6ccee;
  border-color: #a998d8;
  color: #1f1f1f;
}

.menu-box[aria-expanded="true"] {
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.menu-box:focus-visible {
  outline: 3px solid #5590cc;
  outline-offset: 2px;
}

.menu-box i {
  display: none;
}

.menu-box span {
  font-size: 1.1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.discovery-stage-one .menu-box-label {
  flex: 1 1 auto;
}

.discovery-stage-one .menu-box-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2f2f2f;
  white-space: nowrap;
  background: transparent;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
}

.discovery-stage-one .menu-box-status:focus-visible {
  outline: 2px solid #5a3b8e;
  outline-offset: 2px;
}

.discovery-stage-one .menu-box-status-pill {
  position: relative;
  width: 42px;
  height: 20px;
  border-radius: 999px;
  background: #d65a86;
  border: 1px solid #c45179;
  flex: 0 0 auto;
}

.discovery-stage-one .menu-box-status-pill::after {
  content: "–";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  color: #c45179;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.2s ease;
}

.discovery-stage-one .menu-box-status--complete .menu-box-status-pill {
  background: #6cc04a;
  border-color: #5aa83d;
}

.discovery-stage-one .menu-box-status--complete .menu-box-status-pill::after {
  content: "✓";
  color: #4b9134;
  transform: translateX(20px);
}

.discovery-stage-one .menu-box-status--mentor-review .menu-box-status-pill {
  background: #f3c969;
  border-color: #e2b957;
}

.discovery-stage-one .menu-box-status--mentor-review .menu-box-status-pill::after {
  content: "?";
  color: #b9862c;
  transform: translateX(10px);
}

.discovery-stage-one .menu-box-status--edits-needed .menu-box-status-pill {
  background: #f2a25f;
  border-color: #e18f48;
}

.discovery-stage-one .menu-box-status--edits-needed .menu-box-status-pill::after {
  content: "!";
  color: #c2702f;
  transform: translateX(10px);
}

.discovery-stage-one .menu-box-status--incomplete .menu-box-status-pill::after {
  content: "–";
}

.menu-box-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #555;
  margin-bottom: 6px;
}

.menu-box-check input {
  margin: 0;
  accent-color: #5590cc;
}

.menu-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, background-color 0.3s ease;
  border: 2px solid #e0d9f0;
  border-top: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: #ffffff;
  box-shadow: none;
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.menu-content.open {
  padding: 12px;
  max-height: none;
  opacity: 1;
  overflow: visible;
  background-color: #ffffff;
  border-color: #cfc5e8;
  box-shadow: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: calc(-1 * var(--menu-box-gap) - 2px);
}

.menu-content[aria-hidden="true"] {
  pointer-events: none;
}

.ai-feedback-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.ai-feedback-btn.is-busy {
  opacity: 0.7;
  cursor: wait;
}

.ai-feedback-status {
  color: #444;
  font-size: 0.95rem;
}

.ai-feedback-output {
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #dce6ff;
  border-radius: 6px;
  background: #f7f9ff;
  white-space: pre-line;
  line-height: 1.5;
}

.ai-feedback-hint {
  margin: 0 0 6px;
  color: #444;
}

.section-divider {
  border: none;
  border-top: 2px dashed #62449b;
  margin: 30px auto;
  width: 90%;
}

@media (max-width: 1230px) {
  .ds1-layout {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
  }

  .jobseeker-sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    order: 0;
    margin-bottom: 16px;
  }

  .ds1-main {
    order: 1;
    flex-basis: 100%;
    min-width: 100%;
  }

  .menu-box-container {
    max-width: 100%;
    width: 100%;
    padding: 0;
    flex-direction: column;
  }

  .menu-box {
    min-width: 0;     /* CRITICAL */
    overflow: hidden; /* prevents content from forcing width */
  }
}

button {
  border-radius: 1px;
  border: 1px solid #6045a4;
  padding: 5px;
  margin-bottom: 5px;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #e6e1f3;
  color: black;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

button:hover {
  background-color: #977dd9;
  color: black;
  border-color: #6045a4;
}

.sidebar-button {
  border-radius: 1px;
  border: 1px solid #6045a4;
  padding: 5px;
  margin: 0 auto 5px;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: white;
  color: black;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
  display: block;
  width: 90%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.sidebar-button:hover {
  background-color: #977dd9;
  color: black;
  border-color: #6045a4;
}

.dictation-btn,
.comment-btn,
.comment-rewrite-btn {
  padding: 5px;
  margin: 2px;

  background: #f8f9fb;
  border: 1px solid #d0d4dc;
  color: #333;
  font-size: 14px;
  border-radius: 6px;
}

.dictation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin: 2px;
  width: 32px;
  height: 32px;
}

.dictation-btn i {
  color: #1f1f1f;
}

.dictation-btn.is-recording {
  background: #ffeef3;
  border-color: #f3b3c8;
}

.dictation-btn.is-recording i {
  color: #d6336c;
}

.dictation-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dictation-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  padding-left: 8px;
  border-left: 1px solid #d0d4dc;
  align-items: center;
}

.comment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.comment-rewrite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 5px;
  color: #6045a4;
  font-size: 16px;
}

.comment-rewrite-btn.is-busy {
  opacity: 0.6;
  cursor: wait;
}

.dictation-btn:hover,
.comment-btn:hover,
.comment-rewrite-btn:hover {
  background: #e6dcff;
  border-color: #c5c9d4;
}

.dictation-btn:hover i {
  color: #6045a4;
}

#auth-section {
  text-align: left;
  margin-top: 50px;
  font-family: Arial, sans-serif;
}

#job-seeker-info {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
}

#job-seeker-info h3 {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #333;
  font-family: Arial, sans-serif;
}

#job-seeker-info p {
  font-size: 1em;
  line-height: 1.5;
  color: #555;
  margin: 5px 0;
  font-family: Arial, sans-serif;
}

#job-seeker-info p span {
  font-weight: bold;
  color: #333;
}

.contact-field {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #ccc;
  padding-top: 5px;
  padding-left: 5px;
  padding-right: 5px;
  padding-bottom: 2px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
  width: 100%;
}

.contact-field label {
  margin-top: 10px;
  margin-bottom: 1px;
  padding-top: 6px;
  padding-right: 2.5px;
  padding-bottom: 2.5px;
  padding-left: 2.5px;
}

.contact-field input {
  padding: 2.5px;
  font-size: 1em;
  background-color: white; 
}

.add-contact-btn, .remove-contact-btn {
  margin-top: 10px;
  padding: 10px;
  font-size: 1em;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 240px max-content;
  column-gap: 16px;
  align-items: center;
  margin: 8px 0;
  width: 100%;
  box-sizing: border-box;
}

.field-check-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  align-items: start;
  margin: 8px 0;
}

.field-check-input {
  margin-top: 6px;
  width: 16px;
  height: 16px;
  accent-color: #5590cc;
}

.field-check-content .field-row {
  margin: 0;
}

.field-row label {
  text-align: left; 
  font-size: 1em;
  line-height: 1.4;
  font-weight: 500;
  white-space: normal;
}

.field-row input[type="text"],
.field-row input[type="tel"],
.field-row input[type="email"],
.field-row textarea,
.field-row select {
  justify-self: stretch;  
  width: 220px;
  max-width: none;
  padding: 8px 10px;
  font-size: 1em;
  line-height: 1.4;
  font-family: Arial, sans-serif;
  background-color: white;
  border: 1px solid #666;
  border-radius: 2px;
  box-sizing: border-box;
}

/* Contextual width tweaks */
.field-row.text input {
  max-width: 90%;
}

.field-row.select {
  max-width: 50%;
}

/* Date rows: label + input inline, date input at ~30% width */
.field-row.date {
  display: grid;
  grid-template-columns: max-content minmax(160px, 30%);
  column-gap: 10px;
  align-items: center;
  padding-bottom: 6px;
}

.field-row.date label {
  width: auto;
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
}

.field-row.date input[type="date"] {
  justify-self: start;
  font: inherit;
  width: 100%;
  min-width: 160px;
  max-width: 100%;
  font-size: 0.95rem;
  line-height: 1.4;
  height: 32px;
  padding: 4px 8px;
}

@media (max-width: 600px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .field-row label {
    margin-bottom: 2px;
  }
}

@media (max-width: 900px) {
  .field-row {
    flex-direction: column;
    align-items: stretch;
  }

  .field-row label {
    width: 100%;
  }

  .field-row input[type="text"],
  .field-row input[type="tel"],
  .field-row input[type="email"],
  .field-row textarea,
  .field-row select {
    min-width: 0;
    width: 100%;
  }

  .field-row.text input,
  .field-row.select {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .field-row.date {
    grid-template-columns: 1fr;
  }

  .field-row.date label {
    white-space: normal;
  }

  .field-row.date input[type="date"] {
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
  }
}

/* Container – NO border */
#participantsContainer {
  width: 100%;
  box-sizing: border-box;
}

/* Form group – spacing only */
.form-group {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
}

/* Participant card – SINGLE border */
.participant-entry {
  width: 100%;
  border: 1px solid #cfcfd6;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  background: #fdfdff;
  box-sizing: border-box;
}

.participant-entry:focus-within {
  border-color: #cccffc;
  box-shadow: 0 0 0 2px rgba(98, 68, 155, 0.15);
}

.quill-wrapper {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-bottom: 18px;
  padding: 0;
  overflow: visible;
  box-shadow: none;
}

.quill-wrapper .quill-wrapper {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

.quill-wrapper > label {
  display: block;
  padding: 0 0 6px 0;
  font-weight: 500;
}

.quill-editor {
  position: relative;
  display: block;  
  resize: none;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: none;
  min-height: auto; 
  /* transition: height 120ms ease-out; */
}

.ql-toolbar button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 5px;
  margin: 0;
  cursor: pointer;
}

.quill-editor .ql-editor {
  background: #ffffff;
  padding: 12px;
  line-height: 1.5;
  min-height: 1.5em;
  height: auto;
  overflow-y: hidden;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;

  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quill-wrapper .ql-container.ql-snow {
  border: 1px solid #b9b9b9 !important;
  box-shadow: none !important;
  outline: none !important;
  border-top: 0 !important;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

.quill-wrapper .ql-toolbar.ql-snow {
  border: 1px solid #b9b9b9 !important;
  border-bottom: 0 !important;
  box-shadow: none;
  padding: 6px;
  margin: 0;
  background: #e5e5e5;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.quill-wrapper:focus-within {
  box-shadow: none;
}

.quill-wrapper:focus-within .ql-toolbar.ql-snow,
.quill-wrapper:focus-within .ql-container.ql-snow {
  border-color: #6aa9ff !important;
}

.quill-char-counter {
  position: absolute;
  right: 20px;
  bottom: 5px;
  font-size: 12px;
  color: #555;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  margin-top: 6px;
  text-align: right;
}

.quill-char-counter.limit-reached {
  color: #c12968;
  font-weight: 600;
}

.quill-reply {
  position: relative;
  padding-bottom: 22px;
}

.ql-mention-list-container {
  z-index: 2147483647 !important;
  position: fixed !important;
  pointer-events: auto;
  max-width: min(360px, calc(100vw - 16px));
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ql-mention-list-item small,
.ql-mention-list-item .email {
  opacity: 0.6;
  margin-left: 0.5rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin: 5px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 20px; /* Adjust size to make centering easier */
  height: 20px;
  margin-right: 8px;
  appearance: none; /* Remove default styling */
  border: 2px solid #333; /* Dark border */
  border-radius: 4px; /* Optional: rounded corners */
  background-color: white; /* White background for unchecked state */
  cursor: pointer;
  display: flex; /* Enable flexbox for centering */
  align-items: center; /* Center checkmark vertically */
  justify-content: center; /* Center checkmark horizontally */
  position: relative; /* Needed for the checkmark positioning */
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: #555; /* Change background when checked */
  border-color: #222; /* Darker border when checked */
}

.checkbox-group input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 10px;
  border: solid white; /* Checkmark color */
  border-width: 0 2px 2px 0;
  transform: rotate(45deg); /* Rotate to form the checkmark */
}

.admin-field {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
  width: 100%;
}
.admin-field label {
  margin-bottom: 5px;
  padding: 5px;
}
.admin-field input {
  padding: 5px;
  font-size: 1em;
  background-color: white; 
}

h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  font-weight: 700;
  color: #604398;
  line-height: 1.3;
}

h3 {
  margin: 0;
  font-size: clamp(1rem, 1.9vw, 1.6rem);
  font-weight: 700;
  color: black;
  line-height: 1.35;
}

h4 {
  margin: 0;
  font-size: clamp(0.95rem, 1.6vw, 1.35rem);
  font-weight: 700;
  color: black;
  line-height: 1.4;
}

h5 {
  margin: 0;
  font-size: clamp(0.9rem, 1.3vw, 1.15rem);
  font-weight: 400;
  color: black;
  line-height: 1.45;
}

table {
  width: 95%;
  table-layout: fixed; /* Ensures consistent column widths */
  border-collapse: collapse;
  margin: 20px 0;
  font-family: Arial, sans-serif;
}

#participantsTable {
  margin-top: 6px;
}

.menu-content .activity-table {
  display: block;
  max-height: none;
  overflow: auto;
  margin-bottom: 0;
}

.table-wrapper {
  overflow-x: auto;
  white-space: nowrap;
}

th, td {
  white-space: normal;
  word-break: break-word;
  border: 1px solid #000;
  padding: 8px;
  text-align: left;
}
th {
  background-color: #f2f2f2;
}
colgroup col:nth-child(1) {
  width: 20%; /* Smallest column for the first column */
}
colgroup col:nth-child(2),
colgroup col:nth-child(3) {
  width: 40%; /* Larger columns for the second and third columns */
}
textarea,
input[type="select"],
input[type="datetime-local"] {
  background-color: white; 
  width: 95%; /* Adjust width to fit the cell */
  padding: 5px;
  font-size: 1em;
  font-family: Arial, sans-serif;
  border: 1px solid #666;
  border-radius: 4px;
  box-sizing: border-box; /* Ensure padding doesn't exceed width */
  resize: vertical; /* Allow resizing only vertically */
}

.td-field-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.styled-table-container table {
  width: 100%;
  border-collapse: collapse;
}

.styled-table-container th, .styled-table-container td {
  padding: 8px;
  text-align: left;
}

.styled-table-container th {
  background-color: #f2f2f2;
}

.styled-table-container colgroup col:first-child {
  width: 5%; /* Smaller width for the first column */
}

.styled-table-container colgroup col:nth-child(2),
.styled-table-container colgroup col:nth-child(3) {
  width: 47.5%; /* Larger width for the second and third columns */
}

.styled-table-container textarea, .styled-table-container input[type="number"] {
  background-color: white; /* Light blue background color */
  width: 95%; /* Adjust width to fit the cell */
  padding: 5px;
  font-size: 1em;
  font-family: Arial, sans-serif;
  border: 1px solid #666;
  border-radius: 4px;  box-sizing: border-box; /* Ensure padding doesn't exceed width */
  box-sizing: border-box; /* Ensure padding doesn't exceed width */
  resize: vertical; /* Allow resizing only vertically for textareas */
}

.styled-table-container input[type="number"]::-webkit-outer-spin-button,
.styled-table-container input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; /* Remove spinner in Chrome */
}

.styled-table-container-three-column table {
  width: 100%;
  border-collapse: collapse;
}

.styled-table-container-three-column th, .styled-table-container-three-column td {
  padding: 8px;
  text-align: left;
}

.styled-table-container-three-column th {
  background-color: #f2f2f2;
}

.styled-table-container-three-column colgroup col:first-child {
  width: 20%; 
}

.styled-table-container-three-column colgroup col:nth-child(2),
.styled-table-container-three-column colgroup col:nth-child(3) {
  width: 40%; /* Larger width for the second and third columns */
}

.styled-table-container-three-column textarea {
  background-color: white; /* Light blue background color */
  width: 95%; /* Adjust width to fit the cell */
  padding: 5px;
  font-size: 1em;
  font-family: Arial, sans-serif;
  border: 1px solid #666;
  border-radius: 4px;
  box-sizing: border-box; /* Ensure padding doesn't exceed width */
  resize: vertical; /* Allow resizing only vertically for textareas */
}

.styled-table-container-three-column input[type="number"]::-webkit-outer-spin-button,
.styled-table-container-three-column input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; /* Remove spinner in Chrome */
}

.styled-table-container-two-column table {
  width: 100%;
  border-collapse: collapse;
}

.styled-table-container-two-column th, .styled-table-container-two-column td {
  padding: 8px;
  text-align: left;
}

.styled-table-container-two-column th {
  background-color: #f2f2f2;
}

.styled-table-container-two-column colgroup col:first-child {
  width: 5%; 
}

.styled-table-container-two-column colgroup col:nth-child(2){
  width: 95%;
}

.styled-table-container-two-column textarea {
  background-color: white; /* Light blue background color */
  width: 95%; /* Adjust width to fit the cell */
  padding: 5px;
  font-size: 1em;
  font-family: Arial, sans-serif;
  border: 1px solid #666;
  border-radius: 4px;  box-sizing: border-box; /* Ensure padding doesn't exceed width */
  box-sizing: border-box; /* Ensure padding doesn't exceed width */
  resize: vertical; /* Allow resizing only vertically for textareas */
}

.styled-table-container-two-column input[type="number"]::-webkit-outer-spin-button,
.styled-table-container-two-column input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; /* Remove spinner in Chrome */
}

/* Resize handle */
#resize-handle {
  position: absolute;
  top: 0;
  left: -5px;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  background-color: transparent;
}

/* Remove bullet points and spacing from list */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.standard-bullets {
  list-style: disc;
  list-style-position: outside;
  padding-left: 20px;
  margin: 6px 0 0;
}

.standard-bullets li {
  margin-bottom: 4px;
}

/* Loading state styling */
button.loading {
  background-color: #d3d3d3; /* Light gray to indicate disabled state */
  cursor: not-allowed; /* Show a not-allowed cursor */
  color: #666; /* Dimmed text */
}

.hidden {
  display: none !important;
}

.comment-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 24px;
  border-radius: 6px;
  box-shadow: 2px 2px 6px rgba(0,0,0,.12);
  z-index: 1001;
  width: clamp(480px, 70vw, 900px);
  max-width: calc(100vw - 48px);
  min-height: 100px;
  display: none;
  overscroll-behavior: contain;
}

#quill-editor-comment .ql-container {
  height: auto;
  max-height: none;
  border-radius: 4px;
  border: 1px solid #ccc;
  overflow: hidden; /* prevent scrollbars on the container */
  background: white;
  resize: none;
}

#quill-editor-comment .ql-editor {
  min-height: 120px;
  max-height: none;
  font-size: 15px;
  line-height: 1.4;
  padding: 10px;
  overflow: hidden; /* keep it from scrolling; limited to 250 chars */
  background: white;
  border-radius: 4px;
  resize: none;
}

.comment-box .quill-char-counter {
  position: static;
  background: transparent;
  padding: 0;
  right: auto;
  bottom: auto;
}

.settings-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.resizable-table th {
  position: relative;
}

.resizer {
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.profile-field {
  background: #f8f9fb;
  border: 1px solid #d0d4dc;
  border-radius: 6px;
  padding: 10px;
}

.profile-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d0d4dc;
  border-radius: 4px;
  background: #fff;
}

.muted-text {
  color: #5b6474;
  margin: 4px 0 10px;
}

.autosave-preferences {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.autosave-preferences label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.autosave-preferences select {
  padding: 6px 8px;
  border: 1px solid #d0d4dc;
  border-radius: 4px;
}
.inline-editor-row td {
  padding: 0;
  border: none;
}

.inline-editor-panel {
  margin: 10px 0 16px;
}

.inline-editor-panel.hidden {
  display: none;
}

.inline-data-row.hidden {
  display: none;
}

.inline-editor-panel .inline-editor-content {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #f9fbff;
  box-shadow: 0 10px 24px rgba(26, 35, 63, 0.12);
}

#participant-editor .inline-editor-content {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#participantsTable td {
  padding: 10px;
}

#participantsTable td,
#participantsTable th {
  border-color: #b9b9b9;
}

#participantsTable td {
  background: #ffffff;
}

#participantsTable th {
  background: #f3f1fa;
  font-weight: 600;
}

#participantsTable .js-row-selectable {
  cursor: pointer;
}

#participantsTable .js-row-selectable:hover td {
  background: #f7f5fb;
}

#homeVisitTimeLogTable td,
.home-visit-time-log-table td {
  padding: 10px;
}

#homeVisitTimeLogTable td,
#homeVisitTimeLogTable th,
.home-visit-time-log-table td,
.home-visit-time-log-table th {
  border-color: #b9b9b9;
}

#homeVisitTimeLogTable td,
.home-visit-time-log-table td {
  background: #ffffff;
}

#homeVisitTimeLogTable th,
.home-visit-time-log-table th {
  background: #f3f1fa;
  font-weight: 600;
}

#homeVisitTimeLogTable .js-row-selectable,
.home-visit-time-log-table .js-row-selectable {
  cursor: pointer;
}

.discovery-stage-one .menu-box-edit-notes {
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #cdd8ea;
  background: #f1f5fb;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2f6fb7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.discovery-stage-one .menu-box-edit-notes:hover {
  background: #e6eef9;
}

#homeVisitTimeLogTable .js-row-selectable:hover td,
.home-visit-time-log-table .js-row-selectable:hover td {
  background: #f7f5fb;
}

#participant-editor .overlay-header {
  margin-bottom: 8px;
}

#participant-editor .field-row {
  gap: 12px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}

#participant-editor .field-row input {
  flex: 1 1 220px;
  min-width: 200px;
  background-color: white;
  border: 1px solid #b9b9b9;
  border-radius: 3px;
}

.participant-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px 18px;
  align-items: start;
}

.participant-edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.participant-edit-field label {
  font-weight: 500;
  font-size: 0.95rem;
}

.participant-edit-field input {
  width: 100%;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid #b9b9b9;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 1rem;
}

.home-visit-time-log-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px 18px;
  align-items: start;
}

.field-check-content .muted-text {
  margin-bottom: 4px;
}

.field-check-content .table-wrapper {
  margin-top: 4px;
}

.task-tracking-layout {
  padding: 0 12px;
}

.task-tracking-main h2 {
  margin-bottom: 6px;
}

.task-tracking-board {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}


.task-tracking-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.task-tracking-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 18px 0 10px;
}

.task-stage-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.task-stage-card {
  background: #ffffff;
  border: 1px solid #d7dce6;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(26, 34, 54, 0.08);
}

.task-stage-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #3a3f4b;
  margin-bottom: 8px;
}

.task-stage-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  position: relative;
}

.task-stage-circle svg {
  transform: rotate(-90deg);
}

.task-stage-circle .task-stage-percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2c323d;
}

.task-stage-divider {
  margin: 20px 0 10px;
  border-top: 2px dashed #c9cfda;
}

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

.task-tenet-card {
  background: #ffffff;
  border: 1px solid #d7dce6;
  border-radius: 10px;
  padding: 12px 10px;
  box-shadow: 0 6px 16px rgba(26, 34, 54, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-tenet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 34, 54, 0.12);
}

.task-tenet-card.active {
  border-color: #2f6fb7;
  box-shadow: 0 10px 24px rgba(47, 111, 183, 0.18);
}

.task-tenet-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2f3542;
  margin-bottom: 10px;
}

.task-tenet-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.task-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c5ccd8;
}

.task-status-dot.complete {
  background: #4caf50;
}

.task-status-dot.review {
  background: #f2b43c;
}

.task-status-dot.edits {
  background: #f28b4a;
}

.task-status-dot.incomplete {
  background: #c5ccd8;
}

.task-detail-panel {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid #d7dce6;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(26, 34, 54, 0.12);
  padding: 18px;
}

.task-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.task-detail-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.task-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-detail-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.task-detail-badge.review {
  background: #fff4d6;
  color: #9a6b13;
  border-color: #f3d07c;
}

.task-detail-badge.edits {
  background: #ffe4d4;
  color: #a34c15;
  border-color: #f2b48f;
}

.task-detail-step {
  border-top: 1px solid #e5e9f0;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-detail-step:first-of-type {
  border-top: 0;
}

.task-detail-step-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-detail-step-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #4a4f57;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-detail-step.complete .task-detail-step-icon {
  background: #4caf50;
  color: #ffffff;
}

.task-detail-step-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.task-detail-step-action {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: #eff3f9;
  color: #2f3542;
}

.task-detail-step.complete .task-detail-step-action {
  background: #e7f6e2;
  color: #2e7a28;
}

.task-detail-step-notes {
  font-size: 0.78rem;
  color: #8a4a10;
  margin-left: auto;
  max-width: 45%;
  text-align: right;
}

.task-detail-step-notes span {
  font-weight: 600;
}

.task-detail-step-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2f6fb7;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cdd8ea;
  background: #f1f5fb;
}

.task-detail-step-link:hover {
  background: #e6eef9;
}

.edits-notes-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edits-notes-modal.hidden {
  display: none;
}

.edits-notes-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.edits-notes-card {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  width: min(480px, 92vw);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  z-index: 1;
}

.edits-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.edits-notes-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.edits-notes-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.edits-notes-body textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  resize: vertical;
}

.edits-notes-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.edits-notes-counter {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: right;
  margin-top: 6px;
}

.menu-box-edit-notes[data-notes-tooltip] {
  position: relative;
}

.menu-box-edit-notes[data-notes-tooltip]:hover::after {
  content: attr(data-notes-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  background: #1f2937;
  color: #ffffff;
  font-size: 0.72rem;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: pre-wrap;
  width: 240px;
  max-width: 240px;
  z-index: 10;
  pointer-events: none;
}

.menu-box-edit-notes[data-notes-tooltip]:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
  z-index: 10;
}

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

  .task-tracking-sidebar {
    position: static;
  }
}

.task-tracking-card {
  border: 1px solid #d4d9e2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
  padding: 16px;
}

.task-tracking-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-tracking-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.task-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.task-status-complete {
  background: #e7f6e2;
  color: #2e7a28;
  border-color: #c7e9bd;
}

.task-status-review {
  background: #fff4d6;
  color: #9a6b13;
  border-color: #f3d07c;
}

.task-status-edits {
  background: #ffe4d4;
  color: #a34c15;
  border-color: #f2b48f;
}

.task-status-incomplete {
  background: #f1f3f6;
  color: #4a4f57;
  border-color: #d6dbe3;
}

.task-tracking-step {
  border-top: 1px solid #e5e8ef;
  padding-top: 12px;
  margin-top: 12px;
}

.task-tracking-step:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.task-tracking-step-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.task-tracking-step-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.task-tracking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.task-tracking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f7f9fb;
}

.task-tracking-item-status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e5e9f0;
  color: #4a4f57;
}

.task-tracking-item-complete .task-tracking-item-status {
  background: #6cc04a;
  color: #ffffff;
}

.task-tracking-item-label {
  font-size: 0.92rem;
}

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

  .task-tracking-sidebar {
    position: static;
  }
}

.home-visit-time-log-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-visit-time-log-field label {
  font-weight: 500;
  font-size: 0.95rem;
}

.home-visit-time-log-field input,
.home-visit-time-log-field textarea {
  width: 100%;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid #b9b9b9;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

@media (max-width: 700px) {
  .home-visit-time-log-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .participant-edit-grid {
    grid-template-columns: 1fr;
  }
}

.inline-editor-panel .jobseeker-profile-overlay {
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
}

.inline-editor-panel .reference-overlay-content {
  width: 100%;
}

@media (max-width: 768px) {
  .inline-editor-panel .inline-editor-content {
    padding: 16px;
  }
}

.reference-overlay-content {
  width: min(800px, 90vw);
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.reference-form .profile-field {
  background: #f3f5f8;
}

.reference-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.reference-status {
  margin-top: 8px;
  font-weight: 600;
}

.disabled-section {
  opacity: 0.55;
  pointer-events: none;
}

.disabled-section[title]:hover::after {
  content: attr(title);
  position: absolute;
  background: #111;
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  transform: translateY(-4px);
  z-index: 3000;
}

.profile-summary {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
}

.profile-summary:hover {
  background: #f0f4ff;
}

.settings-overlay-content {
  background: #fff;
  padding: 20px 28px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: left;
  min-width: 240px;
}

.settings-overlay-content input,
.settings-overlay-content select,
.settings-overlay-content textarea,
.settings-overlay-content .profile-input {
  background: white;
}

.settings-overlay-content .actions-row,
.settings-overlay-content .reference-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.settings-overlay-content .actions-row button,
.settings-overlay-content .reference-actions button {
  padding: 8px 14px;
}

.settings-overlay-content.jobseeker-profile-overlay {
  text-align: left;
  width: min(1200px, 98vw);
  height: calc(100vh - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

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

.overlay-close {
  background-color: #5e3ea1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-self: flex-start;
  margin-top: 2px;
}

.js-row-selectable {
  cursor: pointer;
}

.js-row-selectable:hover {
  background: #f5f8ff;
}

.reference-row-selectable {
  cursor: pointer;
}

.reference-row-selectable:hover {
  background: #f5f8ff;
}

.conversation-summary-cell {
  background: #f9f9f9;
}

.conversation-summary {
  margin-bottom: 10px;
}

.conversation-summary p {
  margin: 0 0 8px 0;
}

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

/* ✅ Ensure Overlay Appears */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-start; 
  overflow-y: auto;
  padding: 20px; 
}

/* ✅ When Comment Box is Active, Show It */
.comment-box:not(.hidden),
.overlay:not(.hidden) {
  display: block;
}

/* Highlight labels that have comments */
label.highlight-comment {
  background-color: #fff2cc;
  padding: 2px 4px; 
  border-radius: 4px; 
  
  align-self: flex-start;
  display: inline-block; 
  width: 50%;
}

/* Saving overlay */
#saving-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  pointer-events: auto;
}

.saving-overlay__content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #222;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  font-weight: 600;
}

.saving-overlay__text {
  font-size: 15px;
}

.saving-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #e1d8f5;
  border-top-color: #6045a4;
  border-radius: 50%;
  animation: saving-spin 0.8s linear infinite;
}

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

/* Scroll jump control (top/bottom) */
.scroll-jump {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(96, 69, 164, 0.82);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.scroll-jump.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.scroll-jump:hover {
  background: rgba(124, 99, 199, 0.92);
}

.scroll-jump__icon {
  font-size: 18px;
  line-height: 1;
}

/* Floating Tooltip */
.comment-tooltip {
  position: fixed;                 /* attach to viewport */
  left: 50%; 
  right: 0;
  width: auto;
  max-width: calc(100vw - 32px); /* 16px padding on each side */
  top: var(--tooltip-top, 12px);   /* vertical position via JS */

  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  max-height: min(70vh, 480px);
  min-width: 200px;
  word-wrap: break-word;
  z-index: 2147483647;             /* above everything */
  box-shadow: 4px 4px 10px rgba(0,0,0,0.2);
  white-space: normal;
  pointer-events: auto;

  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;

  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.comment-tooltip.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s;
}

.comment-tooltip .tooltip-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

/* The Quill host we insert after each .reply-text */
.comment-tooltip .quill-reply .ql-container {
  box-sizing: border-box;
  min-height: 90px;
  max-height: 50vh;
  overflow: hidden;
  resize: vertical;        /* bottom-right drag handle */
  padding-bottom: 6px;     /* easier to grab the handle */
  background: white;
  border-radius: 8px;
}

.comment-tooltip .quill-reply .ql-editor {
  min-height: 80px;
  background: white;
  border-radius: 4px;
  overflow: hidden;
}

.comment-tooltip, .comment-tooltip * { min-width: 0; }

/* ✅ Keep tooltip visible when input is clicked */
input:focus + .comment-tooltip,
textarea:focus + .comment-tooltip,
select:focus + .comment-tooltip, 
.ql-editor:focus + .comment-tooltip {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

/* ✅ Ensure the tooltip remains open when clicking inside */
.comment-tooltip:hover,
.comment-tooltip:focus-within {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ✅ Tooltip Header (User Info, Timestamp, Ellipsis) */
.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: column;
  border-bottom: 1px solid #ddd;
  text-align: left;
  font-size: 13px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ddd;
}

.tooltip-user-info {
  flex-grow: 1;
  text-align: left;
}

.tooltip-user-info strong {
  font-size: 14px;
  color: #333;
  display: block;
}

.tooltip-user-info em {
  font-size: 12px;
  color: #555;
  display: block;
}

/* ✅ Tooltip comment section (Scrollable for long comments) */
/* ✅ Highlight comment on hover */
.tooltip-comment {
  transition: background-color 0.3s ease-in-out;
  padding: 5px;
  border-radius: 4px;
}

.tooltip-comment:hover {
  background-color: #adacacec; /* Light gray background */
  cursor: pointer;
}

.tooltip-comment::-webkit-scrollbar {
  width: 5px;
}

.tooltip-comment::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 5px;
}

.tooltip-comment::-webkit-scrollbar-track {
  background: #f0f0f0;
}

/* ✅ Tooltip Actions (Edit/Delete) */
.tooltip-actions {
  position: absolute;
  top: 5px;
  right: 5px;
}

.tooltip-ellipsis {
  cursor: pointer;
  font-size: 18px;
  user-select: none;
  padding: 5px;
}

/* ✅ Dropdown Menu */
.tooltip-menu {
  position: absolute;
  top: 25px;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  display: none;
  min-width: 120px;
  z-index: 10;
}

.tooltip-menu.hidden {
  visibility: hidden;
  opacity: 0;
}

.tooltip-menu:not(.hidden) {
  visibility: visible;
  opacity: 1;
}

.tooltip-menu.active {
  display: block !important;
}

/* ✅ Menu Options */
.tooltip-option {
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.tooltip-option:hover {
  background-color: #f0f0f0;
}

/* ✅ Context Menu for Right Click */
.context-menu {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 1000;
  min-width: 150px;
  padding: 5px 0;
  text-align: left;
}

.context-menu.hidden {
  display: none;
}

.context-menu.active {
  display: block;
  position: absolute;
  z-index: 9999;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  padding: 4px 0;
  min-width: 120px;
}

.context-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.context-menu li {
  padding: 6px 12px;
  cursor: pointer;
}

.context-menu li:hover {
  background-color: #f2f2f2;
}

.tooltip-reply-thread {
  margin-top: 10px;
  background-color: #f9f9f9;
  padding: 10px;
  border-left: 4px solid #ccc;
  border-radius: 4px;
  font-size: 0.9em;
}

.reply-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 6px 0;
}

.reply-body {
  margin-top: 4px;
}

.tooltip-reply-thread:hover {
  background-color: #adacacec; /* Light gray background */
  cursor: pointer;
}

/* === Each Comment Item === */
.comment-item {
  padding: 10px;
  margin-bottom: 10px;
  background: #fff;
  border-left: 4px solid #007BFF;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s;
}

.comment-item:hover {
  background-color: #b2d0f1;
}

/* === Text inside comment item === */
.comment-item strong {
  display: block;
  font-size: 0.95rem;
  color: #222;
}

.comment-item small {
  display: block;
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 5px;
}

.comment-item em {
  font-size: 0.9rem;
  color: #333;
}

/* Quill area inside the modal gets the resize handle */
#comment-box .ql-container {
  box-sizing: border-box;
  height: 100px;         /* explicit start height so native handle shows */
  min-height: 120px;
  max-height: 70vh;
  overflow: hidden;
  resize: none;
  padding-bottom: 2px;
}

/* Keep Submit/Cancel visible & aligned */
#comment-box .comment-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 5px;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 8px 0 0;
}

#quill-editor-comment .ql-toolbar { display: none !important; }

.box-container {
  display: flex;
  gap: clamp(12px, 3vw, 30px);
  justify-content: center;
  align-items: flex-start;
  margin: 40px auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

.box {
  background-color: #f5f5f5;
  padding: 15px 20px;
  border-radius: 8px;
  flex: 1 1 220px;
  min-width: 0;
  max-width: 320px;
  width: 100%;
}

    .box h3 {
      margin-top: 0;
      font-size: 16px;
      font-weight: bold;
    }

    .box a {
      display: block;
      margin: 6px 0;
      color: #000;
      text-decoration: none;
    }

    .box a::before {
      content: '🔗 ';
    }

    .box a:hover {
      text-decoration: underline;
    }

.styled-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    background-color: white;
    font-size: 1em;
    }

/* Panel */
.outcomes-field {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #ccc;
  padding: 12px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
  border-radius: 4px;
  width: 95%;
  box-sizing: border-box;
}
.outcomes-field * { box-sizing: inherit; }

/* Reset fieldset/legend so they don't add mystery gaps */
.outcomes-field fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}
.outcomes-field legend { padding: 0; margin: 0; }

/* Labels: use top margin for row spacing, small gap to its control */
.outcomes-field label {
  display: block;
  padding-top: 5px;
  padding-left: 5px;
  padding-right: 5px;
  margin: 16px 0 6px;     /* 16px before each field, 6px to the control */
}

/* First label in a container shouldn't add top space */
.outcomes-field > label:first-of-type,
.outcomes-field fieldset > label:first-of-type,
.outcomes-field .checkbox-group > label:first-of-type { margin-top: 0; }

/* Controls */
.outcomes-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.outcomes-field select,
.outcomes-field date,
.outcomes-field textarea {
  padding: 8px;
  background-color: white;
  font-size: 1em;
  font-family: Arial, sans-serif;
  border: 1px solid #666;
  border-radius: 4px;  width: 100%;
  margin: 0;
}

/* Treat wrappers like the SOC autocomplete as a control row */
.outcomes-field .autocomplete { width: 100%; margin: 0; }

/* Help text right under an input */
.outcomes-field :is(input, select, textarea, date) + small {
  display: block;
  margin-top: 4px;
}

/* Checkbox groups */
.outcomes-field .checkbox-group { margin-top: 16px; }  /* space before the group */
.outcomes-field .checkbox-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
}
.outcomes-field .checkbox-list label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.outcomes-field .checkbox-list input[type="checkbox"] { margin: 0; }

/* Number input quirks */
/* .outcomes-field input[type="number"] { -moz-appearance: textfield; } */
.outcomes-field input[type="number"]::-webkit-outer-spin-button,
.outcomes-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Optional: accessible focus ring */
.outcomes-field :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  date,
  textarea
):focus {
  outline: 2px solid #6090d5;
  outline-offset: 2px;
}


/* Modal overlay background */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal box */
.modal-content {
  background: white;
  border-radius: 12px;
  padding: 25px 30px;
  text-align: center;
  width: 320px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  animation: fadeIn 0.2s ease-in-out;
}

.close-btn {
  background: transparent;
  border: none;
  color: #666;
  font-size: 14px;
  margin-top: 20px;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.sidebar-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #007282;
  text-align: center;
  font-weight: 500;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #ddd;
  border-top: 4px solid #007282;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 8px;
}

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

.no-comments, .error {
  padding: 20px;
  text-align: center;
  color: #555;
}

.error {
  color: #b33;
  font-weight: 600;
}

.highlight-pulse {
  outline: 3px solid #007282;
  box-shadow: 0 0 8px rgba(0, 114, 130, 0.6);
  transition: outline 0.3s ease-in-out;
}

  #timeLogOverlay,
  #timeLogEditOverlay,
  #scoringOverviewOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to the top for better scrolling */
    overflow-y: auto; /* Allow scrolling if content exceeds viewport height */
    padding: 20px; /* Add some padding for spacing */
  }
  
  /* Modal content */
  #timeLogContent,
  #timeLogEditContent,
  #scoringOverviewContent {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%; /* Responsive width */
    max-width: 600px; /* Maximum width for the modal */
    max-height: 90%; /* Prevent content from overflowing the viewport */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Enable scrolling within the modal for large content */
    text-align: left;
  }

.progress-wrapper {
  flex: 1 1 70%;
  max-width: none;
  margin: 20px 0 20px 0; 
  padding-left: 0; 
  min-width: 0;
  overflow: hidden;
}

.progress-wrapper.is-waiting .progress-track,
.progress-wrapper.is-waiting .stage-dates {
  display: none;
}

.progress-wrapper.has-stacked .progress-track {
  display: none;
}

.progress-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  flex-wrap: wrap;
  overflow: hidden;
  width: 100%;
}

.stacked-progress {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  width: 100%;
}

.stacked-progress-bar {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 10px 12px 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.stacked-progress-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.stacked-progress-title {
  font-weight: 700;
  color: #1f1f1f;
}

.stacked-progress-meta {
  font-size: 0.85rem;
  color: #5f5f5f;
}

.stacked-progress-track {
  width: 100%;
  height: 26px;
  background: #efefef;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.08);
}

.stacked-progress-fill {
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  background: linear-gradient(90deg, #5cb85c, #4cae4c);
  transition: width 0.6s ease;
  white-space: nowrap;
}

.stacked-progress-bar.tenet1 .stacked-progress-fill {
  background: linear-gradient(90deg, #5cb85c, #4cae4c);
}

.stacked-progress-bar.tenet2 .stacked-progress-fill {
  background: linear-gradient(90deg, #5bc0de, #46b8da);
}

.stacked-progress-bar.tenet3 .stacked-progress-fill {
  background: linear-gradient(90deg, #f0ad4e, #ec971f);
}

.stacked-progress-bar.tenet4 .stacked-progress-fill {
  background: linear-gradient(90deg, #d9534f, #c9302c);
}

.stacked-progress-bar.stage .stacked-progress-fill {
  background: linear-gradient(90deg, #428bca, #357ebd);
}

.progress-track {
  position: relative;
  width: 100%;
  height: 48px;
  background: #f0f0f0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
}
.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 28px;
  background: linear-gradient(
    90deg,
    #5a3f90 0%,
    #62449b 50%,
    #7055ac 100% 
  );
  transition: width 0.7s ease;
}
.progress-label {
  margin: 16px auto 15px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  font-family: Arial, sans-serif;
  max-width: 600px;
}

#current-stage,
#fa-scoring-status {
  display: none;
}

.progress-wrapper.paused .progress-fill {
  background: repeating-linear-gradient(
    45deg,
    #fbc02d,
    #fbc02d 10px,
    #fff 10px,
    #fff 20px
  );
}
.progress-wrapper.completed .progress-fill {
  background: linear-gradient(90deg, #00c853, #aeea00);
}

.progress-stage {
  margin-top: 6px;
  font-size: 15px;
  color: #555;
  font-weight: 500;
}

.stage-dates {
  position: relative;
  width: 100%;
  margin-top: 8px;
  display: block;
  overflow-x: visible;
  min-width: 0;
}

.attachment-card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.attachment-card {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.attachment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.attachment-title {
  font-weight: 600;
  font-size: 1rem;
  color: #2c1f4a;
}

.attachment-menu {
  position: relative;
}

.attachment-menu-trigger {
  border: 1px solid #4b2c90;
  background: linear-gradient(135deg, #6f4bcc, #4b2c90);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(75, 44, 144, 0.25);
}

.attachment-menu.open .attachment-menu-items {
  display: flex;
}

.attachment-menu-items {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  flex-direction: column;
  background: #1b0f39;
  color: #f6f4ff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 50;
}

.attachment-menu-items button {
  border: none;
  background: transparent;
  padding: 8px 14px;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  width: 140px;
  color: inherit;
}

.attachment-menu-items button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.attachment-card-body {
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 10px;
}

.attachment-info {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.4;
}

.attachment-thumb {
  width: 96px;
  height: 72px;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #faf7ff;
}

.attachment-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.attachment-thumb-icon {
  font-weight: 600;
  color: #5e3ea1;
}

.attachment-empty {
  padding: 30px;
  text-align: center;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  color: #6b6b6b;
  background: #fcfbff;
}

.attachment-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.attachment-preview-overlay.hidden {
  display: none;
}

.attachment-preview-panel {
  background: #fff;
  width: min(90vw, 960px);
  height: min(90vh, 720px);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.attachment-preview-header,
.attachment-preview-footer {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attachment-preview-footer {
  border-bottom: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  justify-content: flex-end;
}

.attachment-preview-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #444;
}

.attachment-preview-close.secondary {
  font-size: 1rem;
  border: 1px solid #5e3ea1;
  border-radius: 6px;
  padding: 4px 12px;
  color: #5e3ea1;
  background: #fff;
}

.attachment-preview-body {
  padding: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8fb;
}

.attachment-preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.attachment-preview-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.attachment-preview-text {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 18px;
  overflow: auto;
  background: #fff;
  border: none;
  font-size: 0.95rem;
}

.attachment-preview-status,
.attachment-preview-fallback {
  text-align: center;
  font-size: 0.95rem;
  color: #444;
  padding: 18px;
}

/* Shared footer */
.site-footer {
  margin-top: 40px;
  padding: 32px 20px 28px;
  background: #f6f2ff;
  color: #1f1f1f;
  border-top: 1px solid #d5cde1;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1 1 320px;
}

.footer-about h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-family: Arial, sans-serif;
}

.footer-about p {
  margin: 0;
  line-height: 1.45;
}

.footer-columns {
  display: flex;
  flex: 1 1 240px;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-column h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-family: Arial, sans-serif;
}

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

.footer-list li {
  margin-bottom: 10px;
  font-size: 0.98rem;
}

.footer-list a {
  color: #4a3184;
  text-decoration: none;
  font-weight: 600;
}

.footer-list a:hover {
  text-decoration: underline;
}

.footer-legal {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #d5cde1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #2e2e2e;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #4a3184;
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-divider {
  color: #7a6fa8;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
  }

  .footer-brand {
    flex-direction: column;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Color variants */
.score-group-1 { background: #efecf5; } /* lavender */
.score-group-2 { background: #eef4fa; } /* light blue */
.score-group-3 { background: #f1f9ec; } /* light green */

/* Keep radio rows readable on colored backgrounds */
.score-group .radio-row { background: #fff; }
.score-group .radio-row:hover { background: #f9f9ff; }

.sidebar-scoring .score-group,
.sidebar-scoring .score-group-1,
.sidebar-scoring .score-group-2,
.sidebar-scoring .score-group-3 {
  background: transparent;
  border: 0;
  padding: 0;
  max-width: 100%;
  min-width: 0;
}

.sidebar-scoring .contact-field {
  border: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 12px;
}

.sidebar-scoring .text-field-date {
  margin-bottom: 8px;
}

.sidebar-scoring .field-row.select {
  max-width: 100%;
}

.sidebar-scoring .score-options {
  margin: 8px 0 12px;
  max-width: 100%;
}

.sidebar-scoring .radio-row {
  border: 0;
  background: transparent;
  padding: 6px 0;
  max-width: 100%;
}

.sidebar-scoring .radio-row span {
  max-width: 100%;
}

.sidebar-scoring,
.sidebar-scoring * {
  min-width: 0;
  max-width: 100%;
}

.sidebar-scoring .scoring-section,
.sidebar-scoring fieldset,
.sidebar-scoring legend,
.sidebar-scoring label,
.sidebar-scoring p {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar-scoring .field-row {
  grid-template-columns: 1fr;
}

.sidebar-scoring .field-row label {
  white-space: normal;
}

.sidebar-scoring input,
.sidebar-scoring select,
.sidebar-scoring textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sidebar-scoring .text-field,
.sidebar-scoring .text-field textarea {
  width: 100%;
  max-width: 100%;
}

.sidebar-scoring .radio-row:hover {
  background: transparent;
  border-color: transparent;
}

/* --- Form & text safety --- */
.accordion-content * { box-sizing: border-box; }
label, legend, .score-group, .score-group-1, .score-group-2, .score-group-3, .score-options, .radio-row, .radio-row span {
  min-width: 0;
  max-width: 95%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* --- Radios --- */
.score-options { display: grid; gap: 8px; margin: 8px 8px 12px; }
.radio-row {
  display: grid; grid-template-columns: auto 1fr; align-items: start;
  gap: 10px; padding: 8px 10px; border: 1px solid #cfcfd6;
  border-radius: 8px; background: #fff;
}
.radio-row span { line-height: 1.35; }
.radio-row input[type="radio"] {
  appearance: none; width: 18px; height: 18px; margin-top: 2px;
  border: 2px solid #6045a4; border-radius: 50%; background: #fff; cursor: pointer;
}
.radio-row input[type="radio"]:checked {
  border-color: #473382;
  background: radial-gradient(circle at center, #473382 45%, transparent 47%);
}
.radio-row input[type="radio"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(96,69,164,0.25); border-color: #473382;
}
.radio-row:hover { background: #f9f9ff; border-color: #bdbdd2; }

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* Collapse behavior for activity blocks */
.familiar-activity.is-collapsed table { display: none; }
.familiar-activity .activity-head {
  display:flex; align-items:center; justify-content:space-between; gap:.75rem;
}
.familiar-activity .activity-actions { display:flex; gap:.5rem; }
.familiar-activity .activity-actions button {
  padding: 0;
  margin: 0;
}

/* Put near your existing styles */
.table-wrap {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  padding: 8px;
  vertical-align: top;
  word-break: break-word;
  white-space: normal; 
}
.table-wrap.is-fullscreen { background:#fff; padding:12px; }

  /* Make the <label> look/behave like your purple button */
    .toggle-btn {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      border-radius: 8px;
      border: 1px solid #6045a4;
      padding: 10px 12px;
      margin-bottom: 30px;
      font-size: 1em;
      font-weight: 500;
      font-family: inherit;
      background: #fff;
      color: #6045a4;
      cursor: pointer;
      user-select: none;
      transition: background-color .25s, color .25s, border-color .25s;
    }

    /* Hide native checkbox but keep it accessible */
    .toggle-btn > input {
      position: absolute;
      opacity: 0;
      width: 1px; height: 1px;
    }

    /* Hover */
    .toggle-btn:hover {
      background-color: #f3eefe; /* subtle light of your palette */
      border-color: #6045a4;
    }

    /* Focus ring when tabbing onto the control */
    .toggle-btn:has(input:focus-visible),
    .toggle-btn.is-checked:has(input:focus-visible) {
      outline: 2px solid #8aa7ff;
      outline-offset: 2px;
    }

    /* Checked state = solid purple button like your <button> */
    .toggle-btn:has(input:checked),
    .toggle-btn.is-checked {
      background-color: #6045a4;
      color: white;
      border-color: #6045a4;
    }
    .toggle-btn:has(input:checked):hover,
    .toggle-btn.is-checked:hover {
      background-color: #977dd9;
      color: white;
      border-color: #6045a4;
    }

  /* Toolbar */
  .col-tools {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 12px 0;
    font-size: 0.95rem;
  }
  .col-tools label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
  }

.sortable-date {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 18px;
  white-space: nowrap;
}

.sort-icon {
  font-size: 0.75em;
  opacity: 0.6;
  margin-left: 4px;
  transition: opacity 0.2s;
}

.sortable-date:hover .sort-icon {
  opacity: 1;
}

.stage-th .stage-filter-trigger {
  opacity: 0.65;
  transition: opacity 0.2s;
}

.stage-th:hover .stage-filter-trigger {
  opacity: 1;
}

.sortable-date .sort-icon,
.stage-filter-trigger {
  font-family: inherit;
  vertical-align: middle;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  border-radius: 50%;
  background: #5e3ea1;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #4a2f86;
}

.info-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-tooltip {
  position: absolute;
  top: 20px;
  left: -10px;
  background: #4F4F4F;
  color: #fff;
  padding: 14px 16px;
  border-radius: 10px;
  width: 250px;
  max-width: 500px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
}

.info-icon:hover + .info-tooltip,
.info-icon:focus + .info-tooltip,
.info-wrapper:hover .info-tooltip,
.info-wrapper:focus-within .info-tooltip,
.info-tooltip:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.info-tooltip ul {
  padding-left: 18px;
  margin: 8px 0 0 0;
}

.info-tooltip li {
  margin-bottom: 6px;
}

.info-tooltip-link {
  color: #ffd36a;
  text-decoration: underline;
}

.info-tooltip-link:hover,
.info-tooltip-link:focus {
  color: #ffe39c;
}

.stage-page-nav {
  margin: 32px 0 48px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stage-nav-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-weight: 600;
}

.stage-nav-prev,
.stage-nav-next {
  text-decoration: none;
  color: #6d6d6d;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-nav-prev::before {
  content: "«";
  font-size: 1.1rem;
  line-height: 1;
}

.stage-nav-next::after {
  content: "»";
  font-size: 1.1rem;
  line-height: 1;
}

.stage-nav-prev.disabled,
.stage-nav-next.disabled {
  color: #8a8a8a;
  border-color: #b9b9b9;
  background: #f1f1f1;
}

.stage-nav-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.stage-nav-step {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1f1f1f;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid #8f8f8f;
  background: #ffffff;
  font-weight: 600;
  white-space: nowrap;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.stage-nav-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #8f8f8f;
  color: #1f1f1f;
  font-weight: 700;
  font-size: 0.9rem;
}

.stage-nav-step.active {
  border-color: #4f2d7f;
  background: #5a3b8e;
  color: #ffffff;
}

.stage-nav-step.active .step-num {
  background: #ffffff;
  border-color: #ffffff;
  color: #4f2d7f;
}

.stage-nav-step:hover {
  border-color: #5a3b8e;
}

.stage-nav-step:focus-visible {
  outline: 3px solid #5a3b8e;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .stage-nav-links {
    flex-direction: column;
    align-items: stretch;
  }
}

.sidebar-stage-nav {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #3b3b3b;
  border-radius: 10px;
  background: #eef3ff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-section-title {
  font-weight: 700;
  color: #2b2b2b;
}

.sidebar-stage-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1f1f1f;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid #c9c9c9;
  background: #ffffff;
  font-size: 0.95rem;
}

.sidebar-stage-link .stage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #383737;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
}

.sidebar-stage-link.active {
  border-color: #1f1f1f;
  background: #dce6ff;
}

.sidebar-stage-link.active .stage-num {
  background: #1f1f1f;
}
