:root {
  --vep-success-pill-bg: #edf7e5;
  --vep-success-pill-text: #416f1b;
  --vep-success-pill-border: #bad5a5;
  --vep-blue: #216fab;
  --vep-blue-dark: #165687;
  --vep-green: #78a922;
  --vep-green-dark: #527f1c;
  --vep-ink: #26333d;
  --vep-muted: #667782;
  --vep-surface: #ffffff;
  --vep-background: #f3f7fa;
  --vep-border: #dfe8ee;
  --bs-primary: var(--vep-blue);
  --bs-primary-rgb: 33, 111, 171;
  --bs-link-color: var(--vep-blue);
  --bs-link-hover-color: var(--vep-blue-dark);
}

/* V25 customer-experience surveys and insights */
.journey-survey-settings {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #c9dfea;
  border-left: 4px solid var(--vep-green);
  border-radius: .75rem;
  background: #f7fbfd;
}

.journey-survey-settings .form-check-label {
  color: var(--vep-ink);
  font-weight: 700;
}

.journey-survey-settings > p {
  margin: .35rem 0 .9rem;
  color: var(--vep-muted);
  font-size: .88rem;
}

.journey-survey-settings [data-survey-question-wrap] small {
  display: block;
  margin-top: .45rem;
}

.journey-survey-preview {
  display: grid;
  gap: .4rem;
  margin-top: .9rem;
  padding: .8rem;
  border: 1px solid #d4e4ec;
  border-radius: .65rem;
  background: #fff;
}

.journey-survey-preview > span {
  color: var(--vep-muted);
  font-size: .75rem;
}

.journey-survey-preview > div {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .35rem;
}

.journey-survey-preview > div span {
  display: grid;
  min-height: 2rem;
  place-items: center;
  border: 1px solid #c5dae6;
  border-radius: .5rem;
  color: var(--vep-blue);
  font-weight: 800;
}

.journey-survey-pill {
  border: 1px solid #d5bceb;
  display: inline-flex;
  align-items: center;
  padding: .26rem .55rem;
  border-radius: 999px;
  background: #f3eaff;
  color: #67409a;
  font-size: .72rem;
  font-weight: 700;
}

.phase-survey-card {
  display: grid;
  gap: .55rem;
  margin-top: .85rem;
  padding: .9rem;
  border: 1px solid #c9dfea;
  border-radius: .75rem;
  background: #fff;
  color: var(--vep-ink);
}

.phase-survey-eyebrow {
  color: var(--vep-green-dark);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.phase-survey-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .4rem;
  margin-top: .2rem;
}

.phase-survey-choice {
  display: grid;
  min-width: 0;
  min-height: 3.5rem;
  padding: .4rem .2rem;
  place-items: center;
  border: 1px solid #bcd4e1;
  border-radius: .6rem;
  background: #f7fbfd;
  color: var(--vep-blue);
  line-height: 1.05;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.phase-survey-choice:hover,
.phase-survey-choice:focus-visible {
  border-color: var(--vep-blue);
  box-shadow: 0 0 0 3px rgba(31, 119, 179, .14);
  transform: translateY(-1px);
}

.phase-survey-choice.selected {
  border-color: var(--vep-blue);
  background: var(--vep-blue);
  color: #fff;
}

.phase-survey-choice strong {
  font-size: 1.05rem;
}

.phase-survey-choice .phase-survey-choice-label {
  font-size: .62rem;
  font-weight: 700;
}

.phase-survey-form-footer {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .55rem;
  color: var(--vep-muted);
  font-size: .72rem;
}

.phase-survey-form-footer strong {
  color: var(--vep-blue-dark);
  text-align: right;
}

.phase-survey-staff-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.phase-survey-staff-result small {
  color: var(--vep-muted);
}

.phase-survey-result-pill,
.project-feedback-status {
  border: 1px solid #d3dde3;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .3rem .62rem;
  border-radius: 999px;
  background: #eaf0f3;
  color: #526979;
  font-size: .72rem;
  font-weight: 700;
}

.phase-survey-result-pill.needs-attention,
.project-feedback-status.needs-attention {
  border-color: #ebbdc3;
  background: #fde8e7;
  color: #a7352f;
}

.phase-survey-result-pill.watch,
.project-feedback-status.watch {
  border-color: #e7c76b;
  background: #fff1d8;
  color: #8b5d0a;
}

.phase-survey-result-pill.positive,
.project-feedback-status.positive {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.portal-card.project-feedback-card {
  margin-top: 1.5rem;
  border-top: 4px solid var(--vep-blue-dark);
}

.project-feedback-list {
  display: grid;
}

.project-feedback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.25rem;
  border-top: 1px solid var(--vep-border);
}

.project-feedback-row:first-child {
  border-top: 0;
}

.project-feedback-row > div {
  display: grid;
  gap: .15rem;
}

.project-feedback-row span:not(.project-feedback-status),
.project-feedback-empty {
  color: var(--vep-muted);
  font-size: .8rem;
}

.project-feedback-empty {
  padding: 1.25rem;
}

.insights-heading {
  align-items: end;
}

.insights-range-form {
  display: flex;
  align-items: end;
  gap: .6rem;
}

.insights-range-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.insights-range-form select {
  min-width: 10rem;
}

.insights-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.insights-stat-card {
  display: grid;
  gap: .25rem;
  min-height: 8.4rem;
  padding: 1.3rem;
  border: 1px solid var(--vep-border);
  border-top: 4px solid #6d9bb4;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 .8rem 2rem rgba(21, 51, 75, .07);
}

.insights-stat-card.primary { border-top-color: var(--vep-blue); }
.insights-stat-card.warning { border-top-color: #cf8920; }
.insights-stat-card.positive { border-top-color: var(--vep-green); }

.insights-stat-card > span {
  color: #566d7b;
  font-size: .8rem;
  font-weight: 800;
}

.insights-stat-card strong {
  align-self: end;
  color: var(--vep-ink);
  font-size: 2rem;
  line-height: 1;
}

.insights-stat-card small {
  color: var(--vep-muted);
}

.insights-stat-card-link { color: inherit; text-decoration: none; }
main .portal-summary .insights-stat-card.insights-stat-card-link:hover { color: inherit; border-color: var(--vep-blue); box-shadow: 0 .8rem 2rem rgba(21, 51, 75, .12); }
.insights-stat-card-link:focus-visible { outline: 3px solid var(--vep-blue); outline-offset: 3px; }
main .portal-summary .insights-stat-card-link > .insights-card-action { color: var(--vep-blue-dark); font-weight: 700; }
.insights-stat-card-link:hover .insights-card-action { text-decoration: underline; }

.insights-trend.up,
.insights-phase-trend.up { color: #347600; }

.insights-trend.down,
.insights-phase-trend.down { color: #a7352f; }

.insights-trend.steady,
.insights-phase-trend.steady { color: var(--vep-muted); }

.insights-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, .8fr);
  gap: 1.5rem;
  align-items: start;
}

.insights-phase-card,
.insights-attention-card,
.insights-message-card {
  overflow: hidden;
}

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

.insights-card-header > span {
  color: var(--vep-muted);
  font-size: .78rem;
  font-weight: 700;
}

.insights-phase-list {
  display: grid;
}

.insights-phase-row {
  display: grid;
  gap: .9rem;
  padding: 1.15rem 1.3rem;
  border-top: 1px solid var(--vep-border);
}

.insights-phase-row:first-child { border-top: 0; }

.insights-phase-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.insights-phase-summary > div {
  display: grid;
  gap: .15rem;
}

.insights-phase-summary span {
  color: var(--vep-muted);
  font-size: .75rem;
}

.insights-average-pill {
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #e9f3f8;
  color: var(--vep-blue-dark) !important;
  font-size: .9rem !important;
  font-weight: 700;
  white-space: nowrap;
}

.insights-average-pill.low { background: #fde8e7; color: #a7352f !important; }
.insights-average-pill.high {   
  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text) !important;
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.insights-phase-trend {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin: -.35rem 0 0;
  font-size: .78rem;
  font-weight: 700;
}

.insights-phase-trend small {
  color: var(--vep-muted);
  font-weight: 500;
}

.insights-distribution {
  display: grid;
  gap: .3rem;
}

.insights-distribution > div {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 1.5rem;
  gap: .5rem;
  align-items: center;
  color: var(--vep-muted);
  font-size: .7rem;
}

.insights-distribution-track {
  height: .4rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f0f4;
}

.insights-distribution-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vep-blue), var(--vep-green));
}

.insights-attention-list {
  display: grid;
}

.insights-attention-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  padding: .9rem 1rem;
  border-top: 1px solid var(--vep-border);
  color: var(--vep-ink);
  text-decoration: none;
}

.insights-attention-list a:hover { background: #f7fbfd; }

.insights-attention-list a > span:not(.insights-low-score) {
  display: grid;
}

.insights-attention-list small,
.insights-attention-list time {
  color: var(--vep-muted);
  font-size: .72rem;
}

.insights-low-score {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: #fde8e7;
  color: #a7352f;
  font-size: .72rem;
  font-weight: 900;
}

.insights-attention-empty,
.insights-empty-state {
  padding: 1.4rem;
  color: var(--vep-muted);
}

.insights-empty-state p { margin: .3rem 0 1rem; }

.insights-message-card,
.insights-response-card { margin-top: 1.5rem; }

.insights-response-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--vep-border);
}

.insights-response-stat-grid article {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.25rem 1.35rem;
  border-left: 1px solid var(--vep-border);
}

.insights-response-stat-grid article:first-child { border-left: 0; }
.insights-response-stat-grid article.warning { background: #fffaf1; }

.insights-response-stat-grid span,
.insights-response-stat-grid small { color: var(--vep-muted); }

.insights-response-stat-grid span {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.insights-response-stat-grid strong {
  color: var(--vep-navy);
  font-size: 1.55rem;
}

.insights-response-stat-grid small { font-size: .78rem; }

.insights-follow-up-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--vep-border);
}

.insights-reply-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1.35rem;
  border-top: 1px solid var(--vep-border);
  color: inherit;
  text-decoration: none;
}

.insights-reply-list a:first-child { border-top: 0; }
.insights-reply-list a:hover { background: #f7fbfd; }

.insights-reply-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: .2rem;
}
.insights-reply-details > strong,
.insights-reply-details > small { overflow-wrap: anywhere; }
.insights-reply-details .conversation-waiting-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  align-self: flex-start;
  gap: .4rem;
  max-width: 100%;
  margin-top: .35rem;
  padding: .35rem .6rem;
  border-radius: .4rem;
  line-height: 1.4;
}
.insights-reply-details .conversation-waiting-badge > span { min-width: 0; }

.insights-reply-list small,
.insights-reply-list time {
  color: var(--vep-muted);
  font-size: .78rem;
}

.insights-waiting-age {
  display: inline-flex;
  justify-content: center;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: #fde8e7;
  color: #a7352f;
  font-size: .78rem;
  font-weight: 800;
}

.insights-response-empty {
  padding: 1.25rem 1.35rem;
  color: var(--vep-muted);
}

.insights-message-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insights-message-grid article {
  display: grid;
  gap: .25rem;
  padding: 1.25rem;
  border-left: 1px solid var(--vep-border);
}

.insights-message-grid article:first-child { border-left: 0; }

.insights-message-grid strong {
  color: var(--vep-ink);
  font-size: 1.45rem;
}

.insights-message-grid span {
  color: var(--vep-muted);
  font-size: .78rem;
}

@media (max-width: 991.98px) {
  .insights-stat-grid,
  .insights-message-grid,
  .insights-response-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insights-content-grid {
    grid-template-columns: 1fr;
  }

  .insights-message-grid article:nth-child(odd) { border-left: 0; }
  .insights-message-grid article:nth-child(n + 3) { border-top: 1px solid var(--vep-border); }
  .insights-response-stat-grid article:nth-child(odd) { border-left: 0; }
  .insights-response-stat-grid article:nth-child(n + 3) { border-top: 1px solid var(--vep-border); }
}

@media (max-width: 575.98px) {
  .phase-survey-choice {
    min-height: 3rem;
  }

  .phase-survey-choice .phase-survey-choice-label {
    display: none;
  }

  .phase-survey-form-footer,
  .phase-survey-staff-result,
  .project-feedback-row,
  .insights-heading,
  .insights-phase-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .phase-survey-form-footer strong { text-align: left; }

  .insights-stat-grid,
  .insights-message-grid,
  .insights-response-stat-grid {
    grid-template-columns: 1fr;
  }

  .insights-message-grid article,
  .insights-message-grid article:nth-child(odd) {
    border-top: 1px solid var(--vep-border);
    border-left: 0;
  }

  .insights-message-grid article:first-child { border-top: 0; }

  .insights-response-stat-grid article,
  .insights-response-stat-grid article:nth-child(odd) {
    border-top: 1px solid var(--vep-border);
    border-left: 0;
  }

  .insights-response-stat-grid article:first-child { border-top: 0; }

  .insights-follow-up-header { align-items: flex-start; }

  .insights-reply-list a {
    grid-template-columns: minmax(0, 1fr);
    gap: .55rem;
  }

  .insights-reply-list time { grid-column: 1; }

  .insights-range-form,
  .insights-range-form select {
    width: 100%;
  }
}

/* Referral rewards */
.referral-heading,
.referral-admin-heading,
.referral-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.referral-reward-hero {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(120deg, #f8fcf4 0%, #f2f8fb 70%, #eef6fb 100%);
  border: 1px solid #d4e5d0;
  border-top: 4px solid var(--vep-green);
  border-radius: 1rem;
  box-shadow: 0 .8rem 2rem rgba(21, 51, 75, .07);
}

.referral-reward-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.referral-gift-icon,
.project-referral-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: .85rem;
  font-size: 1.5rem;
}

.referral-tier-grid,
.referral-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.referral-tier {
  position: relative;
  padding: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--vep-border);
  border-radius: .8rem;
}

.referral-tier::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #c8d5dd;
  content: "";
}

.referral-tier.current {
  border-color: #9bc8e4;
  box-shadow: 0 0 0 3px rgba(33, 111, 171, .08);
}

.referral-tier.current::before {
  background: var(--vep-blue);
}

.referral-tier.complete::before {
  background: var(--vep-green);
}

.referral-tier span,
.referral-stat-grid span {
  display: block;
  color: var(--vep-muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.referral-tier strong {
  display: block;
  margin-top: .3rem;
  color: var(--vep-blue-dark);
  font-size: 1.7rem;
}

.referral-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.referral-stat-grid article {
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid var(--vep-border);
  border-top: 3px solid var(--vep-blue);
  border-radius: .85rem;
  box-shadow: 0 .65rem 1.6rem rgba(21, 51, 75, .055);
}

.referral-stat-grid article:nth-child(2),
.referral-stat-grid article:nth-child(4) {
  border-top-color: var(--vep-green);
}

.referral-stat-grid article.has-warning {
  border-top-color: #d58a18;
  background: #fffaf1;
}

.referral-stat-grid strong {
  display: block;
  margin-top: .3rem;
  color: var(--vep-blue-dark);
  font-size: 1.75rem;
}

.referral-form-card,
.referral-history-card,
.referral-detail-card,
.referral-referrer-card,
.referral-reward-card,
.referral-admin-card,
.project-referral-card {
  overflow: hidden;
  border-top: 3px solid var(--vep-blue);
}

.referral-history-card,
.referral-reward-card,
.project-referral-card {
  border-top-color: var(--vep-green);
}

.referral-contact-note,
.project-referral-note {
  color: var(--vep-muted);
  font-size: .78rem;
}

.referral-consent-check {
  padding: .9rem .9rem .9rem 2.5rem;
  background: #f7fafc;
  border: 1px solid var(--vep-border);
  border-radius: .65rem;
}

.referral-consent-check .form-check-input {
  margin-left: -1.55rem;
}

.referral-submit-button {
  min-width: 13rem;
}

.referral-history-list {
  padding: 0 1.25rem;
}

.referral-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--vep-border);
}

.referral-history-row:last-child {
  border-bottom: 0;
}

.referral-history-row > div:first-child span,
.referral-history-result span:not(.referral-status-pill) {
  display: block;
  margin-top: .2rem;
  color: var(--vep-muted);
  font-size: .78rem;
}

.referral-history-result {
  text-align: right;
}

.referral-history-result > strong {
  display: block;
  margin-top: .35rem;
  color: var(--vep-green-dark);
}

.referral-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .35rem .65rem;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.referral-detail-heading > .referral-status-pill {
  font-size: .9rem;
  line-height: 1.4;
  padding: .5rem .9rem;
}

.referral-status-pill.earned {
  color: #7c500f;
  background: #fff0cf;
}

.referral-status-pill.paid {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.referral-status-pill.referral-in-progress {
  color: #165f85;
  background: #e7f4fb;
}

.referral-status-pill.closed {
  color: #687985;
  background: #edf1f3;
}

.referral-empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.referral-empty-state > span {
  display: block;
  margin-bottom: .75rem;
  font-size: 2rem;
}

.referral-fine-print {
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
  color: var(--vep-muted);
  background: #f7fafc;
  border-left: 3px solid var(--vep-green);
  border-radius: .5rem;
  font-size: .84rem;
  line-height: 1.55;
}

.project-referral-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.project-referral-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .7rem;
  font-size: 1.2rem;
}

.project-referral-card p:not(.portal-eyebrow) {
  color: var(--vep-muted);
  font-size: .88rem;
  line-height: 1.55;
}

.project-referral-note {
  display: block;
  margin-top: .65rem;
  text-align: center;
}

.referral-admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
}

.referral-filter-form {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(11rem, auto) auto;
  gap: .65rem;
  width: min(100%, 42rem);
}

.referral-admin-table th {
  padding: .85rem 1rem;
  color: var(--vep-muted);
  background: #f4f8fa;
  font-size: .72rem;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.referral-admin-table td {
  padding: 1rem;
  vertical-align: middle;
  border-color: var(--vep-border);
}

.referral-admin-table td > span:not(.referral-status-pill),
.referral-admin-table td > a + span,
.referral-project-link {
  display: block;
  margin-top: .2rem;
  color: var(--vep-muted);
  font-size: .76rem;
}

.referral-admin-table td > a:not(.btn):not(.referral-project-link) {
  font-weight: 800;
  text-decoration: none;
}

.referral-project-link {
  margin-top: .4rem;
  color: var(--vep-blue-dark);
  text-decoration: none;
}

.referral-reward-value {
  color: var(--vep-green-dark);
}

.referral-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.referral-detail-list > div {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--vep-border);
}

.referral-detail-list dt,
.referral-reward-dates dt {
  color: var(--vep-muted);
  font-size: .7rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.referral-detail-list dd,
.referral-reward-dates dd {
  margin: .25rem 0 0;
  font-weight: 700;
}

.referral-customer-note,
.referral-locked-note {
  padding: 1rem;
  margin-top: 1rem;
  background: #f7fafc;
  border-left: 3px solid var(--vep-green);
  border-radius: .5rem;
}

.referral-customer-note p {
  margin-top: .45rem;
  white-space: pre-wrap;
}

.referral-locked-note {
  margin: 0 0 1rem;
  color: #6f4b16;
  background: #fff8e9;
  border-left-color: #d58a18;
}

.referral-earned-amount {
  display: block;
  margin-bottom: .2rem;
  color: var(--vep-green-dark);
  font-size: 2.2rem;
}

.referral-reward-dates {
  margin: 1rem 0;
}

.referral-reward-dates > div {
  padding: .65rem 0;
  border-top: 1px solid var(--vep-border);
}

.referral-paid-confirmation {
  display: block;
  padding: .7rem;
  color: #416f1b;
  background: #edf7e5;
  border-radius: .55rem;
  font-weight: 800;
  text-align: center;
}

.referral-linked-project-card {
  display: block;
  padding: 1.15rem 1.25rem;
  margin-top: 1.5rem;
  color: var(--vep-blue-dark);
  background: #eef7fc;
  border: 1px solid #c8dfed;
  border-radius: .8rem;
  text-decoration: none;
}

.referral-linked-project-card span,
.referral-linked-project-card small,
.referral-linked-project-card strong {
  display: block;
}

.referral-linked-project-card span {
  color: var(--vep-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.referral-linked-project-card strong {
  margin: .3rem 0;
}

@media (max-width: 991.98px) {
  .referral-heading,
  .referral-admin-heading,
  .referral-detail-heading,
  .referral-admin-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .referral-filter-form {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .referral-tier-grid,
  .referral-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .referral-tier:last-child {
    grid-column: 1 / -1;
  }

  .referral-filter-form {
    grid-template-columns: 1fr;
  }

  .referral-admin-table-wrap {
    overflow: visible;
  }

  .referral-admin-table,
  .referral-admin-table tbody,
  .referral-admin-table tr,
  .referral-admin-table td {
    display: block;
    width: 100%;
  }

  .referral-admin-table thead {
    display: none;
  }

  .referral-admin-table tr {
    padding: 1rem;
    border-bottom: 1px solid var(--vep-border);
  }

  .referral-admin-table td {
    padding: .4rem 0;
    border: 0;
  }

  .referral-admin-table td.text-end {
    margin-top: .45rem;
    text-align: left !important;
  }

  .referral-admin-table td.text-end .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .referral-reward-hero {
    padding: 1.15rem;
  }

  .referral-reward-intro,
  .referral-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .referral-tier-grid,
  .referral-stat-grid,
  .referral-detail-list {
    grid-template-columns: 1fr;
  }

  .referral-tier:last-child {
    grid-column: auto;
  }

  .referral-history-result {
    text-align: left;
  }

  .referral-submit-button {
    width: 100%;
  }
}

/* Solar Journey automation administration and shared system updates */
.message-system {
  justify-content: center;
  margin-block: 1.35rem;
}

.message-system .message-bubble {
  width: min(88%, 760px);
  max-width: 760px;
  color: var(--vep-ink);
  background: linear-gradient(135deg, #f6fbf1, #f2f8fc);
  border: 1px solid #cfe1c2;
  border-left: 4px solid var(--vep-green);
  border-radius: .9rem;
  box-shadow: 0 6px 18px rgba(45, 93, 37, .07);
}

.message-system .message-meta {
  color: var(--vep-green-dark);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.message-system-icon {
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--vep-blue), var(--vep-green));
  border-radius: 50%;
  font-size: .8rem;
}

.message-system-badge {
  padding: .2rem .48rem;
  color: var(--vep-blue-dark);
  background: #fff;
  border: 1px solid #d7e5ec;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
}

.conversation-sender-badge.system {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.solar-journey-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.journey-safety-note {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.35rem;
  padding: 1rem 1.15rem;
  color: #31571b;
  background: #f3f9ed;
  border: 1px solid #d5e8c4;
  border-radius: .85rem;
}

.journey-safety-note strong,
.journey-safety-note span {
  display: block;
}

.journey-safety-note span:not(.journey-safety-icon) {
  margin-top: .15rem;
  color: #5b7467;
  font-size: .78rem;
}

.journey-safety-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  display: grid !important;
  place-items: center;
  color: #fff;
  background: var(--vep-green);
  border-radius: 50%;
  font-weight: 900;
}

.journey-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.journey-stat-card {
  padding: 1.2rem 1.25rem;
  background: #fff;
  border: 1px solid var(--vep-border);
  border-top: 4px solid var(--vep-blue);
  border-radius: .9rem;
  box-shadow: var(--vep-card-shadow);
}

.journey-stat-card:nth-child(2) {
  border-top-color: var(--vep-green);
}

.journey-stat-card:nth-child(3) {
  border-top-color: #5d94b4;
}

.journey-stat-card.has-warning {
  border-top-color: #d58a17;
}

.journey-stat-card span,
.journey-stat-card strong {
  display: block;
}

.journey-stat-card span {
  color: var(--vep-muted);
  font-size: .75rem;
  font-weight: 700;
}

.journey-stat-card strong {
  margin-top: .3rem;
  color: var(--vep-ink);
  font-size: 1.8rem;
  line-height: 1;
}

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

.portal-card.journey-rules-card,
.portal-card.journey-activity-card {
  border-top: 4px solid var(--vep-blue);
  margin-bottom: 1.35rem;
  overflow: hidden;
}

.journey-empty-state {
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.journey-empty-state p {
  max-width: 620px;
  margin: .5rem auto 1.25rem;
}

.journey-stage-group {
  border-top: 1px solid var(--vep-border);
}

.journey-stage-group:first-child {
  border-top: 0;
}

.journey-stage-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .9rem 1.2rem;
  background: #f6f9fb;
}

.journey-stage-title {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.journey-reorder-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  color: var(--vep-muted);
  font-size: .7rem;
}

.journey-reorder-meta form { display: none; }

.journey-reorder-meta strong {
  min-width: 4.8rem;
  color: var(--vep-muted);
  font-size: .7rem;
  text-align: right;
}

.journey-reorder-meta strong.is-saved { color: #416f1b; }
.journey-reorder-meta strong.is-error { color: #9f3327; }

.journey-stage-group > header h3 {
  margin: 0;
  color: var(--vep-blue-dark);
  font-size: .88rem;
  font-weight: 800;
}

.journey-stage-number {
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--vep-blue);
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 800;
}

.journey-rule-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border-top: 1px solid #e6eef2;
}

.journey-rule-row:first-child {
  border-top: 0;
}

.journey-rule-row.is-paused {
  opacity: .67;
  background: #fafbfc;
}

.journey-rule-row.is-dragging {
  opacity: .45;
  background: #eef7fb;
  box-shadow: inset 4px 0 var(--vep-blue);
}

.journey-order-controls {
  display: grid;
  grid-template-columns: 1.8rem;
  gap: .18rem;
  align-items: center;
}

.journey-order-controls.is-placeholder { visibility: hidden; }

.journey-drag-handle,
.journey-order-arrow {
  display: grid;
  width: 1.8rem;
  height: 1.55rem;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: .35rem;
  color: #668091;
  background: transparent;
}

.journey-drag-handle {
  height: 2rem;
  cursor: grab;
}

.journey-drag-handle:active { cursor: grabbing; }

.journey-drag-handle span {
  width: 1rem;
  height: 1.25rem;
  background-image: radial-gradient(circle, currentColor 1.4px, transparent 1.6px);
  background-position: 0 0;
  background-size: .34rem .34rem;
}

.journey-order-arrow {
  font-size: .8rem;
  line-height: 1;
}

.journey-drag-handle:hover,
.journey-drag-handle:focus-visible,
.journey-order-arrow:hover:not(:disabled),
.journey-order-arrow:focus-visible {
  border-color: #b9d2df;
  color: var(--vep-blue-dark);
  background: #eef7fb;
}

.journey-order-arrow:disabled {
  opacity: .25;
}

.journey-rule-title,
.journey-trigger-summary,
.journey-rule-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
}

.journey-rule-title > strong {
  font-size: .92rem;
}

.journey-status-pill,
.journey-email-pill,
.journey-email-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .28rem .55rem;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
}

.journey-status-pill.active,
.journey-email-status.delivered {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.journey-status-pill.paused,
.journey-email-status.notrequested,
.journey-email-status.skippednoportalaccess {
  border: 1px solid #d3dde3;
  color: #667581;
  background: #edf1f3;
}

.journey-email-pill {
  border: 1px solid #b8d5e9;
  color: var(--vep-blue-dark);
  background: #eaf4fa;
}

.journey-email-status.pending {
  border: 1px solid #e7c76b;
  color: #85530b;
  background: #fff2dc;
}

.journey-email-status.failed {
  border: 1px solid #ebbdc3;
  color: #9f3327;
  background: #fceae7;
}

.journey-trigger-summary {
  margin-top: .45rem;
  color: var(--vep-muted);
  font-size: .72rem;
}

.journey-trigger-summary strong {
  color: var(--vep-blue-dark);
}

.journey-delay-pill {
  gap: .25rem;
  white-space: nowrap;
}

.journey-delay-pill > svg {
  flex-shrink: 0;
}

.journey-guide-summary {
  margin: .4rem 0 0;
  color: var(--vep-muted);
  font-size: .72rem;
  line-height: 1.5;
}

.journey-message-preview {
  max-width: 850px;
  margin: .55rem 0 0;
  color: #4e6474;
  font-size: .77rem;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.journey-rule-actions {
  justify-content: flex-end;
  max-width: 20rem;
}

.journey-future-action-row {
  display: flex;
  justify-content: flex-end;
  flex-basis: 100%;
  margin-top: .15rem;
}

.journey-future-action {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .7rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  background: #edf5fc;
  color: #175d96;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.journey-future-action svg {
  flex-shrink: 0;
}

.journey-future-arrow {
  margin-left: .15rem;
}

.journey-future-action:hover {
  color: #124c7d;
  background: #dfedfa;
  border-color: #bed8ed;
  text-decoration: none;
}

.journey-future-action:focus-visible {
  outline: 3px solid #2174b2;
  outline-offset: 3px;
}

.journey-no-activity {
  padding: 2rem 1.2rem;
  text-align: center;
}

.journey-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) 11rem 7rem;
  gap: 1rem;
  align-items: center;
  padding: .9rem 1.2rem;
  color: var(--vep-ink);
  border-top: 1px solid var(--vep-border);
  text-decoration: none;
}

/* Keep every history row on the same tracks regardless of value/status length. */
.journey-activity-row > * {
  min-width: 0;
}

.journey-activity-project,
.journey-current-value,
.journey-email-result {
  overflow-wrap: anywhere;
}

.journey-activity-row .journey-current-value {
  text-align: left;
}

.journey-activity-row .journey-email-status {
  max-width: 100%;
  white-space: normal;
}

.journey-activity-row:hover {
  color: var(--vep-ink);
  background: #f6fafc;
}

.journey-activity-project strong,
.journey-activity-project span,
.journey-activity-row time span {
  display: block;
}

.journey-activity-project {
  color: var(--vep-ink);
  text-decoration: none;
}

.journey-activity-project:hover strong {
  color: var(--vep-blue);
  text-decoration: underline;
  text-underline-offset: .18rem;
}

.journey-activity-project span,
.journey-current-value,
.journey-activity-row time {
  color: var(--vep-muted);
  font-size: .7rem;
}

.journey-email-result {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}

.journey-retry-email {
  padding: 0;
  color: var(--vep-blue-dark);
  background: transparent;
  border: 0;
  font-size: .66rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .15rem;
}

.journey-activity-row time {
  text-align: right;
  white-space: nowrap;
}

.journey-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .8fr);
  gap: 1.25rem;
  align-items: start;
}

.journey-editor-card,
.journey-preview-card {
  overflow: hidden;
}

.journey-preview-card {
  position: sticky;
  top: 1rem;
}

.journey-message-editor {
  min-height: 12rem;
  resize: vertical;
}

.journey-message-tools {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .35rem;
  color: var(--vep-muted);
  font-size: .7rem;
}

.journey-field-help {
  display: block;
  margin-top: .35rem;
  color: var(--vep-muted);
  line-height: 1.45;
}

.journey-token-panel {
  padding: 1rem;
  background: #f6f9fb;
  border: 1px solid var(--vep-border);
  border-radius: .75rem;
}

.journey-token-panel > strong {
  display: block;
  font-size: .8rem;
}

.journey-token-panel > p {
  margin: .2rem 0 .7rem;
  color: var(--vep-muted);
  font-size: .7rem;
}

.journey-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.journey-token-list button {
  padding: .28rem .5rem;
  color: var(--vep-blue-dark);
  background: #fff;
  border: 1px solid #c8dce8;
  border-radius: .45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .65rem;
}

.journey-token-list button:hover {
  background: #eaf4fa;
}

.journey-switches {
  display: grid;
  gap: .8rem;
  margin-top: 1rem;
}

.journey-switches .form-check {
  padding: .85rem .9rem .85rem 3.15rem;
  background: #fbfcfd;
  border: 1px solid var(--vep-border);
  border-radius: .65rem;
}

.journey-switches .form-check-input {
  margin-left: -2.25rem;
}

.journey-switches label {
  color: var(--vep-ink);
  font-size: .8rem;
  font-weight: 800;
}

.journey-switches span {
  display: block;
  color: var(--vep-muted);
  font-size: .68rem;
}

.journey-system-preview {
  display: flex;
  gap: .8rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f6fbf1, #f2f8fc);
  border: 1px solid #cfe1c2;
  border-left: 4px solid var(--vep-green);
  border-radius: .8rem;
}

.journey-system-preview-icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--vep-blue), var(--vep-green));
  border-radius: 50%;
}

.journey-system-preview-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .68rem;
}

.journey-system-preview-meta strong {
  color: var(--vep-green-dark);
  text-transform: uppercase;
}

.journey-system-preview-meta span {
  color: var(--vep-muted);
}

.journey-system-preview p {
  margin: .55rem 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: .82rem;
  line-height: 1.55;
}

.journey-system-preview time {
  color: var(--vep-muted);
  font-size: .65rem;
}

.journey-preview-note {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--vep-border);
}

.journey-preview-note strong {
  font-size: .78rem;
}

.journey-preview-note ol {
  margin: .65rem 0 0;
  padding-left: 1.15rem;
  color: var(--vep-muted);
  font-size: .72rem;
  line-height: 1.55;
}

@media (max-width: 991.98px) {
  .journey-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-editor-grid {
    grid-template-columns: 1fr;
  }

  .journey-preview-card {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .solar-journey-heading,
  .journey-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .journey-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .journey-rule-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .journey-rule-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .journey-future-action-row {
    justify-content: flex-start;
  }

  .journey-stage-group > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .journey-reorder-meta {
    justify-content: flex-start;
    padding-left: 2.35rem;
  }

  .journey-activity-row {
    grid-template-columns: minmax(0, 1fr);
    gap: .5rem;
  }

  .journey-current-value {
    display: block;
  }

  .journey-activity-row time {
    grid-column: 1 / -1;
    text-align: left;
  }

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

.journey-time-settings {
  padding: 1rem;
  background: linear-gradient(135deg, #f5f9fc, #f7fbf2);
  border: 1px solid #cfdee7;
  border-left: 4px solid var(--vep-blue);
  border-radius: .8rem;
}

.journey-time-settings-heading {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
}

.journey-time-settings-heading strong,
.journey-time-settings-heading p {
  display: block;
}

.journey-time-settings-heading strong {
  color: var(--vep-blue-dark);
  font-size: .86rem;
}

.journey-time-settings-heading p {
  margin: .15rem 0 0;
  color: var(--vep-muted);
  font-size: .72rem;
  line-height: 1.5;
}

.journey-time-icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--vep-blue);
  border-radius: .55rem;
  font-size: .9rem;
}

.journey-time-condition-label {
  padding-top: .15rem;
  color: var(--vep-green-dark);
  border-top: 1px solid #d8e4e9;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.journey-time-safety {
  margin-top: 1rem;
  padding: .7rem .8rem;
  color: #5b704d;
  background: rgba(255, 255, 255, .72);
  border: 1px solid #dce8d2;
  border-radius: .55rem;
  font-size: .7rem;
  line-height: 1.5;
}

.journey-schedule-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(120px, .55fr) minmax(220px, 1.2fr) auto;
  gap: 1rem;
  align-items: center;
  padding: .95rem 1.2rem;
  border-top: 1px solid var(--vep-border);
}

.journey-schedule-due span,
.journey-schedule-due strong,
.journey-schedule-due small,
.journey-schedule-result small {
  display: block;
}

.journey-schedule-due span {
  color: var(--vep-muted);
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.journey-schedule-due strong {
  margin-top: .08rem;
  font-size: .74rem;
}

.journey-schedule-due small,
.journey-schedule-result small,
.journey-schedule-row time {
  color: var(--vep-muted);
  font-size: .66rem;
}

.journey-schedule-result small {
  margin-top: .25rem;
  line-height: 1.4;
}

.journey-occurrence-status {
  display: inline-flex;
  width: fit-content;
  padding: .28rem .55rem;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
}

.journey-occurrence-status.pending,
.journey-occurrence-status.processing {
  border: 1px solid #e7c76b;
  color: #85530b;
  background: #fff2dc;
}

.journey-occurrence-status.delivered {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.journey-occurrence-status.cancelled,
.journey-occurrence-status.conditionnotmet {
  border: 1px solid #d3dde3;
  color: #667581;
  background: #edf1f3;
}

.journey-occurrence-status.failed {
  border: 1px solid #ebbdc3;
  color: #9f3327;
  background: #fceae7;
}

.journey-schedule-row time {
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 767.98px) {
  .journey-schedule-row {
    grid-template-columns: 1fr 1fr;
  }

  .journey-schedule-result {
    grid-column: 1 / -1;
  }

  .journey-schedule-row time {
    text-align: left;
  }
}

html {
  position: relative;
  min-height: 100%;
  font-size: 16px;
}

body.portal-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--vep-ink);
  background: var(--vep-background);
}

a {
  color: var(--vep-blue);
}

.btn-primary {
  --bs-btn-bg: var(--vep-blue);
  --bs-btn-border-color: var(--vep-blue);
  --bs-btn-hover-bg: var(--vep-blue-dark);
  --bs-btn-hover-border-color: var(--vep-blue-dark);
  --bs-btn-active-bg: var(--vep-blue-dark);
  --bs-btn-active-border-color: var(--vep-blue-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--vep-blue);
  --bs-btn-border-color: var(--vep-blue);
  --bs-btn-hover-bg: var(--vep-blue);
  --bs-btn-hover-border-color: var(--vep-blue);
}

.btn:focus-visible,
.form-control:focus,
.form-check-input:focus,
.nav-link:focus-visible {
  border-color: var(--vep-blue);
  box-shadow: 0 0 0 .25rem rgba(33, 111, 171, .2);
}

.project-feedback-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.project-feedback-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem;
  padding: 1rem;
  min-width: 0;
  border: 1px solid var(--vep-border);
  border-top: 3px solid #b5c8d4;
  border-radius: .75rem;
  background: #fbfdff;
}

.project-feedback-tile h3 {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  min-height: 2.8em;
}

.project-feedback-tile .project-feedback-status {
  white-space: normal;
}

.project-feedback-score { font-size: 2rem; font-weight: 750; line-height: 1.2; }
.project-feedback-score small { font-size: 1rem; font-weight: 500; }
.project-feedback-tile.positive { border-top-color: #76ad16; }
.project-feedback-tile.positive .project-feedback-score { color: #467600; }
.project-feedback-tile.needs-attention { border-top-color: #cc3445; }
.project-feedback-tile.needs-attention .project-feedback-score { color: #b32333; }
.project-feedback-tile.watch { border-top-color: #c68712; }
.project-feedback-tile.watch .project-feedback-score { color: #855700; }
.project-feedback-tile.pending { border-top-color: var(--vep-blue); }

@media (max-width: 1199.98px) {
  .project-feedback-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .project-feedback-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479.98px) {
  .project-feedback-grid { grid-template-columns: minmax(0, 1fr); }
  .project-feedback-tile h3 { min-height: 0; }
}

.portal-navbar {
  min-height: 84px;
  background: var(--vep-surface);
  border-bottom: 1px solid var(--vep-border);
  box-shadow: 0 4px 18px rgba(20, 58, 82, .06);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--vep-ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .015em;
}

.portal-brand:hover {
  color: var(--vep-blue-dark);
}

.portal-brand img {
  width: 145px;
  height: auto;
}

.portal-brand span {
  padding-left: 1rem;
  border-left: 1px solid var(--vep-border);
}

.portal-brand .portal-home-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .65rem .45rem 1rem;
  border-radius: 0 .5rem .5rem 0;
}

.portal-home-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  fill: none;
  stroke: var(--vep-blue);
  stroke-width: 1.8;
}

.portal-brand:hover .portal-home-label,
.portal-brand:focus-visible .portal-home-label {
  background: #edf6fc;
  color: var(--vep-blue-dark);
}

.portal-brand:focus-visible {
  outline: 2px solid var(--vep-blue);
  outline-offset: 4px;
  border-radius: .5rem;
}

.portal-profile-toggle {
  min-height: 2.6rem;
  padding: .25rem .55rem .25rem .3rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--vep-ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: .75rem;
  font-size: .9rem;
  font-weight: 750;
  line-height: 1;
  transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.portal-profile-toggle:hover,
.portal-profile-toggle.show,
.portal-profile-toggle.active {
  color: var(--vep-blue-dark);
  background: #eef6fa;
  border-color: #d2e4ee;
}

.portal-profile-toggle:focus-visible {
  outline: 0;
  border-color: var(--vep-blue);
  box-shadow: 0 0 0 .25rem rgba(33, 111, 171, .2);
}

.portal-profile-avatar {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--vep-blue) 20%, var(--vep-green) 100%);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .02em;
}

.portal-profile-toggle::after {
  margin-left: .1rem;
}

.portal-profile-dropdown {
  min-width: 13rem;
  margin-top: .55rem;
  padding: .45rem;
  border: 1px solid var(--vep-border);
  border-radius: .75rem;
  box-shadow: 0 14px 36px rgba(20, 58, 82, .14);
}

.portal-profile-dropdown .dropdown-divider {
  margin: .35rem 0;
  border-color: var(--vep-border);
}

.portal-profile-action {
  min-height: 2.55rem;
  padding: .55rem .65rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--vep-ink);
  border-radius: .5rem;
  font-size: .85rem;
  font-weight: 700;
}

.portal-profile-action:hover,
.portal-profile-action:focus,
.portal-profile-action.active {
  color: var(--vep-blue-dark);
  background: #eef6fa;
}

.portal-profile-action svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-admin-link {
  color: var(--vep-blue-dark);
  font-weight: 700;
}

.portal-main {
  flex: 1;
  min-height: calc(100vh - 154px);
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.portal-heading {
  margin-bottom: 2rem;
}

.portal-heading h1 {
  color: var(--vep-ink);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 750;
  letter-spacing: -.035em;
}

.portal-eyebrow {
  color: var(--vep-green-dark);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.portal-card,
.portal-stat-card,
.portal-status-card {
  border: 1px solid var(--vep-border);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(20, 58, 82, .06);
  overflow: hidden;
}

#customer-projects.portal-card {
  border-top: 4px solid var(--vep-blue);
}

.portal-card .card-header {
  padding: 1.25rem 1.5rem;
  border-bottom-color: var(--vep-border);
}

.portal-stat-card .card-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.5rem;
  border-top: 4px solid var(--vep-blue);
}

.portal-stat-accent .card-body {
  border-top-color: var(--vep-green);
}

.portal-stat-message .card-body {
  border-top-color: #5c8eae;
}

.portal-stat-label,
.portal-progress-label {
  color: var(--vep-muted);
  font-size: .875rem;
  font-weight: 700;
}

.portal-stat-value,
.portal-progress-value {
  color: var(--vep-ink);
  font-size: 2.25rem;
  line-height: 1.1;
}

.portal-stat-note {
  color: var(--vep-muted);
  font-size: .8125rem;
}

.portal-stat-link {
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.portal-stat-link:hover {
  color: inherit;
  box-shadow: 0 16px 34px rgba(20, 58, 82, .1);
  transform: translateY(-2px);
}

.portal-empty-state {
  max-width: 580px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.portal-empty-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: 50%;
  font-weight: 800;
}

/* Salesforce-managed team project list */
.portal-managed-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  padding: .6rem .85rem;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border: 1px solid #cfe2ef;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}

.portal-managed-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.portal-project-list-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.portal-project-search {
  width: min(100%, 38rem);
  display: flex;
  align-items: center;
  gap: .65rem;
}

.portal-project-search-field {
  position: relative;
  flex: 1 1 auto;
}

.portal-project-search-icon {
  position: absolute;
  top: 50%;
  left: .9rem;
  width: 1.15rem;
  height: 1.15rem;
  color: #6f8291;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.portal-project-search-input {
  min-height: 2.75rem;
  padding-left: 2.7rem;
  padding-right: 2.65rem;
  background: #f8fbfd;
  border-color: #cbdbe5;
}

.portal-project-search-input:focus {
  background: #fff;
  border-color: var(--vep-blue);
  box-shadow: 0 0 0 .2rem rgb(33 111 171 / 12%);
}

.portal-project-search-clear {
  position: absolute;
  top: 50%;
  right: .75rem;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  color: #607787;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-50%);
}

.portal-project-search-clear:hover,
.portal-project-search-clear:focus-visible {
  color: var(--vep-blue-dark);
  background: #e7f1f7;
}

.portal-project-search-button {
  min-height: 2.75rem;
  padding-inline: 1.2rem;
  font-weight: 750;
}

.portal-search-empty-icon svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

@media (max-width: 767.98px) {
  .portal-project-list-header,
  .portal-project-search {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-project-search {
    width: 100%;
  }
}

.portal-project-table {
  min-width: 1080px;
}

.portal-project-table thead th {
  padding: .85rem 1rem;
  color: var(--vep-muted);
  background: #f7fafc;
  border-bottom-color: var(--vep-border);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-project-table tbody td {
  padding: 1.05rem 1rem;
  border-bottom-color: var(--vep-border);
  vertical-align: middle;
}

.portal-project-table tbody tr:last-child td {
  border-bottom: 0;
}

.portal-project-row-unread {
  background: #fbfdff;
}

.portal-project-row-unread td:first-child {
  box-shadow: inset 4px 0 0 var(--vep-blue);
}

.portal-project-primary,
.portal-project-secondary,
.portal-project-detail,
.portal-project-synced span {
  display: block;
}

.portal-project-primary {
  color: var(--vep-ink);
  font-size: .875rem;
  font-weight: 750;
}

.portal-project-link {
  width: fit-content;
  text-decoration: none;
}

.portal-project-link:hover,
.portal-project-link:focus-visible {
  color: var(--vep-blue-dark);
  text-decoration: underline;
}

.portal-project-secondary,
.portal-project-synced {
  color: var(--vep-muted);
  font-size: .76rem;
}

.portal-project-detail {
  margin-top: .25rem;
  color: var(--vep-green-dark);
  font-size: .74rem;
  font-weight: 800;
}

.portal-project-address {
  display: block;
  color: #405968;
  font-size: .78rem;
  line-height: 1.35;
}

.portal-project-address.is-empty {
  color: var(--vep-muted);
}

.portal-project-state {
  display: block;
  margin-top: .35rem;
  color: var(--vep-muted);
  font-size: .72rem;
}

.portal-project-state strong {
  color: var(--vep-ink);
  font-weight: 750;
}

.portal-project-status-value {
  display: inline-flex;
  width: fit-content;
  padding: .3rem .6rem;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.portal-project-status-value.is-empty {
  color: var(--vep-muted);
  background: #edf1f3;
}

.portal-salesforce-id {
  display: block;
  margin-bottom: .28rem;
  color: var(--vep-blue-dark);
  font-size: .72rem;
  white-space: nowrap;
}

.portal-project-status,
.portal-invitation-badge,
.portal-documents-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: .3rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-positive-badge,
.portal-project-enabled,
.portal-invitation-accepted,
.portal-documents-linked {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.portal-project-disabled,
.portal-invitation-cancelled,
.portal-invitation-none,
.portal-documents-missing {
  color: #687781;
  background: #edf1f3;
}

.portal-invitation-pending,
.portal-invitation-sent {
  color: var(--vep-blue-dark);
  background: #eaf3f9;
}

.portal-invitation-failed {
  color: #7d3138;
  background: #fff0f1;
}

.portal-access-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
}

.portal-access-actions .portal-project-status {
  margin-bottom: 0;
}

.portal-access-link {
  text-decoration: none;
  transition: box-shadow .15s ease, transform .15s ease;
}

.portal-access-link:hover {
  box-shadow: 0 0 0 2px rgba(35, 126, 181, .18);
  text-decoration: none;
  transform: translateY(-1px);
}

.portal-access-link:focus-visible {
  outline: 3px solid rgba(35, 126, 181, .24);
  outline-offset: 2px;
}

.message-unread-badge,
.message-read-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2rem;
  margin-bottom: 0;
  padding: .42rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.message-unread-badge {
  color: #fff;
  background: var(--vep-blue);
}

.message-unread-link {
  text-decoration: none;
}

.message-unread-link:hover,
.message-unread-link:focus-visible {
  color: #fff;
  background: var(--vep-blue-dark);
  box-shadow: 0 0 0 .2rem rgb(33 111 171 / 14%);
}

.message-read-badge {
  color: #687781;
  background: #edf1f3;
}

.portal-project-table .portal-documents-badge {
  min-height: 2rem;
  margin-bottom: 0;
  padding: .42rem .68rem;
  align-items: center;
  font-size: .7rem;
}

/* Staff invitation queue and review */
.invitation-table {
  min-width: 980px;
}

.invitation-table .portal-invitation-badge {
  margin-bottom: .3rem;
}

.invitation-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 1.5rem;
  align-items: start;
}

.invitation-detail-list {
  margin: 0 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--vep-border);
  border-radius: .85rem;
  overflow: hidden;
}

.invitation-detail-list > div {
  min-width: 0;
  padding: 1rem;
  border-bottom: 1px solid var(--vep-border);
}

.invitation-detail-list > div:nth-child(odd) {
  border-right: 1px solid var(--vep-border);
}

.invitation-detail-list > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.invitation-detail-list dt,
.invitation-email-summary span {
  margin-bottom: .3rem;
  color: var(--vep-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.invitation-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--vep-ink);
  font-size: .9rem;
  font-weight: 650;
}

.invitation-action-card {
  position: sticky;
  top: 1.5rem;
}

.invitation-success-panel {
  display: grid;
  gap: .35rem;
  padding: 1rem;
  color: #416f1b;
  background: #edf7e5;
  border-radius: .75rem;
}

.invitation-success-panel span,
.invitation-meta {
  color: var(--vep-muted);
  font-size: .8rem;
}

.portal-project-synced {
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .portal-project-table-wrap {
    overflow-x: visible;
  }

  .portal-project-table,
  .portal-project-table tbody {
    width: 100%;
    display: block;
  }

  .portal-project-table {
    min-width: 0;
  }

  .portal-project-table thead {
    display: none;
  }

  .portal-project-table tbody tr {
    width: 100%;
    padding: .55rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--vep-border);
  }

  .portal-project-table tbody tr:last-child {
    border-bottom: 0;
  }

  .portal-project-table tbody td,
  .portal-project-table tbody tr:last-child td {
    min-width: 0;
    padding: .55rem .65rem;
    border: 0;
  }

  .portal-project-table tbody td::before {
    margin-bottom: .3rem;
    display: block;
    content: attr(data-label);
    color: var(--vep-muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .portal-project-table .portal-project-synced {
    grid-column: 1 / -1;
  }

  .portal-project-row-unread {
    box-shadow: inset 4px 0 0 var(--vep-blue);
  }

  .portal-project-row-unread td:first-child {
    box-shadow: none;
  }

  .portal-project-secondary {
    overflow-wrap: anywhere;
  }
}

/* V18 shared customer-conversation work queue */
.conversation-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.conversation-visibility-note {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  color: #38576a;
  background: #f5fafc;
  border: 1px solid #cee1ec;
  border-left: 4px solid var(--vep-blue);
  border-radius: .85rem;
}

.conversation-visibility-note strong,
.conversation-visibility-note span {
  display: block;
}

.conversation-visibility-note strong {
  margin-bottom: .15rem;
  color: var(--vep-ink);
  font-size: .86rem;
}

.conversation-visibility-note span:not(.conversation-visibility-icon) {
  font-size: .8rem;
  line-height: 1.5;
}

.conversation-visibility-icon {
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: .75rem;
}

.conversation-visibility-icon svg,
.conversation-empty-icon svg,
.conversation-open-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conversation-visibility-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.conversation-queue-card {
  overflow: hidden;
}

.conversation-queue-header {
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.conversation-filters {
  padding: .25rem;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  background: #edf3f6;
  border-radius: .8rem;
}

.conversation-filter {
  min-height: 2.35rem;
  padding: .42rem .65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  color: #557080;
  border-radius: .62rem;
  font-size: .76rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.conversation-filter strong {
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 .35rem;
  display: inline-grid;
  place-items: center;
  color: #5f7481;
  background: #fff;
  border-radius: 999px;
  font-size: .67rem;
}

.conversation-filter:hover,
.conversation-filter:focus-visible {
  color: var(--vep-blue-dark);
  background: rgba(255, 255, 255, .65);
}

.conversation-filter.active {
  color: #fff;
  background: var(--vep-blue);
  box-shadow: 0 5px 12px rgba(33, 111, 171, .18);
}

.conversation-filter.active strong {
  color: var(--vep-blue-dark);
}

.conversation-queue-list {
  display: grid;
}

.conversation-queue-item {
  position: relative;
  min-width: 0;
  padding: 1.15rem 1.3rem;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(280px, 1.65fr) auto 1.6rem;
  align-items: center;
  gap: 1.25rem;
  color: inherit;
  border-bottom: 1px solid var(--vep-border);
  text-decoration: none;
  transition: background-color .15s ease, box-shadow .15s ease;
}

.conversation-queue-item:last-child {
  border-bottom: 0;
}

.conversation-queue-item.is-unread {
  background: #fbfdff;
  box-shadow: inset 4px 0 0 var(--vep-blue);
}

.conversation-queue-item:hover,
.conversation-queue-item:focus-visible {
  color: inherit;
  background: #f4f9fc;
}

.conversation-queue-item:focus-visible {
  z-index: 1;
  outline: 3px solid rgba(33, 111, 171, .22);
  outline-offset: -3px;
}

.conversation-customer,
.conversation-latest-message,
.conversation-message-time {
  min-width: 0;
}

.conversation-customer > strong,
.conversation-customer > span,
.conversation-message-time span {
  display: block;
}

.conversation-customer > strong {
  margin-bottom: .18rem;
  color: var(--vep-ink);
  font-size: .9rem;
  font-weight: 800;
}

.conversation-customer > span:not(.conversation-project-status) {
  color: var(--vep-muted);
  font-size: .73rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.conversation-project-status {
  width: fit-content;
  margin-top: .45rem;
  padding: .26rem .52rem;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
}

.conversation-message-meta {
  margin-bottom: .35rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}

.conversation-message-meta > strong {
  color: var(--vep-ink);
  font-size: .8rem;
  font-weight: 800;
}

.conversation-sender-badge,
.conversation-unread-badge,
.conversation-mention-badge,
.conversation-attachment-badge {
  width: fit-content;
  padding: .24rem .5rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: .63rem;
  font-weight: 700;
  line-height: 1;
}

.conversation-sender-badge.customer {
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border: 1px solid #b8d5e9;
}

.conversation-sender-badge.team {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.conversation-latest-message p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #405968;
  font-size: .82rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.conversation-alert-badges {
  margin-top: .55rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .38rem;
}

.conversation-unread-badge {
  color: #fff;
  background: var(--vep-blue);
}

.conversation-mention-badge {
  color: #85530b;
  background: #fff2dc;
}

.conversation-attachment-badge {
  color: #53626c;
  background: #edf1f3;
}

.conversation-message-time {
  color: var(--vep-muted);
  font-size: .7rem;
  line-height: 1.45;
  text-align: right;
  white-space: nowrap;
}

.conversation-open-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  color: var(--vep-blue);
}

.conversation-open-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.conversation-empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
}

.conversation-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  color: var(--vep-green-dark);
  background: #edf7e5;
  border-radius: 50%;
}

.conversation-empty-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.conversation-limit-note {
  padding: .85rem 1.25rem;
  color: var(--vep-muted);
  background: #f8fafb;
  border-top: 1px solid var(--vep-border);
  font-size: .72rem;
  text-align: center;
}

.portal-navbar .portal-admin-link.active {
  color: var(--vep-blue-dark);
  text-decoration: underline;
  text-underline-offset: .3rem;
}

@media (max-width: 767.98px) {
  .conversation-heading,
  .conversation-queue-header {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-heading .btn {
    width: 100%;
  }

  .conversation-visibility-note {
    align-items: flex-start;
  }

  .conversation-filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .conversation-filter {
    min-width: 0;
    padding-inline: .4rem;
  }

  .conversation-queue-item {
    padding: 1.05rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .8rem 1rem;
  }

  .conversation-customer {
    grid-column: 1;
  }

  .conversation-message-time {
    grid-column: 2;
  }

  .conversation-latest-message {
    grid-column: 1 / -1;
  }

  .conversation-open-icon {
    display: none;
  }
}

@media (max-width: 420px) {
  .conversation-filter {
    gap: .3rem;
    font-size: .68rem;
  }

  .conversation-filter strong {
    min-width: 1.3rem;
    height: 1.3rem;
    font-size: .62rem;
  }

  .conversation-visibility-note {
    padding: .9rem;
  }

  .conversation-visibility-icon {
    display: none;
  }
}

/* Branded ASP.NET Identity account settings */
.account-settings-shell {
  max-width: 1080px;
  margin: 0 auto;
}

.account-back-link {
  margin-bottom: 1rem;
}

.account-settings-hero {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 1.5rem 1.75rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(120deg, #fff 0%, #f6fafc 68%, #eff7e8 100%);
  border: 1px solid var(--vep-border);
  border-radius: 1rem;
  box-shadow: 0 16px 38px rgba(20, 58, 82, .08);
}

.account-settings-hero::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--vep-blue) 0 68%, var(--vep-green) 68% 100%);
}

.account-settings-hero-icon {
  width: 3.75rem;
  height: 3.75rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: 1rem;
  box-shadow: 0 10px 22px rgba(33, 111, 171, .2);
}

.account-settings-hero-icon svg,
.account-secure-badge svg,
.account-nav-icon svg,
.account-field-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-settings-hero-icon svg {
  width: 1.85rem;
  height: 1.85rem;
}

.account-settings-hero h1 {
  margin: 0 0 .3rem;
  color: var(--vep-ink);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 780;
  letter-spacing: -.03em;
}

.account-settings-hero p:last-child {
  margin: 0;
  color: var(--vep-muted);
}

.account-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .7rem;
  
  
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.account-secure-badge svg {
  width: 1rem;
  height: 1rem;
}

.account-settings-grid {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}

.account-settings-nav-card {
  position: sticky;
  top: 1.5rem;
  padding: 1rem;
}

.account-settings-nav-heading {
  padding: .35rem .45rem 1rem;
  border-bottom: 1px solid var(--vep-border);
}

.account-settings-nav-heading strong,
.account-settings-nav-heading span {
  display: block;
}

.account-settings-nav-heading strong {
  margin-bottom: .2rem;
  font-size: .95rem;
}

.account-settings-nav-heading span {
  color: var(--vep-muted);
  font-size: .78rem;
  line-height: 1.45;
}

.account-settings-nav {
  margin-top: .8rem;
  display: grid;
  gap: .35rem;
}

.account-settings-nav-link {
  padding: .72rem;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  color: var(--vep-ink);
  border: 1px solid transparent;
  border-radius: .75rem;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.account-settings-nav-link:hover {
  color: var(--vep-blue-dark);
  background: #f4f9fc;
  border-color: #d8e8f1;
}

.account-settings-nav-link.active {
  color: var(--vep-blue-dark);
  background: #eaf4fa;
  border-color: #c9dfeb;
  box-shadow: inset 3px 0 0 var(--vep-blue);
}

.account-settings-nav-link > span:last-child,
.account-settings-nav-link strong,
.account-settings-nav-link small {
  display: block;
}

.account-settings-nav-link strong {
  font-size: .84rem;
  font-weight: 800;
}

.account-settings-nav-link small {
  margin-top: .05rem;
  color: var(--vep-muted);
  font-size: .68rem;
}

.account-nav-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  color: var(--vep-blue);
  background: #f2f7fa;
  border-radius: .65rem;
}

.account-settings-nav-link.active .account-nav-icon {
  color: #fff;
  background: var(--vep-blue);
}

.account-nav-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.account-settings-content {
  min-width: 0;
  min-height: 31rem;
  padding: 2rem;
  border-top: 4px solid var(--vep-blue);
}

.account-settings-panel,
.account-settings-content > .row,
.account-settings-content > form {
  max-width: 42rem;
}

.account-settings-content > h3,
.account-panel-heading h2 {
  margin: 0 0 .35rem;
  color: var(--vep-ink);
  font-size: 1.65rem;
  font-weight: 780;
  letter-spacing: -.02em;
}

.account-panel-heading {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--vep-border);
}

.account-panel-heading p:last-child {
  margin: 0;
  color: var(--vep-muted);
  font-size: .92rem;
  line-height: 1.55;
}

/* Keep unscaffolded Identity pages polished inside the same shell. */
.account-settings-content > h3 + .row,
.account-settings-content > h3 + p,
.account-settings-content > h3 + div {
  margin-top: 1.25rem;
}

.account-settings-content > .row {
  margin-right: 0;
  margin-left: 0;
}

.account-settings-content > .row > [class*="col-"] {
  width: 100%;
  max-width: 38rem;
  padding-right: 0;
  padding-left: 0;
}

.account-settings-content .form-floating,
.account-settings-content .form-group {
  margin-bottom: 1rem;
}

.account-settings-content .form-control {
  min-height: 3.55rem;
  border-color: #cad9e2;
  border-radius: .7rem;
}

.account-settings-content button:not(.btn-close),
.account-settings-content .btn {
  min-height: 2.85rem;
  padding-right: 1rem;
  padding-left: 1rem;
  border-radius: .65rem;
  font-weight: 700;
}

.account-settings-form {
  max-width: 36rem;
}

.account-readonly-field {
  position: relative;
}

.account-readonly-field .form-control {
  color: var(--vep-ink);
  background: #f2f6f8;
  opacity: 1;
}


.account-field-help {
  margin: .5rem 0 0;
  color: var(--vep-muted);
  font-size: .76rem;
  line-height: 1.45;
}

.account-email-state {
  margin-top: .55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
}

.account-verified-badge,
.account-unverified-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
}

.account-verified-badge {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.account-verified-badge::before {
  content: "✓";
}

.account-unverified-badge {
  color: #8a5b11;
  background: #fff3dd;
}

.account-inline-action {
  min-height: 0 !important;
  padding: 0 !important;
  font-size: .75rem;
  font-weight: 750;
  text-decoration: none;
}

.account-primary-action {
  min-width: 10rem;
  box-shadow: 0 10px 22px rgba(33, 111, 171, .16);
}

.account-password-note {
  margin-bottom: 1.25rem;
}

.account-status-message {
  margin-bottom: 1.5rem;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  border-radius: .75rem;
  font-size: .86rem;
}

.account-status-message > span {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
}

.account-status-success {
  color: #416f1b;
  background: #edf7e5;
  border: 1px solid #d5e9c4;
}

.account-status-success > span {
  background: var(--vep-green);
}

.account-status-error {
  color: #8f303a;
  background: #fff0f1;
  border: 1px solid #f0c9cd;
}

.account-status-error > span {
  background: #b4424c;
}

.account-support-note {
  margin-top: 1.25rem;
  padding: .9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  color: var(--vep-muted);
  background: #f4f8fa;
  border-left: 3px solid var(--vep-green);
  border-radius: .6rem;
  font-size: .78rem;
  line-height: 1.5;
}

.account-support-note strong {
  color: var(--vep-ink);
  white-space: nowrap;
}

.account-security-state {
  margin-bottom: 1.25rem;
  padding: 1.1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .9rem;
  background: #f4f8fa;
  border: 1px solid var(--vep-border);
  border-radius: .85rem;
}

.account-security-state-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: var(--vep-blue);
  background: #e9f3f9;
  border-radius: .75rem;
  font-weight: 850;
}

.account-security-state-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-security-state strong {
  display: block;
  margin-bottom: .25rem;
}

.account-security-state p {
  color: var(--vep-muted);
  font-size: .82rem;
  line-height: 1.5;
}

.account-security-enabled {
  color: #416f1b;
  background: #f3f9ed;
  border-color: #d5e9c4;
}

.account-security-enabled .account-security-state-icon {
  color: #fff;
  background: var(--vep-green);
}

.account-security-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.account-recovery-warning {
  flex-basis: 100%;
  padding: .75rem .9rem;
  color: #8a5b11;
  background: #fff3dd;
  border-radius: .65rem;
  font-size: .78rem;
}

.account-forget-browser-form {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--vep-border);
}

.account-forget-browser-form p {
  margin: 0 0 .35rem;
  color: var(--vep-muted);
  font-size: .8rem;
}

.portal-status-card {
  background: linear-gradient(135deg, #ffffff 50%, #edf6e7 100%);
  border-left: 5px solid var(--vep-green);
}

.portal-status-badge {
  
  
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.portal-progress-value {
  display: block;
  color: var(--vep-green-dark);
  font-size: 3rem;
}

/* Customer dashboard and Salesforce-backed project timeline */
.customer-project-grid {
  display: grid;
  gap: 1.25rem;
}

.customer-project-card {
  border-top: 4px solid var(--vep-blue);
}

.customer-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.customer-project-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

.customer-message-button {
  position: relative;
}

.customer-message-count {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--vep-blue);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
}

.customer-message-button:hover .customer-message-count {
  color: var(--vep-blue);
  background: #fff;
}

.customer-project-size {
  min-width: 8rem;
  padding: .85rem 1rem;
  color: var(--vep-muted);
  background: #f7fafc;
  border: 1px solid var(--vep-border);
  border-radius: .75rem;
  text-align: center;
}

.customer-project-size span,
.customer-project-size strong {
  display: block;
}

.customer-project-size span {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.customer-project-size strong {
  margin-top: .15rem;
  color: var(--vep-green-dark);
  font-size: 1.2rem;
}

.project-detail-heading {
  margin-bottom: 2rem;
}

.project-detail-heading h1 {
  color: var(--vep-ink);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 750;
  letter-spacing: -.035em;
}

.staff-project-heading .portal-eyebrow {
  color: var(--vep-blue-dark);
}

.project-detail-project-name {
  margin-top: .55rem;
  color: var(--vep-muted);
  font-size: .82rem;
}

.project-detail-project-name span {
  margin-right: .3rem;
  color: var(--vep-blue-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.staff-customer-summary {
  margin-top: .65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  color: var(--vep-muted);
  font-size: .875rem;
}

.staff-customer-summary strong {
  color: var(--vep-ink);
}

.staff-view-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .45rem;
  padding: .55rem .8rem;
  color: #fff;
  background: var(--vep-blue-dark);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.staff-view-badge::before {
  width: .5rem;
  height: .5rem;
  content: "";
  background: #9bd44e;
  border-radius: 50%;
  box-shadow: 0 0 0 .18rem rgba(155, 212, 78, .2);
}

.staff-view-banner {
  margin: -1rem 0 1.5rem;
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.1rem;
  color: var(--vep-ink);
  background: linear-gradient(120deg, #eef7fc 0%, #f8fbfd 62%, #f4f9ee 100%);
  border: 1px solid #c8dfea;
  border-left: 5px solid var(--vep-blue);
  border-radius: .9rem;
  box-shadow: 0 10px 28px rgba(20, 58, 82, .08);
}

.staff-view-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue-dark), var(--vep-blue));
  border-radius: .85rem;
  box-shadow: 0 8px 18px rgba(33, 111, 171, .18);
}

.staff-view-icon svg {
  width: 1.7rem;
  height: 1.7rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.staff-view-label,
.staff-only-label {
  display: block;
  color: var(--vep-blue-dark);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.staff-view-banner h2 {
  margin: .12rem 0 .2rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.staff-view-banner p {
  margin: 0;
  color: var(--vep-muted);
  font-size: .875rem;
}

.staff-view-state {
  min-width: 11rem;
  padding-left: 1.25rem;
  display: grid;
  justify-items: end;
  border-left: 1px solid #c8dfea;
  font-size: .75rem;
}

.staff-view-state > span,
.staff-view-state small {
  color: var(--vep-muted);
}

.staff-view-state strong {
  margin: .15rem 0;
  font-size: .9rem;
}

.staff-access-enabled {
  color: #416f1b;
}

.staff-access-disabled {
  color: #a23c45;
}

.project-back-link {
  display: inline-block;
  margin-bottom: 1.35rem;
  font-size: .875rem;
  font-weight: 750;
  text-decoration: none;
}

.project-back-link:hover {
  text-decoration: underline;
}

.project-progress-track {
  height: .65rem;
  overflow: hidden;
  background: #e4edf2;
  border-radius: 999px;
}

.project-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--vep-blue), var(--vep-green));
  border-radius: inherit;
  transition: width .25s ease;
}

.project-timeline-card .card-header {
  padding: 1.5rem;
}

.project-timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 2rem;
}

.project-timeline-step:last-child {
  padding-bottom: 0;
}

.project-timeline-step::before {
  position: absolute;
  top: 2.55rem;
  bottom: .15rem;
  left: 1.31rem;
  width: 2px;
  content: "";
  background: var(--vep-border);
}

.project-timeline-step:last-child::before {
  display: none;
}

.project-timeline-marker {
  position: relative;
  z-index: 1;
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  color: var(--vep-muted);
  background: #fff;
  border: 2px solid var(--vep-border);
  border-radius: 50%;
  font-size: .9rem;
  font-weight: 800;
}

.timeline-completed::before {
  background: #b8d59b;
}

.timeline-completed .project-timeline-marker {
  color: #fff;
  background: var(--vep-green);
  border-color: var(--vep-green);
}

.timeline-current .project-timeline-marker {
  color: #fff;
  background: var(--vep-blue);
  border-color: var(--vep-blue);
  box-shadow: 0 0 0 .3rem rgba(33, 111, 171, .13);
}

.timeline-on-hold .project-timeline-marker {
  color: #fff;
  background: #9a6717;
  border-color: #9a6717;
  box-shadow: 0 0 0 .3rem rgba(154, 103, 23, .13);
}

.project-timeline-content {
  min-width: 0;
  padding-top: .15rem;
}

.timeline-state-badge {
  width: fit-content;
  padding: .3rem .55rem;
  color: var(--vep-muted);
  background: #edf1f3;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid #d3dde3;
}

.timeline-badge-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
}

.timeline-duration-badge {
  width: fit-content;
  padding: .3rem .55rem;
  color: var(--vep-blue-dark);
  background: #f1f7fb;
  border: 1px solid #d6e7f2;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}

.timeline-hold-duration-badge {
  color: #7c500f;
  background: #fff8e9;
  border-color: #f1ddb7;
}

@media (max-width: 575.98px) {
  .timeline-badge-group {
    justify-content: flex-start;
  }
}

.timeline-completed .timeline-state-badge {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.timeline-current .timeline-state-badge {
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border-color: #b8d5e9;
}

.timeline-on-hold .timeline-state-badge {
  color: #7c500f;
  background: #fff3dd;
  border-color: #e7c76b;
}

.project-milestone-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: 1rem;
}

.project-milestone-details > div {
  padding: .7rem .8rem;
  background: #f7fafc;
  border: 1px solid var(--vep-border);
  border-radius: .65rem;
}

.project-milestone-details dt,
.project-overview-list dt {
  color: var(--vep-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.project-milestone-details dd,
.project-overview-list dd {
  margin: .2rem 0 0;
  color: var(--vep-ink);
  font-size: .84rem;
  font-weight: 700;
}

.project-equipment-capacity {
  display: block;
  margin-top: .15rem;
  color: var(--vep-muted);
  font-size: .76rem;
  font-weight: 700;
}

.salesforce-opportunity-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--vep-blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.salesforce-opportunity-link:hover {
  color: var(--vep-blue);
  text-decoration: underline;
}

.project-sidebar {
  position: sticky;
  top: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.staff-internal-card {
  border-top: 4px solid var(--vep-blue-dark);
}

.staff-internal-card .card-header {
  background: #f4f9fc !important;
}

.scheduled-emails-more { border-top: 1px solid var(--vep-border); }
.scheduled-emails-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  padding: .75rem 1rem;
  list-style: none;
  cursor: pointer;
  background: #f4f9fc;
  color: var(--vep-blue);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
}
.scheduled-emails-toggle::-webkit-details-marker { display: none; }
.scheduled-emails-toggle:hover { background: #eaf3f9; color: var(--vep-blue-dark); }
.scheduled-emails-toggle:focus-visible { outline: 2px solid var(--vep-blue); outline-offset: -3px; }
.scheduled-emails-toggle > svg { flex: 0 0 1rem; }
.scheduled-emails-show-less { display: none; }
.scheduled-emails-more[open] > summary { border-bottom: 1px solid var(--vep-border); }
.scheduled-emails-more[open] .scheduled-emails-show-more { display: none; }
.scheduled-emails-more[open] .scheduled-emails-show-less { display: inline; }
.scheduled-emails-more[open] > summary > svg { transform: rotate(180deg); }

.staff-only-label {
  margin-bottom: .35rem;
}

.staff-access-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .55rem;
  background: #eef4f7;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}

.staff-access-badge.staff-access-enabled {
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.staff-access-badge.staff-access-disabled {
  background: #fff0f1;
}

.project-contract-card {
  border-top: 4px solid var(--vep-blue);
}

.project-contract-card .card-body {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 1.25rem 2rem;
}

.project-contract-heading {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.project-contract-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: .75rem;
}

.project-contract-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-contract-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}

.project-contract-summary-item {
  padding: .85rem .95rem;
  background: #f5f9fc;
  border: 1px solid var(--vep-border);
  border-radius: .75rem;
}

.project-contract-summary-item dt {
  margin-bottom: .25rem;
  color: var(--vep-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.project-contract-summary-item dd {
  margin: 0;
  color: var(--vep-ink);
  font-size: .92rem;
  font-weight: 800;
}

.project-contract-summary-item .project-contract-amount {
  color: var(--vep-blue-dark);
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.project-invoice-schedule {
  grid-column: 1 / -1;
  padding-top: 1.15rem;
  border-top: 1px solid var(--vep-border);
}

.project-invoice-schedule > h3 {
  margin: 0 0 .8rem;
  color: var(--vep-ink);
  font-size: .8rem;
  font-weight: 800;
}

.project-invoice-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .7rem;
}

.project-invoice {
  min-width: 0;
  padding: .85rem .9rem;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--vep-border);
  border-left: 4px solid #a9b6bf;
  border-radius: .7rem;
}

.project-invoice-paid {
  border-left-color: var(--vep-green);
}

.project-invoice-due {
  border-left-color: #d89022;
}

.project-invoice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.project-invoice-heading strong {
  color: var(--vep-ink);
  font-size: .84rem;
}

.project-invoice-status {
  padding: .22rem .48rem;
  color: #53626c;
  background: #edf2f5;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
  white-space: nowrap;
}

.project-invoice-paid .project-invoice-status {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.project-invoice-due .project-invoice-status {
  color: #85530b;
  background: #fff2dc;
  border: 1px solid #e7c76b;
}

.project-invoice-amount {
  margin-top: .45rem;
  display: block;
  color: var(--vep-ink);
  font-size: 1rem;
  font-weight: 800;
}

.project-invoice-dates {
  margin-top: .35rem;
  display: grid;
  gap: .15rem;
  color: var(--vep-muted);
  font-size: .7rem;
  line-height: 1.4;
}

.project-invoice-dates time {
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .project-invoice-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 767.98px) {
  .project-contract-card .card-body {
    display: block;
  }

  .project-contract-summary {
    margin-top: 1.25rem;
  }

  .project-invoice-schedule {
    margin-top: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .project-contract-summary,
  .project-invoice-list {
    grid-template-columns: 1fr;
  }
}

.message-empty-icon {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
}

.message-empty-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message-send-button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.project-documents-card {
  border-top: 4px solid var(--vep-green);
}

.project-documents-card .card-body {
  padding: 1.5rem;
}

.project-documents-card p:not(.portal-eyebrow) {
  color: var(--vep-muted);
  font-size: .9rem;
}

.project-documents-heading {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
}

.project-documents-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: .75rem;
  font-size: 1.25rem;
  line-height: 1;
}

.project-documents-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-documents-button {
  width: 100%;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-weight: 700;
}

.project-documents-note {
  display: block;
  margin-top: .75rem;
  color: var(--vep-muted);
  font-size: .74rem;
  text-align: center;
}

.project-documents-missing-card {
  border-top-color: #aab8c1;
  background: #fbfcfd;
}

.project-team-card {
  border-top: 4px solid var(--vep-blue);
}

.project-team-card .card-body {
  padding: 1.5rem;
}

.project-team-heading {
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
}

.project-team-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: .75rem;
}

.project-team-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.project-team-list li {
  padding: .85rem 0;
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  border-top: 1px solid var(--vep-border);
}

.project-team-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.project-team-list li:last-child {
  padding-bottom: 0;
}

.project-team-initials {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border: 1px solid #d3e4ef;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 850;
}

.project-team-list li div > strong,
.project-team-list li div > span,
.project-team-list li div > button {
  display: block;
}

.project-team-list strong {
  color: var(--vep-ink);
  font-size: .86rem;
}

.project-team-list li div > span {
  margin-top: .05rem;
  color: var(--vep-muted);
  font-size: .76rem;
}

.project-team-message-button {
  width: fit-content;
  margin-top: .2rem;
  padding: 0;
  color: var(--vep-blue-dark);
  background: transparent;
  border: 0;
  font-size: .75rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
}

.project-team-message-button:hover,
.project-team-message-button:focus-visible {
  color: var(--vep-blue);
  text-decoration: underline;
}

/* Shared customer/team project conversation */
.message-workspace {
  width: 100%;
  max-width: none;
  margin: 1.5rem auto 0;
  scroll-margin-top: 1.5rem;
}

.message-conversation-card {
  border-top: 4px solid var(--vep-blue);
  /* Clip rounded corners without making the entire conversation a scroll container. */
  overflow: clip;
}

.message-conversation-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.staff-conversation-card {
  border-top-width: 5px;
  box-shadow: 0 18px 42px rgba(20, 58, 82, .1);
}

.message-conversation-header.staff-conversation-header {
  background: linear-gradient(110deg, #eef7fc, #f9fbfc) !important;
  border-bottom-color: #c8dfea;
}

.staff-conversation-header .portal-eyebrow {
  color: var(--vep-blue-dark);
}

.message-header-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

.message-staff-view-badge {
  border: 1px solid #3c749c;
  display: inline-flex;
  align-items: center;
  padding: .38rem .65rem;
  color: #fff;
  background: var(--vep-blue-dark);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.message-security-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .38rem .65rem;
  
  
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.message-security-badge::before {
  width: .45rem;
  height: .45rem;
  content: "";
  background: var(--vep-green);
  border-radius: 50%;
}

.message-list {
  min-height: 330px;
  max-height: 620px;
  padding: 1.5rem;
  overflow-y: auto;
  background: #f7fafc;
  border-bottom: 1px solid var(--vep-border);
  scrollbar-color: #b4c6d1 transparent;
}

.message-history-note {
  width: fit-content;
  margin: 0 auto 1.25rem;
  padding: .4rem .7rem;
  color: var(--vep-muted);
  background: #fff;
  border: 1px solid var(--vep-border);
  border-radius: 999px;
  font-size: .75rem;
}

.message-empty-state {
  min-height: 280px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 2rem 1rem;
  text-align: center;
}

.message-empty-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
}

.message-empty-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.message-row {
  display: flex;
  margin-bottom: 1rem;
}

.message-row:last-child {
  margin-bottom: 0;
}

.message-own {
  justify-content: flex-end;
}

.message-other {
  justify-content: flex-start;
}

.message-bubble {
  max-width: min(78%, 660px);
  padding: .9rem 1rem .75rem;
  background: #fff;
  border: 1px solid var(--vep-border);
  border-radius: 1rem 1rem 1rem .25rem;
  box-shadow: 0 5px 14px rgba(20, 58, 82, .05);
}

.message-own .message-bubble {
  color: #fff;
  background: var(--vep-blue);
  border-color: var(--vep-blue);
  border-radius: 1rem 1rem .25rem 1rem;
}

.message-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .35rem;
  font-size: .82rem;
}

.message-team-badge {
  padding: .2rem .4rem;
  
  
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.message-own .message-team-badge {
  color: #fff;
  background: rgba(255, 255, 255, .2);
}

.message-mentions {
  margin: .1rem 0 .55rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.message-mentions span {
  padding: .22rem .5rem;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
}

.message-own .message-mentions span {
  color: #fff;
  background: rgba(255, 255, 255, .2);
}

.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: .92rem;
  line-height: 1.55;
}

.message-body .message-link {
  color: var(--vep-blue);
  text-decoration: underline;
  text-underline-offset: .15em;
  overflow-wrap: anywhere;
}

.message-body .message-link:hover {
  color: var(--vep-blue-dark);
  text-decoration-thickness: 2px;
}

.message-own .message-body .message-link {
  color: #fff;
}

.message-body .message-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}

.message-attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .75rem;
}

.message-body + .message-attachments {
  padding-top: .75rem;
  border-top: 1px solid var(--vep-border);
}

.message-own .message-body + .message-attachments {
  border-top-color: rgba(255, 255, 255, .24);
}

.message-image-attachment {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--vep-ink);
  background: #fff;
  border: 1px solid rgba(19, 64, 94, .15);
  border-radius: .75rem;
  text-decoration: none;
}

.message-image-attachment:hover {
  color: var(--vep-ink);
  border-color: var(--vep-blue);
  box-shadow: 0 7px 18px rgba(20, 58, 82, .13);
}

.message-image-attachment:focus-visible,
.message-file-attachment:focus-visible,
.message-attach-button:focus-visible,
.message-selected-file-remove:focus-visible {
  outline: 3px solid rgba(35, 126, 181, .24);
  outline-offset: 2px;
}

.message-image-attachment img {
  display: block;
  width: 100%;
  height: 10rem;
  object-fit: cover;
  background: #eaf1f5;
}

.message-image-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem;
}

.message-image-caption span {
  min-width: 0;
  overflow: hidden;
  font-size: .73rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-image-caption small {
  flex: 0 0 auto;
  color: var(--vep-muted);
  font-size: .64rem;
}

.message-file-attachment {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: .65rem .7rem;
  color: var(--vep-ink);
  background: #fff;
  border: 1px solid rgba(19, 64, 94, .15);
  border-radius: .75rem;
  text-decoration: none;
}

.message-file-attachment:hover {
  color: var(--vep-blue-dark);
  border-color: var(--vep-blue);
  box-shadow: 0 7px 18px rgba(20, 58, 82, .13);
}

.message-file-icon {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  color: var(--vep-blue);
  background: #eaf4fa;
  border-radius: .6rem;
}

.message-file-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.message-file-details {
  min-width: 0;
  display: grid;
  gap: .1rem;
}

.message-file-details strong {
  overflow: hidden;
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file-details small {
  color: var(--vep-muted);
  font-size: .65rem;
}

.message-download-icon {
  color: var(--vep-blue);
  font-size: 1.15rem;
  font-weight: 800;
}

.message-bubble time {
  display: block;
  margin-top: .55rem;
  color: var(--vep-muted);
  font-size: .68rem;
}

.message-own .message-bubble time {
  color: rgba(255, 255, 255, .78);
}

.message-composer {
  padding: 1.5rem;
  background: #fff;
}

.message-account-notice {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e4c479;
  border-left: 4px solid #c38a16;
  border-radius: .65rem;
  background: #fff8e6;
  color: #654b13;
}

.message-account-notice-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  color: #a76e06;
}

.message-account-notice h3 {
  margin: 0 0 .35rem;
  font-size: .95rem;
  line-height: 1.4;
  font-weight: 700;
}

.message-account-notice p {
  margin: 0;
  font-size: .875rem;
  line-height: 1.55;
}

.message-account-notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  margin-top: .75rem;
  font-size: .8rem;
}

[data-message-composer-controls]:disabled .message-attach-button {
  opacity: .5;
  cursor: not-allowed;
}

[data-message-reply-state]:not([data-message-reply-state="ready"]) .message-typing-indicator:empty {
  display: none;
}

.message-mention-composer {
  margin-bottom: .7rem;
  padding: .65rem .75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  background: #f3f8fb;
  border: 1px solid #d5e4ed;
  border-radius: .65rem;
}

.message-mention-label {
  color: var(--vep-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.message-mention-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.message-mention-chip {
  padding: .32rem .42rem .32rem .58rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--vep-blue-dark);
  background: #e5f1f8;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
}

.message-mention-chip button {
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--vep-blue-dark);
  background: rgba(255, 255, 255, .75);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
}

.message-mention-chip button:hover,
.message-mention-chip button:focus-visible {
  color: #fff;
  background: var(--vep-blue-dark);
}

.message-textarea-shell {
  position: relative;
}

.message-textarea {
  min-height: 8rem;
  resize: vertical;
}

.message-mention-suggestions {
  position: absolute;
  z-index: 25;
  right: 0;
  bottom: calc(100% + .45rem);
  left: 0;
  max-height: 18rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #bfd3df;
  border-radius: .8rem;
  box-shadow: 0 16px 36px rgba(20, 58, 82, .16);
}

.message-mention-suggestions[hidden] {
  display: none;
}

.message-mention-suggestions-heading {
  padding: .65rem .85rem;
  color: var(--vep-muted);
  background: #f5f9fb;
  border-bottom: 1px solid var(--vep-border);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.message-mention-suggestions button {
  width: 100%;
  padding: .7rem .85rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--vep-ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf2f5;
  text-align: left;
}

.message-mention-suggestions button:last-child {
  border-bottom: 0;
}

.message-mention-suggestions button:hover,
.message-mention-suggestions button:focus-visible,
.message-mention-suggestions button[aria-selected="true"] {
  background: #edf6fb;
  outline: 0;
}

.message-mention-option-avatar {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 850;
}

.message-mention-suggestions button > span:last-child {
  min-width: 0;
  display: grid;
}

.message-mention-suggestions strong {
  color: var(--vep-blue-dark);
  font-size: .82rem;
}

.message-mention-suggestions small {
  overflow: hidden;
  color: var(--vep-muted);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-composer-footer {
  min-height: 1.35rem;
  margin-top: .45rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.message-attachment-composer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: .8rem;
}

.message-attach-button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: .58rem .8rem;
  color: var(--vep-blue-dark);
  background: #eef7fc;
  border: 1px solid #bdd9e9;
  border-radius: .65rem;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.message-attach-button:hover {
  color: #fff;
  background: var(--vep-blue);
  border-color: var(--vep-blue);
}

.message-attach-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.message-attachment-help {
  color: var(--vep-muted);
  font-size: .72rem;
}

.message-selected-files {
  margin-top: .8rem;
  padding: .8rem;
  background: #f7fafc;
  border: 1px solid var(--vep-border);
  border-radius: .8rem;
}

.message-selected-files-heading {
  margin-bottom: .55rem;
  color: var(--vep-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.message-selected-files-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.message-selected-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .5rem;
  background: #fff;
  border: 1px solid var(--vep-border);
  border-radius: .65rem;
}

.message-selected-file-preview {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--vep-blue-dark);
  background: #eaf4fa;
  border-radius: .5rem;
  font-size: .57rem;
  font-weight: 900;
}

.message-selected-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-selected-file-details {
  min-width: 0;
  display: grid;
  gap: .05rem;
}

.message-selected-file-details strong {
  overflow: hidden;
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-selected-file-details small {
  color: var(--vep-muted);
  font-size: .63rem;
}

.message-selected-file-remove {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  padding: 0;
  color: #8b3540;
  background: #fff3f4;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.message-selected-file-remove:hover {
  color: #fff;
  background: #a9424d;
}

.message-attachment-client-error {
  margin: .65rem 0 0;
  color: #a12632;
  font-size: .75rem;
  font-weight: 700;
}

.message-character-count,
.message-privacy-note {
  color: var(--vep-muted);
  font-size: .75rem;
}

.message-character-count {
  margin-left: auto;
  white-space: nowrap;
}

.message-send-button {
  min-width: 9.5rem;
}

.project-overview-list > div {
  padding: .85rem 0;
  border-bottom: 1px solid var(--vep-border);
}

.project-overview-list > div:first-child {
  padding-top: 0;
}

.project-overview-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.portal-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .75rem;
}

.portal-timeline li {
  position: relative;
  min-width: 0;
  color: var(--vep-muted);
  font-size: .8125rem;
  font-weight: 700;
}

.portal-timeline li::before {
  content: "";
  position: absolute;
  top: .48rem;
  left: 1.25rem;
  right: -.75rem;
  height: 2px;
  background: var(--vep-border);
}

.portal-timeline li:last-child::before {
  display: none;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  margin-bottom: .8rem;
  display: block;
  background: #fff;
  border: 3px solid #afbdc6;
  border-radius: 50%;
}

.portal-footer {
  margin-top: auto;
  padding: 1.25rem 0;
  color: var(--vep-muted);
  background: #fff;
  border-top: 1px solid var(--vep-border);
  font-size: .875rem;
}

.portal-footer a {
  color: var(--vep-muted);
}

/* Team user administration */
.portal-alert {
  margin-bottom: 1.5rem;
  border-radius: .85rem;
}

.team-users-grid {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: 1.5rem;
}

.team-form-card,
.team-list-card {
  overflow: visible;
}

.team-form-card {
  position: sticky;
  top: 1.5rem;
}

.portal-form-label {
  margin-bottom: .45rem;
  color: var(--vep-ink);
  font-size: .875rem;
  font-weight: 700;
}

.portal-form-control {
  min-height: 3rem;
  color: var(--vep-ink);
  background-color: #fbfdfe;
  border-color: #cbd8df;
  border-radius: .7rem;
}

.portal-form-control:hover {
  border-color: #a8bac5;
}

.team-password-note {
  padding: .85rem 1rem;
  color: var(--vep-muted);
  background: #f4f8fa;
  border-left: 3px solid var(--vep-green);
  border-radius: .55rem;
  font-size: .8125rem;
  line-height: 1.55;
}

.team-create-visibility {
  padding: .8rem .9rem .8rem 3.1rem;
  background: #f3f8fb;
  border: 1px solid #d8e5ec;
  border-radius: .7rem;
}

.team-create-visibility .form-check-label {
  color: var(--vep-ink);
  font-size: .82rem;
  font-weight: 750;
}

.team-create-visibility small {
  display: block;
  margin-top: .15rem;
  color: var(--vep-muted);
  font-size: .72rem;
}

.team-count-badge {
  min-width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 700;
}

.team-user-list {
  background: #fff;
  border-radius: 0 0 1rem 1rem;
}

.team-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--vep-border);
}

.team-user-row:last-child {
  border-bottom: 0;
}

.team-user-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .9rem;
}

.team-user-avatar {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: .8rem;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.team-user-name {
  color: var(--vep-ink);
  font-weight: 750;
}

.team-user-email {
  overflow: hidden;
  color: var(--vep-muted);
  font-size: .8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-user-handle {
  margin-top: .08rem;
  color: var(--vep-blue-dark);
  font-size: .72rem;
  font-weight: 750;
}

.team-you-badge {
  margin-left: .35rem;
  padding: .18rem .42rem;
  color: var(--vep-blue-dark);
  background: #eaf3f9;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: .1rem;
}

.team-user-status {
  justify-self: end;
}

.team-customer-profile-form {
  grid-column: 1 / -1;
  padding: .85rem;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(200px, .8fr) auto;
  align-items: end;
  gap: .75rem 1rem;
  background: #f7fafb;
  border: 1px solid #dbe6ec;
  border-radius: .75rem;
}

.team-customer-profile-visibility .form-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 1.5rem;
  padding-left: 0;
}

.team-customer-profile-visibility .form-check-input {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 1.2rem;
  margin: 0;
  cursor: pointer;
}

.team-customer-profile-visibility .form-check-label,
.team-customer-profile-title label {
  color: var(--vep-ink);
  font-size: .78rem;
  font-weight: 750;
}

.team-customer-profile-visibility > span {
  display: block;
  margin-top: .2rem;
  margin-left: 2.8rem;
  color: var(--vep-muted);
  font-size: .68rem;
}

.team-customer-profile-title label {
  display: block;
  margin-bottom: .25rem;
}

.team-customer-profile-title input {
  min-height: 2.1rem;
  background: #fff;
  border-color: #cbd8df;
}

.portal-user-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}

.portal-user-badge::before {
  width: .42rem;
  height: .42rem;
  content: "";
  border-radius: 50%;
}

.portal-user-active {
  
  

  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

.portal-user-active::before {
  background: var(--vep-green);
}

.portal-user-disabled {
  color: #7d3138;
  background: #fff0f1;
}

.portal-user-disabled::before {
  background: #b84a54;
}

.portal-user-locked {
  color: #805c17;
  background: #fff7df;
}

.portal-user-locked::before {
  background: #c58b1d;
}

.portal-user-pending {
  color: #165687;
  background: #eaf3f9;
}

.portal-user-pending::before {
  background: var(--vep-blue);
}

.team-user-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  padding-top: .85rem;
  border-top: 1px dashed var(--vep-border);
}

.team-notification-form {
  min-width: 190px;
  margin-right: auto;
}

.team-notification-form .form-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 1.5rem;
  padding-left: 0;
}

.team-notification-form .form-check-input {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 1.2rem;
  margin: 0;
  cursor: pointer;
}

.team-notification-form .form-check-label {
  color: var(--vep-ink);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 750;
}

.team-notification-note {
  display: block;
  margin-top: .2rem;
  margin-left: 2.8rem;
  color: var(--vep-muted);
  font-size: .7rem;
}

.team-role-form {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.team-role-form .form-select {
  width: 155px;
}

.team-protected-note {
  color: var(--vep-muted);
  font-size: .75rem;
  font-weight: 650;
}

/* Required first-login password setup */
.password-setup-shell {
  max-width: 620px;
  margin: 0 auto;
  padding: 1.25rem 0;
}

.password-setup-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(22, 86, 135, .12);
  border-radius: 1.35rem;
  box-shadow: 0 22px 55px rgba(20, 58, 82, .11);
}

.password-setup-card .card-body {
  padding: clamp(2rem, 6vw, 3.75rem);
}

.password-setup-accent {
  height: .35rem;
  background: linear-gradient(90deg, var(--vep-blue) 0 68%, var(--vep-green) 68% 100%);
}

.password-setup-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.5rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(33, 111, 171, .18);
  font-size: 1.25rem;
  font-weight: 800;
}

.password-setup-card h1 {
  margin-bottom: .7rem;
  color: var(--vep-ink);
  font-size: clamp(2rem, 5vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -.04em;
}

.password-setup-intro {
  margin-bottom: 2rem;
  color: var(--vep-muted);
  line-height: 1.65;
}

.password-setup-submit {
  width: 100%;
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  border-radius: .7rem;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(33, 111, 171, .18);
}

/* One-time customer invitation acceptance */
.invitation-accept-shell {
  max-width: 680px;
}

.invitation-email-summary {
  margin-bottom: 1.5rem;
  padding: .9rem 1rem;
  display: grid;
  gap: .15rem;
  background: #f4f8fa;
  border: 1px solid var(--vep-border);
  border-radius: .75rem;
}

.invitation-email-summary span {
  margin: 0;
}

.invitation-email-summary strong {
  overflow-wrap: anywhere;
  color: var(--vep-ink);
  font-size: .9rem;
}

.invitation-invalid-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.5rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: #9b3f49;
  border-radius: 1rem;
  font-size: 1.35rem;
  font-weight: 850;
}

/* Public password recovery */
.password-recovery-shell {
  max-width: 680px;
}

.password-recovery-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.5rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--vep-blue), var(--vep-green));
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(33, 111, 171, .18);
  font-size: 1.25rem;
  font-weight: 800;
}

.password-recovery-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--vep-border);
  color: var(--vep-muted);
  font-size: .875rem;
  text-align: center;
}

.password-recovery-footer a {
  font-weight: 700;
  text-decoration: none;
}

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

/* Identity and account-management forms */
main form .form-floating > .form-control {
  border-color: #cbd8df;
}

main form .btn-primary {
  min-height: 46px;
}

/* Sign in */
.login-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 0;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  overflow: hidden;
  min-height: 610px;
  background: var(--vep-surface);
  border: 1px solid rgba(22, 86, 135, .12);
  border-radius: 1.5rem;
  box-shadow: 0 24px 65px rgba(20, 58, 82, .13);
}

.login-brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4.75rem);
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(120, 169, 34, .55), transparent 32%),
    linear-gradient(145deg, var(--vep-blue-dark) 0%, #1f6fa8 57%, #32834f 125%);
}

.login-brand-panel::before,
.login-brand-panel::after {
  position: absolute;
  z-index: -1;
  content: "";
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
}

.login-brand-panel::before {
  width: 24rem;
  height: 24rem;
  right: -15rem;
  bottom: -5rem;
}

.login-brand-panel::after {
  width: 17rem;
  height: 17rem;
  right: -10rem;
  bottom: -1.5rem;
}

.login-brand-content {
  max-width: 390px;
}

.login-brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1.5rem;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-brand-kicker::before {
  width: .65rem;
  height: .65rem;
  content: "";
  background: #a5d343;
  border-radius: 50%;
  box-shadow: 0 0 0 .35rem rgba(165, 211, 67, .15);
}

.login-brand-panel h2 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.25rem, 4vw, 3.35rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.login-brand-panel p {
  max-width: 33rem;
  margin-bottom: 2.25rem;
  color: rgba(255, 255, 255, .82);
  font-size: 1.05rem;
  line-height: 1.7;
}

.login-feature-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  list-style: none;
}

.login-feature-list li {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: rgba(255, 255, 255, .94);
  font-size: .95rem;
  font-weight: 650;
}

.login-feature-list span {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  font-size: .75rem;
}

.login-brand-accent {
  position: absolute;
  z-index: -1;
  width: 8rem;
  height: .3rem;
  left: 0;
  bottom: 0;
  background: var(--vep-green);
}

.login-form-panel {
  display: flex;
  align-items: center;
  padding: clamp(2.25rem, 5vw, 5rem);
  background: #fff;
}

.login-form-wrap {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.login-form-header {
  margin-bottom: 2rem;
}

.login-form-header h1 {
  margin: .55rem 0 .55rem;
  color: var(--vep-ink);
  font-size: clamp(2.1rem, 4vw, 2.75rem);
  font-weight: 750;
  letter-spacing: -.04em;
}

.login-form-header p {
  margin: 0;
  color: var(--vep-muted);
  font-size: 1rem;
}

.login-validation-summary:empty,
.login-validation-summary.validation-summary-valid {
  display: none;
}

.login-validation-summary {
  margin-bottom: 1.25rem;
  padding: .9rem 1rem;
  color: #8f2630;
  background: #fff3f4;
  border: 1px solid #f1cbd0;
  border-radius: .75rem;
  font-size: .9rem;
}

.login-validation-summary ul {
  margin: 0;
  padding-left: 1.15rem;
}

.login-label {
  margin-bottom: .5rem;
  color: var(--vep-ink);
  font-size: .9rem;
  font-weight: 700;
}

.login-control {
  min-height: 3.35rem;
  padding: .75rem 1rem;
  color: var(--vep-ink);
  background: #fbfdfe;
  border-color: #cbd8df;
  border-radius: .75rem;
  font-size: 1rem;
}

.login-control::placeholder {
  color: #93a2ab;
}

.login-control:hover {
  border-color: #a8bac5;
}

.login-field-validation {
  display: block;
  margin-top: .4rem;
  font-size: .8125rem;
}

.login-field-validation:empty {
  display: none;
}

.login-forgot-link {
  margin-bottom: .5rem;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}

.login-forgot-link:hover {
  text-decoration: underline;
}

.password-field {
  position: relative;
}

.password-field .login-control {
  padding-right: 4.5rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .55rem;
  min-width: 3.35rem;
  padding: .4rem .55rem;
  color: var(--vep-blue-dark);
  background: transparent;
  border: 0;
  border-radius: .4rem;
  font-size: .82rem;
  font-weight: 750;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: #edf5fa;
}

.password-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(33, 111, 171, .2);
}

.login-remember {
  margin: 1rem 0 1.5rem;
  color: var(--vep-muted);
  font-size: .9rem;
}

.login-remember .form-check-input:checked {
  background-color: var(--vep-blue);
  border-color: var(--vep-blue);
}

.login-submit {
  width: 100%;
  min-height: 3.35rem;
  border-radius: .75rem;
  box-shadow: 0 10px 24px rgba(33, 111, 171, .2);
  font-size: 1rem;
  font-weight: 750;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(33, 111, 171, .25);
}

.login-help {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  color: var(--vep-muted);
  border-top: 1px solid var(--vep-border);
  font-size: .875rem;
  line-height: 1.55;
}

.staff-customer-management-link {
  margin-top: .25rem;
  color: var(--vep-blue-dark);
  font-size: .75rem;
  font-weight: 750;
  text-decoration: none;
}

.staff-customer-management-link:hover {
  text-decoration: underline;
}

.super-admin-card {
  margin-bottom: 1.5rem;
}

.super-admin-card-header {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.super-admin-search {
  width: min(100%, 34rem);
  display: flex;
  gap: .65rem;
}

.super-admin-customer-list,
.super-admin-stack-list,
.super-admin-project-list {
  background: #fff;
}

.super-admin-customer-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, .7fr) minmax(190px, .9fr) auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--vep-border);
}

.super-admin-customer-row:last-child,
.super-admin-stack-row:last-child,
.super-admin-audit-row:last-child,
.super-admin-project-row:last-child {
  border-bottom: 0;
}

.super-admin-customer-row > div:first-child,
.super-admin-customer-projects,
.super-admin-customer-sync,
.super-admin-stack-row > div,
.super-admin-audit-row,
.super-admin-project-row > div {
  min-width: 0;
}

.super-admin-customer-row span,
.super-admin-customer-row strong,
.super-admin-stack-row span,
.super-admin-stack-row small,
.super-admin-audit-row span,
.super-admin-audit-row small,
.super-admin-project-row span,
.super-admin-project-row small {
  display: block;
}

.super-admin-customer-row > div:first-child strong,
.super-admin-project-row a {
  color: var(--vep-ink);
  font-weight: 750;
}

.super-admin-customer-row > div:first-child span,
.super-admin-customer-projects span,
.super-admin-customer-sync span,
.super-admin-stack-row span,
.super-admin-stack-row small,
.super-admin-audit-row span,
.super-admin-audit-row small,
.super-admin-project-row span,
.super-admin-project-row small {
  color: var(--vep-muted);
  font-size: .78rem;
}

.super-admin-customer-sync strong {
  font-size: .82rem;
}

.super-admin-empty {
  padding: 2rem 1.5rem;
  color: var(--vep-muted);
  text-align: center;
}

.super-admin-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.super-admin-lower-grid .super-admin-card {
  min-width: 0;
}

.super-admin-stack-row,
.super-admin-audit-row {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--vep-border);
}

.super-admin-stack-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.super-admin-stack-row small,
.super-admin-audit-row small {
  margin-top: .2rem;
}

.super-admin-customer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .85fr);
  gap: 1.5rem;
  align-items: start;
}

.super-admin-project-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--vep-border);
}

.super-admin-action-stack {
  display: grid;
  gap: 1.5rem;
}

.super-admin-action-card {
  overflow: hidden;
}

.super-admin-action-state,
.super-admin-confirm-copy,
.super-admin-danger-notice {
  padding: .85rem 1rem;
  border-radius: .7rem;
  font-size: .82rem;
}

.super-admin-action-state,
.super-admin-confirm-copy {
  margin-bottom: 1rem;
  color: var(--vep-muted);
  background: #f1f6f9;
}

.super-admin-danger-card {
  border-top: 4px solid #bd3b36;
}

.super-admin-danger-notice {
  margin-bottom: 1.25rem;
  color: #7f2522;
  background: #fceeed;
  border: 1px solid #f2c7c4;
}

.staff-delete-card {
  max-width: 760px;
  margin-inline: auto;
}

.staff-delete-identity {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--vep-border);
}

@media (max-width: 991.98px) {
  .portal-navbar .navbar-collapse {
    padding: 1rem 0;
  }

  .portal-profile-menu {
    margin-top: .35rem;
    padding-top: .75rem;
    border-top: 1px solid var(--vep-border);
  }

  .portal-profile-toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .portal-profile-dropdown {
    width: 100%;
    margin-top: .4rem;
    box-shadow: none;
  }

  .portal-timeline {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .portal-timeline li {
    min-height: 3.5rem;
    padding-left: 2rem;
  }

  .portal-timeline li::before {
    top: 1rem;
    bottom: 0;
    left: .45rem;
    right: auto;
    width: 2px;
    height: auto;
  }

  .timeline-marker {
    position: absolute;
    top: .25rem;
    left: 0;
  }

  .team-users-grid {
    grid-template-columns: 1fr;
  }

  .team-customer-profile-form {
    grid-template-columns: minmax(220px, 1fr) minmax(190px, .8fr) auto;
  }

  .team-form-card {
    position: static;
  }

  .project-sidebar {
    position: static;
  }

  .account-settings-grid {
    grid-template-columns: 1fr;
  }

  .account-settings-nav-card {
    position: static;
  }

  .account-settings-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .account-settings-nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .account-settings-nav-link.active {
    box-shadow: inset 0 -3px 0 var(--vep-blue);
  }

  .account-settings-nav-link small {
    display: none;
  }

  .invitation-review-grid {
    grid-template-columns: 1fr;
  }

  .invitation-action-card {
    position: static;
  }

  .login-shell {
    max-width: 680px;
    padding-top: 0;
  }

  .login-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    min-height: 575px;
  }

  .super-admin-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .super-admin-search {
    width: 100%;
  }

  .super-admin-customer-row {
    grid-template-columns: minmax(190px, 1.3fr) minmax(120px, .7fr) minmax(170px, .9fr) auto;
  }

  .super-admin-lower-grid,
  .super-admin-customer-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .portal-brand {
    gap: .5rem;
    margin-right: .25rem;
  }

  .portal-brand .portal-home-label {
    gap: .35rem;
    padding-left: .5rem;
    padding-right: .35rem;
  }

  .portal-brand img {
    width: 116px;
  }

  .portal-brand span {
    font-size: .8125rem;
  }

  .portal-main {
    padding-top: 1.75rem;
  }

  .login-shell {
    padding: 0;
  }

  .login-card {
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(20, 58, 82, .1);
  }

  .login-form-panel {
    min-height: 0;
    padding: 2rem 1.25rem;
  }

  .login-form-header {
    margin-bottom: 1.75rem;
  }

  .login-help {
    margin-top: 1.75rem;
  }

  .team-user-row {
    grid-template-columns: 1fr auto;
    padding: 1.15rem;
  }

  .team-customer-profile-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .team-customer-profile-form > .btn {
    width: 100%;
  }

  .team-user-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .team-notification-form {
    width: 100%;
  }

  .team-role-form {
    align-items: stretch;
  }

  .team-role-form .form-select {
    width: 100%;
  }

  .team-protected-note {
    text-align: right;
  }

  .super-admin-search,
  .super-admin-stack-row,
  .super-admin-project-row {
    align-items: stretch;
    flex-direction: column;
  }

  .super-admin-search .btn,
  .super-admin-stack-row .btn,
  .super-admin-project-row .staff-access-badge {
    width: 100%;
  }

  .super-admin-project-row .staff-access-badge {
    text-align: center;
  }

  .super-admin-customer-row {
    grid-template-columns: 1fr 1fr;
    padding: 1.1rem;
  }

  .super-admin-customer-row > div:first-child {
    grid-column: 1 / -1;
  }

  .super-admin-customer-row > .btn {
    grid-column: 1 / -1;
  }

  .customer-project-size {
    width: 100%;
    text-align: center;
  }

  .customer-project-actions .btn {
    width: 100%;
  }

  .account-settings-hero {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }

  .account-settings-hero-icon {
    width: 3.25rem;
    height: 3.25rem;
  }

  .account-secure-badge {
    justify-self: start;
  }

  .account-settings-nav-card {
    padding: .75rem;
  }

  .account-settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-settings-nav-link {
    padding: .65rem .45rem;
  }

  .account-settings-content {
    min-height: 0;
    padding: 1.35rem;
  }

  .account-support-note {
    flex-direction: column;
  }

  .staff-view-banner {
    grid-template-columns: 1fr;
    padding: 1.15rem;
  }

  .staff-view-state {
    min-width: 0;
    padding: 1rem 0 0;
    justify-items: start;
    border-top: 1px solid #c8dfea;
    border-left: 0;
  }

  .message-conversation-header,
  .message-composer-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-header-badges {
    justify-content: flex-start;
  }

  .message-bubble {
    max-width: 92%;
  }

  .message-list,
  .message-composer {
    padding: 1rem;
  }

  .message-character-count {
    margin-left: 0;
  }

  .message-send-button {
    width: 100%;
  }

  .message-attachments,
  .message-selected-files-list {
    grid-template-columns: 1fr;
  }

  .message-image-attachment,
  .message-file-attachment {
    grid-column: auto;
  }

  .message-attachment-composer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .invitation-detail-list > div,
  .invitation-detail-list > div:nth-child(odd),
  .invitation-detail-list > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--vep-border);
  }

  .invitation-detail-list > div:last-child {
    border-bottom: 0;
  }

  .project-timeline-step {
    grid-template-columns: 2.35rem minmax(0, 1fr);
    gap: .8rem;
  }

  .project-timeline-marker {
    width: 2.3rem;
    height: 2.3rem;
  }

  .project-timeline-step::before {
    top: 2.2rem;
    left: 1.12rem;
  }

  .project-milestone-details {
    grid-template-columns: 1fr;
  }
}

/* Compact staff directory and focused Bootstrap editing panels. */
.team-directory-table { font-size: .9rem; }
.team-directory-table th { padding: 1rem 1.25rem; color: #52677a; font-weight: 600; background: #f6f9fc; white-space: nowrap; }
.team-directory-table td { padding: 1.25rem; }
.team-directory-table td:first-child { min-width: 280px; }
.team-directory-table td:not(:first-child) { min-width: 110px; }
.team-directory-table [hidden] { display: none !important; }
.team-editor-panel { --bs-offcanvas-width: 520px; max-width: 100%; }
.team-editor-panel .offcanvas-body { font-size: .95rem; }
.team-editor-panel .team-user-avatar { flex-shrink: 0; }
.team-editor-panel .text-secondary { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .team-directory-table th, .team-directory-table td { padding: .9rem; }
    .team-editor-panel { --bs-offcanvas-width: 100%; }
}

/* Customer referral navigation: align gift icon with the link label. */
.portal-referral-nav-content {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  vertical-align: middle;
  white-space: nowrap;
}
.portal-referral-nav-icon {
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-invoice-payment-age { color: #945400; font-weight: 700; }

/* Keep submitted actions visibly busy without dropping button POST values. */
.portal-submit-pending {
  pointer-events: none;
  opacity: .7;
  cursor: wait;
}

/* Clearly distinguish read-only customer previews, including on small screens. */
.customer-preview-banner {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #b9d4e8;
  border-top: 4px solid var(--vep-blue);
  border-radius: .75rem;
  background: #edf6fc;
  box-shadow: 0 3px 12px rgba(20,55,80,.08);
}
.customer-preview-banner p { font-size: .85rem; }
@media (max-width: 575.98px) {
  .customer-preview-banner { position: static; }
}

.customer-message-pill { display: inline-flex; align-items: center; gap: .6rem; border-radius: 999px; padding: .65rem 1rem; background: var(--vep-blue); color: #fff; font-weight: 700; }
.customer-message-pill:hover, .customer-message-pill:focus-visible { background: var(--vep-blue-dark); color: #fff; }
.customer-message-pill svg { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.customer-message-floating { display: none; }
.customer-message-floating[hidden] { display: none !important; }
.message-row:focus { outline: 2px solid var(--vep-blue); outline-offset: -2px; }
@media (max-width: 767.98px) {
  .customer-message-floating { display: inline-flex; position: fixed; bottom: calc(1rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 1030; max-width: calc(100% - 2rem); width: max-content; box-shadow: 0 4px 18px rgba(20,55,80,.25); }
}

/* Keep rating faces visible at every screen size, including compact mobile choices. */
.phase-survey-choice .phase-survey-emoji {
  display: block;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: .2rem;
}

.project-feedback-score .project-feedback-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1;
  flex: 0 0 2rem;
  text-align: center;
}

.project-feedback-score {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.project-feedback-value { white-space: nowrap; }
.insights-rating-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
}
.insights-rating-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.1rem;
  line-height: 1.25;
  width: 1.4rem;
  text-align: center;
}

.phase-survey-result-pill .phase-survey-result-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  margin-right: .35rem;
}

.portal-conversations-nav {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 0;
  white-space: nowrap;
}
.portal-conversations-nav svg {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (min-width: 992px) {
  .portal-conversations-nav { margin-left: .75rem; padding-right: 1rem; }
}

.message-edit { margin-top: .65rem; }
.message-edit summary { cursor: pointer; font-size: .8rem; display: flex; align-items: center; gap: .3rem; width: fit-content; }
.message-edit summary::-webkit-details-marker { display: none; }
.message-edited-label { display: block; font-size: .72rem; opacity: .8; margin-top: .5rem; }

/* Distinct controls against the sender's blue message bubble. */
.message-edit .message-edit-save {
  --bs-btn-color: #15517e;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: #103f62;
  --bs-btn-hover-bg: #e7f2fa;
  --bs-btn-hover-border-color: #e7f2fa;
  --bs-btn-active-color: #103f62;
  --bs-btn-active-bg: #d5e9f7;
  --bs-btn-active-border-color: #d5e9f7;
  font-weight: 700;
}
.message-edit .message-edit-cancel {
  --bs-btn-color: #fff;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: #15517e;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-active-color: #15517e;
  --bs-btn-active-bg: #e7f2fa;
  --bs-btn-active-border-color: #fff;
}
.message-edit .btn { min-height: 44px; padding: .5rem .85rem; }
.message-edit .btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.audit-message-edit { width: 100%; margin-top: .5rem; }
.audit-message-edit summary { cursor: pointer; font-size: .85rem; }
.audit-message-version { margin-top: .65rem; padding: .75rem; border: 1px solid var(--vep-border); border-radius: .5rem; background: #f5f9fc; }
.audit-message-version strong { font-size: .8rem; }
.audit-message-version p { margin: .35rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }

/* Customer presence: text accompanies color for accessible status recognition. */
.customer-presence { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; line-height: 1.5; color: #64748b; }
.customer-presence::before { content: ""; width: .5rem; height: .5rem; flex: 0 0 .5rem; border-radius: 50%; background: #94a3b8; }
.customer-presence[data-presence-state="online"] { color: #327311; }
.customer-presence[data-presence-state="online"]::before { background: #65a30d; }
.customer-presence[data-presence-state="away"] { color: #946000; }
.customer-presence[data-presence-state="away"]::before { background: #d69b17; }

.phase-sentiment { position: relative; width: fit-content; margin: .3rem 0; font-size: .8rem; color: #334155; }
.phase-sentiment summary { cursor: pointer; display: flex; align-items: center; gap: .25rem; border: 1px solid #b8d5e9; border-radius: 999px; padding: .1rem .50rem; background: #edf3f8; list-style: none; }
.phase-sentiment summary::-webkit-details-marker { display: none; }
.phase-sentiment summary span { font-size: 1.2rem; }
.phase-sentiment summary:focus-visible { outline: 2px solid #216fa8; outline-offset: 3px; }
.phase-sentiment-negative summary { background: #fff0f0; color: #9b2634; border-color: #ebbdc3; }
.phase-sentiment-happy summary {   
  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}
.phase-sentiment-explanation { max-width: 22rem; padding: .6rem; margin-top: .3rem; border: 1px solid #dbe5ed; border-radius: .5rem; background: white; font-weight: normal; line-height: 1.5; }

.conversation-customer-link { display: block; margin-bottom: .18rem; color: var(--vep-ink); font-size: .9rem; font-weight: 800; text-decoration: none; }
.conversation-queue-item .phase-sentiment, .conversation-queue-item .conversation-open-icon { position: relative; z-index: 2; }

.sentiment-distribution { padding: 1.4rem; margin-bottom: 1.5rem; border-top: 3px solid var(--vep-blue); background: #f5f9fc; }
.sentiment-distribution-headline { font-size: 1.35rem; margin-bottom: .2rem; }
.sentiment-distribution-headline strong { font-size: 1.8rem; font-weight: 600; }
.sentiment-distribution-bar { display: flex; height: .7rem; overflow: hidden; border-radius: 1rem; background: #e7edf2; }
.sentiment-distribution-bar > span { flex-basis: 0; min-width: 0; }
.sentiment-segment-negative { background: #ef535b; }
.sentiment-segment-content { background: #f4c62c; }
.sentiment-segment-happy { background: #6da916; }
.sentiment-distribution-legend { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: .8rem; }
.sentiment-distribution-legend a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: var(--vep-ink); text-decoration: none; border-radius: .35rem; padding: .2rem; }
.sentiment-distribution-legend a:hover { text-decoration: underline; }
.sentiment-distribution-legend a:focus-visible { outline: 2px solid var(--vep-blue); outline-offset: 3px; }
.sentiment-distribution-legend a > span { font-size: 1.4rem; }
@media (max-width: 575.98px) { .sentiment-distribution { padding: 1rem; } .sentiment-distribution-legend { gap: .2rem 1rem; } }

.pto-celebration-banner {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #d4e7ba;
    border-top: 4px solid #79ad16;
    border-radius: 1rem;
    background: #f3f9eb;
    color: #23481b;
}
.pto-celebration-banner strong { display: block; font-size: 1.15rem; }
.pto-celebration-banner p { margin: .5rem 0 0; }
.pto-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1050; }

/* Monthly customer communication recognition. */
.champions-card { margin: 1.5rem 0; border-top: 4px solid #2274af; overflow: hidden; }
.champions-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding: 1.5rem; }
.champions-calendar-note { color: #536b80; font-size: .85rem; }
.champions-months { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; padding: 0 1.5rem 1.5rem; }
.champions-month { min-width: 0; border: 1px solid #dbe6ef; border-radius: 1rem; padding: 1rem; background: #fbfdff; }
.champions-month-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.champions-period-badge { padding: .35rem .65rem; border-radius: 2rem; background: #eaf3fa; color: #195985; font-size: .75rem; font-weight: 700; }
.champions-podium { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .6rem; align-items: end; }
.champions-step { text-align: center; padding: 1rem .5rem; border-radius: .8rem .8rem .25rem .25rem; border: 1px solid #d8e3eb; background: #eef3f7; min-width: 0; }
.champions-place-1 { order: 2; padding-bottom: 3.5rem; background: #fff7dd; border-color: #ecd696; }
.champions-place-2 { order: 1; padding-bottom: 2rem; }
.champions-place-3 { order: 3; background: #fff0e7; border-color: #ebd3c2; }
.champions-medal { display: flex; flex-direction: column; gap: .35rem; font-size: .78rem; margin-bottom: 1rem; }
.champions-medal > span:first-child { font-size: 2rem; }
.champions-person + .champions-person { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #d8d9c9; }
.champions-avatar { display: inline-flex; width: 2.6rem; height: 2.6rem; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg,#2274af,#79ad16); color: white; font-weight: 700; }
.champions-name { display: block; margin: .65rem 0 .25rem; font-size: .9rem; overflow-wrap: anywhere; }
.champions-points { display: block; font-size: 1.3rem; font-weight: 800; color: #244760; }
.champions-points small { display: block; font-size: .75rem; font-weight: 400; }
.champions-breakdown { margin-top: 1rem; font-size: .85rem; }
.champions-breakdown summary, .champions-footer summary { cursor: pointer; padding: .5rem 0; font-weight: 700; color: #195985; }
.champions-breakdown table { min-width: 470px; }
.champions-breakdown th:not(:first-child), .champions-breakdown td { text-align: center; }
.champions-footer { padding: 1.25rem 1.5rem; border-top: 1px solid #dbe6ef; font-size: .9rem; }
.champions-empty { display: grid; gap: .75rem; text-align: center; padding: 2rem 1rem; color: #536b80; }
.champions-empty > span { font-size: 2.5rem; }
@media(max-width: 1100px) { .champions-months { grid-template-columns: minmax(0,1fr); } }
@media(max-width: 420px) {
    .champions-header, .champions-footer { padding: 1rem; }
    .champions-months { padding: 0 .75rem 1rem; }
    .champions-podium { grid-template-columns: minmax(0,1fr); }
    .champions-step { order: initial; padding: 1rem; border-radius: .75rem; }
    .champions-unfilled { display: none; }
}

/* Prominent survey action in project-update messages, for staff and customers. */
.survey-message-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 48px;
  max-width: 100%;
  padding: .75rem 1.25rem;
  border-radius: .5rem;
  font-weight: 700;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
}
.survey-message-cta:focus-visible {
  outline: 2px solid var(--vep-blue-dark);
  outline-offset: 3px;
}

/* V44.6: five phase-feedback levels, shared across customer project badges. */
.phase-sentiment-poor summary { background: #fff0f0; color: #9b2634; border-color: #ebbdc3; }
.phase-sentiment-needs-improvement summary { background: #fff3e6; color: #8a4b12; border-color: #e7c76b; }
.phase-sentiment-great summary {   
  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}
.phase-sentiment-love-it summary {   
  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}
.sentiment-segment-poor { background: #ef535b; }
.sentiment-segment-needs-improvement { background: #e49b45; }
.sentiment-segment-great { background: #a0c65a; }
.sentiment-segment-love-it { background: var(--vep-green); }

/* V44.7: live customer count beside the Salesforce badge. */
.team-dashboard-statuses { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:.75rem; }
.portal-online-badge { display:inline-flex; align-items:center; gap:.5rem; padding:.65rem .9rem; border:1px solid var(--vep-border); border-radius:2rem; background:#f5f8fb; color:var(--vep-ink); font-size:.8rem; font-weight:700; text-decoration:none; }
.portal-online-dot { width:.5rem; height:.5rem; border-radius:50%; background:#94a3b8; flex-shrink:0; }
.portal-online-badge[data-state="online"] {   
  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}
.portal-online-badge[data-state="online"] .portal-online-dot { background:var(--vep-green); }
.portal-online-badge:hover { text-decoration:underline; }
.portal-online-badge:focus-visible { outline:3px solid var(--vep-blue); outline-offset:3px; }
@media(max-width:575.98px) { .team-dashboard-statuses { justify-content:flex-start; } }

/* Keep the overflow cue outside the scrolling names, above the mobile keyboard. */
.message-mention-suggestions-heading { flex-shrink: 0; }
.message-mention-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.message-mention-more {
  position: relative;
  flex-shrink: 0;
  padding: .4rem .7rem;
  background: #f5f9fb;
  color: var(--vep-blue, #216eaa);
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  pointer-events: none;
}
.message-mention-more::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: .8rem;
  background: linear-gradient(transparent, rgba(245, 249, 251, .95));
}
.message-mention-more[hidden] { display: none; }
.message-mention-more.at-bottom { visibility: hidden; }
.mention-touch-hint { display: none; }
@media (pointer: coarse) {
  .mention-touch-hint { display: inline; }
  .mention-pointer-hint { display: none; }
}

/* Compact dashboard toolbar; override the broader primary-form button minimum. */
/* Stronger search contrast, retaining the shared control height and type size. */
#customer-projects .dashboard-project-search { position: relative; }
#customer-projects .dashboard-project-search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--vep-blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.portal-body main #project-search {
  padding-left: 2.35rem !important;
  background-color: #f4f8fc;
  border-color: var(--vep-blue);
}
.portal-body main #project-search:focus {
  border-color: var(--vep-blue-dark);
  box-shadow: 0 0 0 .2rem rgba(33, 111, 171, .18);
}

#customer-projects .dashboard-search-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 38px;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  white-space: nowrap;
}
#customer-projects .dashboard-search-action svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.browser-audio-button { display: inline-flex; align-items: center; gap: .45rem; }
.browser-audio-button svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.browser-audio-button svg[hidden] { display: none; }
.browser-audio-button.browser-audio-ready {
  background-color: #eef6df;
  border-color: var(--vep-green);
  color: var(--vep-green-dark);
  opacity: 1;
}

.browser-audio-button.browser-audio-ready:hover,
.browser-audio-button.browser-audio-ready:focus-visible {
  background-color: #e1edcb;
  border-color: var(--vep-green-dark);
  color: var(--vep-green-dark);
}
.browser-audio-button:not(:disabled) { cursor: pointer; }

/* Shared icon treatment for the primary navigation. */
.portal-nav-item-content { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.portal-nav-item-content svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* V44.28: Active Portal Time column headings and monthly leaders. */
#active-portal-time .team-time-head th { background-color: #edf4f8; color: #285b80; border-bottom: 1px solid #ccdce7; }
#active-portal-time .team-time-medal { display: inline-block; font-size: 1.35rem; vertical-align: middle; margin-left: .35rem; }
#active-portal-time .team-time-medal[hidden] { display: none; }

/* V44.29: Match Active Portal Time date actions to the date input. */
main form.team-time-date-form .btn { min-height: 38px; height: 38px; padding: .375rem .75rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1.5; }

/* V44.30: Team Activity communication insights. */
#team-activity-page .table thead th { background: #edf4f8; color: #285b80; border-bottom: 1px solid #ccdce7; }
#team-activity-page .table td, #team-activity-page .table tbody th { padding: .9rem 1rem; }
#team-activity-page .table thead th { padding: .8rem 1rem; }
#team-activity-page .team-activity-sort { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; }
#team-activity-page .team-activity-sort:hover { color: var(--vep-blue); text-decoration: underline; }
#team-activity-page .team-activity-sort:focus-visible, #team-activity-page .team-chart-bar:focus-visible { outline: 2px solid var(--vep-blue); outline-offset: 3px; }
#team-activity-page .team-contributor-link { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-width: 190px; }
#team-activity-page .team-contributor-link:hover { text-decoration: underline; }
#team-activity-page .team-user-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
#team-activity-page .team-contribution-track { height: 5px; max-width: 130px; min-width: 70px; background: #e7f0f5; border-radius: 4px; margin-top: .4rem; }
#team-activity-page .team-contribution-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--vep-blue), var(--vep-green)); }
#team-activity-page .team-waiting-count { border: 1px solid #b8d5e9; display: inline-grid; place-items: center; min-width: 1.8rem; padding: .2rem .55rem; border-radius: 2rem; background: #edf4f8; color: #285b80; font-size: .85rem; font-weight: 700; }
#team-activity-page .team-waiting-scroll { max-height: 370px; overflow: auto; }
#team-activity-page .team-waiting-scroll thead th { position: sticky; top: 0; z-index: 1; }
#team-activity-page .team-phase-label { border: 1px solid #b8d5e9; display: inline-block; padding: .25rem .6rem; background: #edf4f8; color: #285b80; font-size: .8rem; font-weight: 700; border-radius: 1rem; }
#team-activity-page .team-activity-entry { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; padding: 1rem 1.25rem; }
#team-activity-page .team-activity-entry-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
#team-activity-page .team-activity-entry time { white-space: nowrap; }
#team-activity-page .team-activity-chart { display: flex; gap: .6rem; padding-top: .5rem; }
#team-activity-page .team-chart-scale { flex: 0 0 30px; height: 200px; display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: #5d7285; font-size: .75rem; }
#team-activity-page .team-chart-scroll { flex: 1; min-width: 0; overflow-x: auto; padding: 4px 4px 8px; margin-top: -4px; }
#team-activity-page .team-chart-bars { display: flex; gap: .45rem; min-width: 100%; width: max-content; height: 232px; background: linear-gradient(#dfeaf1, #dfeaf1) 0 0 / 100% 1px no-repeat, linear-gradient(#dfeaf1, #dfeaf1) 0 100px / 100% 1px no-repeat, linear-gradient(#ccdce7, #ccdce7) 0 200px / 100% 1px no-repeat; }
#team-activity-page .team-chart-column { flex: 1 0 24px; min-width: 24px; display: flex; flex-direction: column; align-items: center; }
#team-activity-page .team-chart-bar { border: 0; padding: 0; margin: 0; height: 200px; width: 100%; max-width: 76px; display: flex; align-items: end; background: transparent; cursor: pointer; border-radius: 4px; }
#team-activity-page .team-chart-bar > span { display: block; width: 100%; height: var(--bar-height); min-height: 3px; background: linear-gradient(0deg, #2374ad, #79ae22); border-radius: 4px 4px 0 0; }
#team-activity-page .team-chart-bar.is-zero > span { background: #ccdce7; min-height: 2px; }
#team-activity-page .team-chart-bar:hover > span, #team-activity-page .team-chart-bar:focus-visible > span { filter: brightness(1.13); }
#team-activity-page .team-chart-date { font-size: .7rem; color: #5d7285; white-space: nowrap; margin-top: .55rem; height: 1rem; width: 24px; text-align: center; }
#team-activity-page .team-chart-column:first-child .team-chart-date { text-align: left; align-self: flex-start; }
#team-activity-page .team-chart-column:last-child .team-chart-date { text-align: right; align-self: flex-end; }
#team-activity-page .team-chart-data summary, #team-activity-page .team-response-notes summary { cursor: pointer; color: var(--vep-blue); font-weight: 600; }
#team-activity-page .team-chart-data > div { max-height: 320px; overflow: auto; }
@media (max-width: 575px) {
  #team-activity-page .team-activity-entry { gap: .65rem; }
  #team-activity-page .team-activity-entry time { margin-left: 3.15rem; }
  #team-activity-page .team-chart-bars { gap: .3rem; }
}

/* V44.31: Keep Team Activity summary values aligned regardless of description length. */
#team-activity-page .insights-stat-card:not(.portal-metric-card) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: .45rem;
}
#team-activity-page .insights-stat-card:not(.portal-metric-card) > span { line-height: 1.3; }
#team-activity-page .insights-stat-card:not(.portal-metric-card) > strong {
  align-self: flex-start;
  font-size: 2rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
#team-activity-page .insights-stat-card:not(.portal-metric-card) > small { font-size: .875rem; line-height: 1.45; }

/* V44.33: A selected chart bar filters the activity feed. */
#team-activity-page .team-chart-bar[aria-pressed="true"] { outline: 3px solid #246ca0; outline-offset: 3px; background: #eaf3fa; }
#team-activity-page .team-chart-bar[aria-pressed="true"] > span { background: #246ca0; }
#team-recent-activity { scroll-margin-top: 1rem; }
#team-recent-activity[aria-busy="true"] { opacity: .65; }

/* V44.35: Center Active Portal Time cells alongside status badges. */
#active-portal-time .table th,
#active-portal-time .table td { vertical-align: middle; }

/* V44.36: Match Activity History filter buttons and center their labels. */
main form.team-history-filter-form .btn,
main form.customer-history-filter-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  white-space: nowrap;
}

/* V44.40: Make unanswered conversations actionable without nesting links. */
.dashboard-unread-link { display: flex; flex-direction: column; gap: .4rem; color: inherit; text-decoration: none; }
.dashboard-unread-link:hover .portal-stat-label { text-decoration: underline; }
.dashboard-needs-reply-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: .35rem; padding: .3rem .6rem; border: 1px solid #dce5ec; border-radius: 999px; background: #f3f6f9; color: #526579; font-weight: 700; font-size: .875rem; line-height: 1.4; text-decoration: none; }
.dashboard-needs-reply-link[data-waiting="true"] { background: #fff4dc; border-color: #e7c67c; color: #805400; }
.dashboard-needs-reply-link svg { flex-shrink: 0; }
.dashboard-needs-reply-link[data-waiting="false"] .needs-reply-clock,
.dashboard-needs-reply-link[data-waiting="true"] .needs-reply-check { display: none; }
.dashboard-needs-reply-link:hover { color: #34495e; background: #e7eef4; text-decoration: underline; }
.dashboard-needs-reply-link[data-waiting="true"]:hover { color: #684300; background: #ffe9b5; }
.dashboard-needs-reply-link:focus-visible { outline: 2px solid #1d6eae; outline-offset: 3px; }
.conversation-waiting-badge { border: 1px solid #e7c76b; display: inline-flex; align-items: center; border-radius: 999px; padding: .3rem .65rem; background: #fff4dc; color: #805400; font-weight: 700; font-size: .8rem; }

/* Keep the reply box steady as typing hints appear and disappear. */
.message-typing-indicator { min-height: 2.25rem; margin-bottom: .5rem; padding: .4rem .65rem; border-left: 3px solid transparent; border-radius: .35rem; color: #1d6eae; font-size: .9375rem; font-weight: 700; line-height: 1.5; }
.message-typing-indicator:not(:empty) { background: #edf6fc; border-left-color: #1d6eae; }

/* Reply urgency uses both text and an icon; color is supplementary. */
.reply-warning-icon { flex-shrink: 0; vertical-align: middle; }
.conversation-waiting-badge.reply-overdue-badge { display: inline-flex; gap: .4rem; align-items: center; background: #fff0f0; color: #a51d28; border: 1px solid #e8a5ac; font-weight: 700; }
.conversation-queue-item.reply-overdue-row { background: #fff8f8; box-shadow: inset 4px 0 0 #bd2735; }
.conversation-queue-item.reply-overdue-row:hover { background: #ffeded; }
.reply-overdue-summary { display: flex; align-items: flex-start; gap: .6rem; padding: .9rem 1.35rem; background: #fff0f0; color: #a51d28; border-bottom: 1px solid #e8a5ac; }
.reply-overdue-summary strong, .reply-overdue-summary span { display: block; }
.reply-overdue-summary span, .reply-overdue-summary a { font-size: .875rem; }
.reply-overdue-summary a { color: #a51d28; font-weight: 700; text-decoration: underline; }

.dashboard-needs-reply-link[data-overdue="false"] .reply-warning-icon,
.dashboard-needs-reply-link[data-overdue="true"] .needs-reply-clock,
.dashboard-needs-reply-link[data-overdue="true"] .needs-reply-check { display: none; }
.dashboard-needs-reply-link[data-overdue="true"] { background: #fff0f0; border-color: #e8a5ac; color: #a51d28; }
.dashboard-needs-reply-link[data-overdue="true"]:hover { background: #ffe1e4; color: #86151e; }

/* Dashboard customer search label. */
.project-search-label { font-weight: 700; color: var(--vep-blue); }

.message-new-arrivals { display: block; margin: .75rem auto; }
.message-new-arrivals[hidden] { display: none; }

/* Team-only phase durations. */
.timeline-phase-duration { display: flex; align-items: center; gap: .4rem; margin: .1rem 0 .55rem; color: #216fab; font-size: .875rem; font-weight: 700; }
.timeline-phase-duration svg { flex: 0 0 auto; }
.timeline-phase-duration-current { color: #216fab; font-weight: 700; }
.timeline-phase-duration-unavailable { color: #657987; font-weight: 400; }

/* Insights navigation: six views, with Reports last. */
.insights-tabs.nav-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .5rem;
    padding: .4rem;
    border: 1px solid #cfdeea;
    border-radius: .8rem;
    background: #fff;
}
.insights-tabs.nav-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 48px;
    margin: 0;
    padding: .7rem .8rem;
    border: 1px solid transparent;
    border-bottom: 3px solid transparent;
    border-radius: .5rem;
    color: #285b7f;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    transition: background-color .15s ease, color .15s ease;
}
.insights-tabs.nav-tabs .nav-link:hover {
    color: #175b91;
    background: #f0f6fa;
    border-color: #d8e5ee;
}
.insights-tabs.nav-tabs .nav-link.active {
    color: #175b91;
    background: #e8f3fb;
    border-color: #c5dfef;
    border-bottom-color: #216fab;
    font-weight: 700;
}
.insights-tabs.nav-tabs .nav-link:focus-visible {
    outline: 3px solid #216fab;
    outline-offset: 2px;
}
.insights-tabs .report-icon, .insights-tab-icon { width: 20px; height: 20px; flex: 0 0 20px; }
@media (min-width: 768px) and (max-width: 1199.98px) {
    .insights-tabs.nav-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .insights-tabs.nav-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .insights-tabs.nav-tabs .nav-link:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .insights-tabs.nav-tabs .nav-link { padding: .65rem .5rem; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
    .insights-tabs.nav-tabs .nav-link { transition: none; }
}

/* V45.39: Overview summary card title weight. */
.insights-overview-summary .insights-stat-card > span { font-weight: 700; }

/* V45.40: One summary-card system for Overview, Dashboard, Journey, and Referrals. */
main .portal-summary .portal-metric-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 8.4rem;
  padding: 1.25rem;
  border: 1px solid var(--vep-border);
  border-top: 4px solid var(--vep-blue);
  border-radius: 1rem;
  background: var(--vep-surface);
  box-shadow: 0 12px 30px rgba(20, 58, 82, .06);
}
main .portal-summary .portal-metric-card > .card-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 0;
  border: 0;
}
main .portal-summary .portal-metric-card > span,
main .portal-summary .portal-metric-card .portal-stat-label {
  display: block;
  color: #566d7b;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
}
main .portal-summary .portal-metric-card > strong,
main .portal-summary .portal-metric-card .portal-stat-value {
  display: block;
  align-self: auto;
  margin: 0;
  color: var(--vep-ink);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
main .portal-summary .portal-metric-card > small,
main .portal-summary .portal-metric-card .portal-stat-note {
  color: var(--vep-muted);
  font-size: .8125rem;
  font-weight: 400;
  line-height: 1.45;
}
main .portal-summary .portal-metric-card .dashboard-unread-link { gap: .35rem; }
main .portal-summary .portal-metric-card.metric-positive { border-top-color: var(--vep-green); }
main .portal-summary .portal-metric-card.warning,
main .portal-summary .portal-metric-card.has-warning { border-top-color: #cf8920; background: #fffaf1; }
main .portal-summary .portal-metric-card > .insights-trend.up { color: #347600; }
main .portal-summary .portal-metric-card > .insights-trend.down { color: #a7352f; }
main .portal-summary .portal-metric-card.portal-stat-link:hover { box-shadow: 0 16px 34px rgba(20, 58, 82, .1); }

main .portal-summary:not(.row) { gap: 1rem; margin-bottom: 1.5rem; }

/* V45.43: Make the customer project section easy to identify. */
#customer-projects .customer-projects-heading { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
#customer-projects .customer-projects-heading > svg { flex: 0 0 22px; color: var(--vep-blue); }

/* V46: design approvals share the portal's blue action language. */
.design-approval-card { margin-top: 1rem; padding: 1rem; background: #eef7fc; border: 1px solid #bfd9ec; border-left: 4px solid #2073b5; border-radius: 10px; color: #17324d; }
.design-approval-actions { display: grid; gap: .75rem; margin-top: .5rem; }
.design-approval-card summary, .design-team-card summary { cursor: pointer; padding: .4rem 0; }
.design-approval-card .btn, .design-team-card .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; }


/* Consistent Back controls and vertically centered scheduling actions. */
.portal-back-button,
.solar-journey-heading .btn,
main .schedule-future-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 46px;
  padding: .625rem .85rem;
  border-radius: .375rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

.portal-back-arrow {
  flex: 0 0 auto;
  line-height: 1;
}

/* Discreet Super Admin credit control alongside each message timestamp. */
.message-date-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem;
  margin-top: .55rem;
  color: var(--vep-muted);
  font-size: .68rem;
}
.message-bubble .message-date-actions time { margin-top: 0; }
.message-credit-link { color: inherit; text-decoration: none; }
.message-credit-link:hover { color: inherit; text-decoration: underline; }
.message-credit-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
.message-own .message-date-actions { color: rgba(255, 255, 255, .78); }

.message-credit-link.message-credit-excluded {
  display: inline-flex;
  align-items: center;
  padding: .15rem .5rem;
  border: 1px solid #e7c76b;
  border-radius: 999px;
  background: #fff3cd;
  color: #664d03;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  text-decoration: none;
}
.message-credit-link.message-credit-excluded:hover {
  background: #ffe69c;
  border-color: #c89b25;
  color: #513d02;
  text-decoration: underline;
}
.message-credit-link.message-credit-excluded:focus-visible { border-radius: 999px; }

/* Survey views: match portal blue and retain compact control sizing. */
.survey-view-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 38px;
  padding: .4rem .8rem;
  border: 1px solid var(--vep-blue);
  border-radius: .375rem;
  color: var(--vep-blue);
  background: #fff;
  font-weight: 600;
}
.survey-view-tabs .nav-link svg { flex: 0 0 16px; }
.survey-view-tabs .nav-link:hover { color: var(--vep-blue-dark); background: #e7f2fa; }
.survey-view-tabs .nav-link.active { color: #fff; background: var(--vep-blue); border-color: var(--vep-blue); }
.survey-view-tabs .nav-link.active:hover { background: var(--vep-blue-dark); border-color: var(--vep-blue-dark); }
.survey-view-tabs .nav-link:focus-visible { outline: 2px solid var(--vep-blue-dark); outline-offset: 3px; box-shadow: none; }
.badge.survey-status-upcoming {
  color: var(--vep-blue-dark);
  background: #dceefa;
  border: 1px solid #83b7dc;
  border-radius: 999px;
  padding: .3rem .6rem;
  font-weight: 700;
}

/* Staff design approval summary: readable, compact status pills. */
.design-team-card .design-status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .3rem .65rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.4;
}
.design-team-card .design-status-pill.is-approved {    
  background: var(--vep-success-pill-bg);
  color: var(--vep-success-pill-text);
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}
.design-team-card .design-status-pill.is-awaiting { background: #dceefa; border-color: #83b7dc; color: var(--vep-blue-dark); }
.design-team-card .design-status-pill.is-changes-requested { background: #fff3cd; border-color: #e7c76b; color: #664d03; }

/* Bootstrap success badges share the portal pill palette, without changing alerts or buttons. */
.badge.bg-success,
.badge.text-bg-success,
.badge.bg-success-subtle {
  background: var(--vep-success-pill-bg) !important;
  color: var(--vep-success-pill-text) !important;
  border: 1px solid var(--vep-success-pill-border);
  border-radius: 999px;
}

/* Health report states use the same bordered, 700-weight pills as the portal. */
.portal-health-incident .badge { border-width: 1px; border-style: solid; border-radius: 999px; font-weight: 700; }
.portal-health-incident .badge.bg-secondary { background: #edf1f4 !important; color: #52616c; border-color: #c7d2da; }
.portal-health-incident .badge.bg-primary { background: #dceefa !important; color: var(--vep-blue-dark); border-color: #83b7dc; }
.portal-health-incident .badge.bg-warning { background: #fff3cd !important; color: #664d03 !important; border-color: #e7c76b; }
.portal-health-incident .badge.bg-danger { background: #fce8eb !important; color: #9b2c3b; border-color: #ebbdc3; }

/* Dashboard table pills share compact dimensions and subtle state borders. */
.portal-project-table :is(.portal-project-status-value, .portal-project-status, .portal-documents-badge, .message-read-badge, .message-unread-badge) {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin-bottom: 0;
  padding: .25rem .6rem;
  border-width: 1px;
  border-style: solid;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.4;
}
.portal-project-table :is(.portal-project-status-value, .portal-invitation-pending, .portal-invitation-sent) { border-color: #b8d5e9; }
.portal-project-table :is(.portal-project-status-value.is-empty, .portal-project-disabled, .portal-invitation-cancelled, .portal-invitation-none, .portal-documents-missing, .message-read-badge) { border-color: #d3dde3; }
.portal-project-table .portal-invitation-failed { border-color: #ebbdc3; }
.portal-project-table .message-unread-badge { border-color: var(--vep-blue-dark); }

/* Customer header contact details share type size and icon alignment. */
.project-detail-heading .project-contact-item {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  min-width: 0;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--vep-muted);
}
.project-contact-item > svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: .15rem; color: var(--vep-blue); }
.project-contact-item > span { min-width: 0; overflow-wrap: anywhere; }
.project-contact-methods { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .5rem; }

/* Match the presence-to-address gap to the gap between contact rows. */
.project-detail-heading .customer-presence {
  display: flex;
  width: fit-content;
  margin-bottom: .5rem;
}

/* Keep sentiment and presence aligned with the header contact rows. */
.project-detail-heading .phase-sentiment { margin-bottom: .5rem; }
.project-detail-heading .customer-presence::before {
  margin-inline: calc((16px - .5rem) / 2);
}

/* Conversation queue status pills match the compact dashboard pills. */
.conversation-queue-item :is(.conversation-project-status, .conversation-waiting-badge, .conversation-mention-badge) {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: .25rem .6rem;
  border: 1px solid #b8d5e9;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.4;
}
.conversation-queue-item :is(.conversation-waiting-badge, .conversation-mention-badge) { border-color: #e7c76b; }
.conversation-queue-item .conversation-waiting-badge.reply-overdue-badge { border-color: #e8a5ac; }

.invitation-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.invitation-tab { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem .9rem; border: 1px solid #b8d5e9; border-radius: .65rem; background: #fff; color: var(--vep-blue-dark); font-weight: 700; text-decoration: none; }
.invitation-tab:hover { background: #eaf3f9; color: var(--vep-blue-dark); }
.invitation-tab.is-active { background: var(--vep-blue-dark); border-color: var(--vep-blue-dark); color: #fff; }
.invitation-tab:focus-visible { outline: 3px solid #82bded; outline-offset: 3px; }
.invitation-tab-count { padding: .1rem .50rem; border: 1px solid var(--vep-blue-dark); border-radius: 999px; background: var(--vep-blue-dark); color: #fff; font-size: .75rem; font-weight: 700; }
.invitation-tab.is-active .invitation-tab-count { background: #fff; border-color: #fff; color: var(--vep-blue-dark); }
.portal-invitation-badge.invitation-renewal-pill { gap: .25rem; padding: .1rem .50rem; font-weight: 700; border: 1px solid #b8d5e9; background: #eaf3f9; color: var(--vep-blue-dark); }
.portal-invitation-badge.invitation-renewal-pill.is-due { background: #fff4dc; border-color: #e7c76b; color: #805400; }
.portal-invitation-badge.invitation-renewal-pill.is-unavailable { background: #fff0f0; border-color: #ebbdc3; color: #a51d28; }
.portal-invitation-badge.invitation-renewal-pill.is-finished { background: #eef2f5; border-color: #d3dde3; color: #526675; }
.portal-invitation-badge.invitation-renewal-pill.is-paused { background: #fff4dc; border-color: #e7c76b; color: #805400; }

/* Solar Journey summary counts fit their labels, like the other compact pills. */
.journey-card-header .team-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: fit-content;
  min-width: 0;
  height: auto;
  gap: .25rem;
  padding: .1rem .50rem;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid #b8d5e9;
}

/* Keep Solar Journey pill typography consistent across rules, schedule, and history. */
.journey-status-pill,
.journey-email-pill,
.journey-survey-pill,
.journey-email-status,
.journey-occurrence-status,
.journey-card-header .team-count-badge {
  font-size: .64rem;
  font-weight: 700;
}

/* Invitation status pills share subtle state borders in the queue and review. */
.portal-invitation-badge { border: 1px solid #d3dde3; }
.portal-invitation-badge:is(.portal-invitation-pending, .portal-invitation-sent) { border-color: #b8d5e9; }
.portal-invitation-badge.portal-invitation-accepted { border-color: var(--vep-success-pill-border); }
.portal-invitation-badge.portal-invitation-failed { border-color: #ebbdc3; }

/* Keep the expanded staff navigation on one row as team tools grow. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .portal-staff-navbar .navbar-collapse { padding: 1rem 0; }
    .portal-staff-navbar .portal-conversations-nav { margin-left: 0; padding-right: 0; }
    .portal-staff-navbar .portal-profile-menu { margin-top: .35rem; padding-top: .75rem; border-top: 1px solid var(--vep-border); }
    .portal-staff-navbar .portal-profile-toggle { width: 100%; justify-content: flex-start; }
    .portal-staff-navbar .portal-profile-dropdown { width: 100%; margin-top: .4rem; box-shadow: none; }
}

/* Collapsed staff menu: equal link rows and a left-aligned account section. */
@media (max-width: 1399.98px) {
  .portal-staff-navbar .navbar-collapse { padding: .5rem 0 .75rem; }
  .portal-staff-navbar .navbar-collapse > .navbar-nav {
    width: 100%;
    row-gap: 0 !important;
  }
  .portal-staff-navbar .navbar-collapse .portal-admin-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    margin: 0;
    padding: .5rem;
    font-size: 1rem;
    line-height: 1.5;
  }
  .portal-staff-navbar .portal-nav-item-content { gap: .5rem; }
  .portal-staff-navbar .portal-profile-menu { margin-top: .5rem; padding-top: .5rem; }
  .portal-body .portal-staff-navbar .portal-profile-toggle {
    justify-content: flex-start;
    padding: .5rem !important;
    text-align: left;
  }
}
