.documents-shell {
  width: min(1280px, calc(100% - 40px));
  padding-bottom: 72px;
}

.portal-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 27, 62, 0.72);
}

.portal-welcome-overlay[hidden] {
  display: none;
}

.portal-welcome-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.portal-welcome-card .brand-logo {
  height: 34px;
  margin-bottom: 18px;
}

.portal-welcome-card h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: #0d1b3e;
  margin: 0 0 12px;
}

.portal-welcome-card p {
  font-size: 0.96rem;
  line-height: 1.55;
  color: #384259;
  margin: 0 0 22px;
  white-space: pre-line;
  text-align: left;
}

.portal-welcome-card button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: #008037;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.portal-welcome-card button:hover {
  filter: brightness(1.06);
}

.cross-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 9px 16px;
  border: 1px solid rgba(0, 128, 55, 0.25);
  border-radius: 999px;
  background: #f0faf4;
  color: #008037;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.cross-nav-link[hidden] {
  display: none;
}

.ask-question-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.ask-question-fab {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: #008037;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 128, 55, 0.35);
}

.ask-question-fab:hover {
  filter: brightness(1.06);
}

.ask-question-panel {
  width: min(320px, calc(100vw - 36px));
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.ask-question-panel[hidden] {
  display: none;
}

.aqp-head {
  font-size: 0.98rem;
  font-weight: 900;
  color: #0d1b3e;
  margin-bottom: 8px;
}

.ask-question-panel textarea {
  width: 100%;
  border: 1px solid #d7dbe4;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 10px;
}

.aqp-send {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #008037;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.aqp-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.aqp-status {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #4b5563;
  line-height: 1.4;
}

.aqp-history {
  margin-top: 12px;
  max-height: 220px;
  overflow-y: auto;
}

.aqp-history-item {
  padding: 9px 0;
  border-top: 1px solid #e7e9ee;
}

.aqp-history-item:first-child {
  border-top: none;
}

.aqp-history-q {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0d1b3e;
}

.aqp-history-a {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #1d2330;
  background: #f0fdf4;
  border-radius: 8px;
  padding: 7px 9px;
}

.aqp-history-a b {
  color: #008037;
}

.aqp-history-pending {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #9a8a2e;
}

.shared-files-section {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 128, 55, 0.18);
  border-radius: 12px;
  background: #f7fcf9;
}

.shared-files-section[hidden] {
  display: none;
}

.shared-files-section h2 {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0d1b3e;
  margin: 0 0 4px;
}

.shared-files-hint {
  font-size: 0.85rem;
  color: #4b5563;
  margin: 0 0 12px;
}

.shared-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shared-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #d7e8dc;
  border-radius: 10px;
  background: #fff;
  color: #00682c;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.shared-file-chip:hover {
  background: #f0faf4;
}

.documents-hero {
  margin-bottom: 16px;
}

.view-mode-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-left: 5px solid #0e7490;
  border-radius: 8px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 92% 18%, rgba(14, 116, 144, 0.1), transparent 34%),
    linear-gradient(135deg, #f4fbfd, #f8fcff 58%, #eef8fb);
  box-shadow: var(--shadow-soft);
}

.view-mode-label[hidden] {
  display: none;
}

.canceled-file-banner {
  margin-bottom: 12px;
  border: 1px solid rgba(180, 120, 0, 0.3);
  border-left: 5px solid #b45300;
  border-radius: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff7e6, #fffdf5);
  box-shadow: var(--shadow-soft);
}

.canceled-file-banner[hidden] {
  display: none;
}

.canceled-file-banner strong,
.canceled-file-banner span {
  display: block;
}

.canceled-file-banner strong {
  color: #7a4a00;
  font-size: 0.95rem;
  font-weight: 950;
}

.canceled-file-banner span {
  margin-top: 4px;
  color: #5b4a00;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.view-mode-label strong,
.view-mode-label span {
  display: block;
}

.view-mode-label strong {
  color: #083344;
  font-size: 0.95rem;
  font-weight: 950;
  text-transform: uppercase;
}

.view-mode-label span {
  margin-top: 2px;
  color: #315466;
  font-size: 0.88rem;
  font-weight: 800;
}

.view-mode-label nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.view-mode-label a {
  border-radius: 999px;
  padding: 8px 11px;
  color: #fff;
  background: #0e7490;
  font-size: 0.82rem;
  font-weight: 950;
  text-decoration: none;
}

.view-mode-label a:last-child {
  color: #083344;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.22);
}

.view-mode-label.sandbox-mode {
  border-color: rgba(124, 58, 237, 0.22);
  border-left-color: #7c3aed;
  background:
    radial-gradient(circle at 92% 18%, rgba(124, 58, 237, 0.12), transparent 34%),
    linear-gradient(135deg, #f5f3ff, #ffffff 58%, #eef2ff);
}

.view-mode-label.sandbox-mode strong,
.view-mode-label.sandbox-mode span {
  color: #3b0764;
}

.view-mode-label.sandbox-mode a {
  background: #7c3aed;
}

.view-mode-label.client-pov-mode {
  border-color: rgba(13, 148, 136, 0.22);
  border-left-color: #0d9488;
  background:
    radial-gradient(circle at 92% 18%, rgba(13, 148, 136, 0.12), transparent 34%),
    linear-gradient(135deg, #ecfdf5, #ffffff 58%, #f0fdfa);
}

.view-mode-label.client-pov-mode strong,
.view-mode-label.client-pov-mode span {
  color: #0f4c4a;
}

.view-mode-label.client-pov-mode a {
  background: #0d9488;
}

.view-mode-label.no-client-mode {
  border-color: rgba(217, 119, 6, 0.3);
  border-left-color: #d97706;
  background:
    radial-gradient(circle at 92% 18%, rgba(217, 119, 6, 0.14), transparent 34%),
    linear-gradient(135deg, #fffbeb, #ffffff 58%, #fff7ed);
}

.view-mode-label.no-client-mode strong,
.view-mode-label.no-client-mode span {
  color: #78350f;
}

.view-mode-label.no-client-mode a {
  background: #d97706;
}

.admin-return-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  background: #008037;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.admin-return-link[hidden] {
  display: none;
}

.document-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 18px;
  align-items: start;
}

.document-main-column,
.document-side-rail {
  display: grid;
  gap: 14px;
}

.document-side-rail {
  position: sticky;
  top: 16px;
}

.document-focus-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  border: 1px solid rgba(0, 128, 55, 0.18);
  border-radius: 8px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #ffffff, #f4fbf7 62%, #fffbe6);
  box-shadow: var(--shadow-soft);
}

.extra-upload-section {
  display: grid;
  gap: 10px;
  border: 1px dashed rgba(13, 27, 62, 0.18);
  border-radius: 8px;
  padding: 18px 20px;
  background: #fbfbfe;
}

.extra-upload-section h2 {
  margin: 0;
}

.extra-upload-section > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.extra-upload-label-field {
  margin-top: 4px;
}

.extra-upload-hint {
  color: #be123c;
  font-size: 0.84rem;
  font-weight: 700;
}

.extra-upload-sent-list {
  margin-top: 6px;
}

.focus-copy {
  display: grid;
  gap: 10px;
}

.focus-stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.focus-stage-row .eyebrow {
  margin: 0 4px 0 0;
}

.stage-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: #008037;
  font-size: 0.78rem;
  font-weight: 900;
}

.stage-chip.muted {
  color: var(--navy);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(13, 27, 62, 0.1);
}

.document-focus-header h2 {
  margin-bottom: 6px;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.document-focus-header p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.borrower-profile-panel {
  overflow: hidden;
  margin-top: 2px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.borrower-profile-panel summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.borrower-profile-panel summary::-webkit-details-marker {
  display: none;
}

.borrower-profile-panel summary::after {
  content: "Edit";
  justify-self: end;
  border-radius: 999px;
  padding: 6px 10px;
  color: #008037;
  background: #f0faf4;
  box-shadow: inset 0 0 0 1px rgba(0, 128, 55, 0.16);
  font-size: 0.76rem;
  font-weight: 900;
}

.borrower-profile-panel[open] summary::after {
  content: "Close";
}

.borrower-profile-panel summary span {
  color: #008037;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.borrower-profile-panel summary strong {
  color: var(--navy);
  overflow-wrap: anywhere;
}

.borrower-profile-panel p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-current-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.profile-current-grid span {
  display: grid;
  gap: 4px;
  min-height: 64px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-current-grid strong {
  color: var(--navy);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.borrower-profile-panel .correction-grid,
.borrower-profile-panel .save-correction-btn,
.borrower-profile-panel .correction-saved {
  margin-left: 12px;
  margin-right: 12px;
}

.borrower-profile-panel .correction-grid {
  padding-bottom: 0;
}

.borrower-profile-panel .correction-saved {
  margin-bottom: 12px;
}

.developer-version-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(13, 27, 62, 0.13);
  border-left: 5px solid #008037;
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff, #f7fbf9);
  box-shadow: var(--shadow-soft);
}

.developer-version-panel[hidden] {
  display: none;
}

.developer-version-panel h2 {
  margin-bottom: 6px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.developer-version-panel p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

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

.version-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.version-grid strong {
  color: var(--navy);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.developer-version-panel details {
  border-top: 1px solid rgba(13, 27, 62, 0.08);
  padding-top: 10px;
}

.developer-version-panel summary {
  width: fit-content;
  cursor: pointer;
  color: #008037;
  font-weight: 900;
}

.developer-version-panel ul {
  margin: 10px 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.document-request-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  border: 1px solid rgba(0, 128, 55, 0.16);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #f4fbf7 62%, #fffbe6);
  box-shadow: var(--shadow-soft);
}

.document-request-intro h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.document-request-intro p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.needed-arrow {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 16px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 24px rgba(0, 128, 55, 0.18);
  font-weight: 900;
  animation: arrow-breathe 1.8s ease-in-out infinite;
}

.document-status {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.document-side-rail .file-snapshot {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}

.document-side-rail .file-snapshot h2,
.document-side-rail .document-status h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.document-side-rail .file-snapshot p:not(.eyebrow),
.document-side-rail .document-status p {
  font-size: 0.94rem;
}

.document-side-rail .snapshot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-side-rail .document-status {
  padding: 16px;
}

.document-side-rail .status-actions {
  align-items: stretch;
  flex-direction: column;
}

.document-side-rail .send-documents-btn,
.document-side-rail .support-btn {
  width: 100%;
}

.application-snapshot {
  display: grid;
  gap: 13px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, #ffffff, #f8fafc 70%, #f0faf4);
  box-shadow: var(--shadow-soft);
}

.snapshot-heading {
  display: grid;
  gap: 10px;
  align-items: start;
}

.snapshot-heading h2 {
  margin-bottom: 6px;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
}

.snapshot-heading p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.snapshot-lock {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: #008037;
  background: #f0faf4;
  box-shadow: inset 0 0 0 1px rgba(0, 128, 55, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
}

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

.application-review-grid span {
  display: grid;
  gap: 5px;
  min-height: 74px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.application-review-grid strong {
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.loan-details-panel {
  overflow: hidden;
  border: 1px solid rgba(0, 128, 55, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 128, 55, 0.08), rgba(255, 255, 255, 0.92) 42%, rgba(255, 248, 212, 0.6));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.loan-details-card {
  display: block;
}

.loan-details-panel summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.loan-details-panel summary::-webkit-details-marker {
  display: none;
}

.loan-details-panel summary::after {
  content: "Show";
  justify-self: end;
  border-radius: 999px;
  padding: 7px 11px;
  color: #008037;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 128, 55, 0.18);
  font-size: 0.78rem;
  font-weight: 900;
}

.loan-details-panel[open] summary::after {
  content: "Hide";
}

.loan-details-panel summary span {
  display: grid;
  gap: 4px;
}

.loan-details-panel summary strong {
  color: var(--navy);
  font-size: 1rem;
}

.loan-details-panel summary small {
  color: var(--muted);
  line-height: 1.35;
}

.loan-details-panel summary b {
  color: #008037;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  white-space: nowrap;
}

.loan-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.loan-detail-grid span {
  display: grid;
  gap: 5px;
  min-height: 70px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.loan-detail-grid strong {
  color: var(--navy);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.loan-details-note {
  margin: 0 16px 16px;
  border-left: 4px solid #008037;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.correction-panel {
  border-top: 1px solid rgba(13, 27, 62, 0.08);
  padding-top: 12px;
}

.correction-panel summary {
  width: fit-content;
  cursor: pointer;
  color: #008037;
  font-weight: 900;
}

.correction-panel p {
  max-width: 760px;
  margin: 10px 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

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

.correction-grid label {
  display: grid;
  gap: 7px;
}

.correction-grid label span {
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 900;
}

.correction-grid input,
.correction-grid textarea {
  width: 100%;
}

.correction-grid .span-3 {
  grid-column: 1 / -1;
}

.save-correction-btn {
  width: fit-content;
  min-height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #008037;
  cursor: pointer;
  font-weight: 900;
}

.correction-saved {
  display: block;
  margin-top: 9px;
  color: #008037;
  font-weight: 900;
}

.request-navigator {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.request-navigator[hidden] {
  display: none;
}

.request-navigator-heading {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.request-navigator-heading h2 {
  margin: 2px 0 0;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.request-navigator-heading p:not(.eyebrow) {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.request-navigator-heading > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  color: #008037;
  background: #f0faf4;
  font-size: 0.8rem;
  font-weight: 900;
}

.request-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  max-height: min(430px, 48vh);
  overflow: auto;
  gap: 8px;
  padding-right: 2px;
}

.request-tabs button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 68px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 10px;
  color: var(--navy);
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.request-tabs button:hover {
  border-color: rgba(0, 128, 55, 0.22);
  background: #f4fbf7;
  transform: translateY(-1px);
}

.request-tabs button.active {
  border-color: rgba(0, 128, 55, 0.36);
  background: linear-gradient(135deg, #f0faf4, #fff);
  box-shadow: inset 4px 0 0 #008037;
  animation: top-request-heartbeat 3.2s ease-in-out infinite;
}

.request-tabs button.handled {
  color: var(--muted);
  background: #fff;
}

.request-tabs strong {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: #008037;
  font-size: 0.78rem;
}

.request-tabs button.handled strong {
  background: #7a8699;
}

.request-tabs span {
  overflow-wrap: anywhere;
  font-weight: 900;
  line-height: 1.2;
}

.request-tabs em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.request-tabs small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.request-tabs button.active em {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: #000;
  background: #ffe700;
  box-shadow: 0 8px 18px rgba(255, 231, 0, 0.28);
}

.doc-card.current-request {
  position: relative;
  overflow: hidden;
  border-color: rgba(0, 128, 55, 0.48);
  background:
    linear-gradient(90deg, rgba(0, 128, 55, 0.055), rgba(255, 255, 255, 0) 17%),
    #fff;
  box-shadow: 0 18px 42px rgba(13, 27, 62, 0.1);
}

.doc-card.current-request h3 {
  padding-right: 92px;
  font-size: clamp(1.25rem, 2.4vw, 1.72rem);
}

.doc-card.current-request::before {
  position: absolute;
  inset: 14px auto 14px 0;
  width: 5px;
  border-radius: 0 999px 999px 0;
  background: #008037;
  content: "";
}

.doc-card.current-request::after {
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 7px 11px;
  color: #008037;
  background: #f0faf4;
  box-shadow: inset 0 0 0 1px rgba(0, 128, 55, 0.16);
  content: "Start here";
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  animation: next-step-breathe 2.8s ease-in-out infinite;
}

.doc-card.current-request .upload-zone {
  border-color: rgba(0, 128, 55, 0.46);
  background:
    linear-gradient(110deg, #ffffff 0%, #f4fbf7 38%, #fffbe6 52%, #f4fbf7 66%, #ffffff 100%);
  background-size: 220% 100%;
  animation: upload-guide-sweep 3.8s ease-in-out infinite;
}

.doc-card.current-request[data-action-type="answer_question"] .doc-actions,
.doc-card.current-request[data-action-type="yes_no"] .doc-actions,
.doc-card.current-request[data-action-type="confirm_information"] .doc-actions,
.doc-card.current-request[data-action-type="provide_contact_info"] .doc-actions {
  border: 1px solid rgba(0, 128, 55, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fbf9);
}

.doc-card.current-request .delay-btn,
.doc-card.current-request .help-btn {
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.doc-card.current-request .delay-btn:hover,
.doc-card.current-request .help-btn:hover {
  transform: translateY(-1px);
}

.request-send-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(13, 27, 62, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.request-send-panel strong,
.request-send-panel span {
  display: block;
}

.request-send-panel strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.request-send-panel span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.request-send-panel.ready {
  border-color: rgba(0, 128, 55, 0.24);
  background: linear-gradient(135deg, #f4fbf7, #fffef2);
  box-shadow: 0 12px 24px rgba(0, 128, 55, 0.08);
}

.request-send-panel.retry {
  border-color: rgba(190, 18, 60, 0.24);
  background: linear-gradient(135deg, #fff5f5, #fffdf2);
  box-shadow: 0 12px 24px rgba(190, 18, 60, 0.08);
}

.send-request-btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #008037;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(0, 128, 55, 0.22);
}

.send-request-btn:disabled {
  color: #94a3b8;
  background: #e2e8f0;
  box-shadow: none;
  cursor: not-allowed;
}

.send-pulse {
  animation: send-button-breathe 2.6s ease-in-out infinite;
}

.suite-bridge-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ffffff, #f5f3ff);
  box-shadow: var(--shadow-soft);
}

.suite-bridge-notice[hidden] {
  display: none;
}

.suite-bridge-notice strong,
.suite-bridge-notice span {
  display: block;
}

.suite-bridge-notice strong {
  color: var(--navy);
  font-size: 1rem;
}

.suite-bridge-notice span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.suite-bridge-chip {
  justify-self: end;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: #7c3aed;
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-copy-editor {
  border: 1px solid rgba(255, 231, 0, 0.74);
  border-radius: 8px;
  padding: 0;
  background: linear-gradient(180deg, #fffdf0, #ffffff);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.admin-copy-disclosure {
  display: block;
}

.admin-copy-disclosure > summary {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.admin-copy-disclosure > summary::-webkit-details-marker {
  display: none;
}

.admin-copy-summary {
  display: grid;
  gap: 5px;
}

.admin-copy-summary strong {
  color: var(--navy);
  font-size: clamp(1.05rem, 2vw, 1.38rem);
}

.admin-copy-summary small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.admin-copy-toggle {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  color: #0d1b3e;
  background: #ffe700;
  font-size: 0.78rem;
  font-weight: 950;
}

.admin-copy-disclosure[open] .admin-copy-toggle {
  background: rgba(0, 128, 55, 0.12);
  color: #00642c;
}

.admin-copy-body {
  display: grid;
  gap: 14px;
  border-top: 1px solid rgba(13, 27, 62, 0.08);
  padding: 18px;
}

.admin-copy-editor h2 {
  margin-bottom: 6px;
  font-size: clamp(1.25rem, 2.4vw, 1.72rem);
}

.admin-copy-editor p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-copy-editor label {
  display: grid;
  gap: 8px;
}

.admin-copy-editor label span {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}

.admin-copy-editor textarea,
.admin-copy-editor input {
  width: 100%;
}

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

.admin-copy-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.admin-copy-actions button[data-reset-copy] {
  color: var(--navy);
  background: #edf1f6;
}

.file-snapshot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.file-snapshot h2 {
  margin-bottom: 6px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.file-snapshot p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.snapshot-grid span {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
  font-weight: 900;
}

.snapshot-grid strong {
  display: block;
  color: var(--green);
  font-size: 1.55rem;
  line-height: 1;
}

.document-status h2 {
  margin-bottom: 4px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.document-status p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.document-status.ready {
  border-color: rgba(0, 128, 55, 0.22);
  background: linear-gradient(135deg, #ffffff, #f4fbf7);
}

.document-status.sent {
  border-color: rgba(0, 128, 55, 0.3);
  background:
    linear-gradient(135deg, #ffffff, #f4fbf7 60%, #fffbe6);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.send-documents-btn {
  width: fit-content;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-weight: 900;
}

.send-documents-btn:disabled {
  color: var(--navy);
  background: #edf1f6;
  cursor: not-allowed;
}

.support-btn {
  width: fit-content;
  min-height: 48px;
  border: 1px solid rgba(13, 27, 62, 0.1);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.support-btn:hover {
  border-color: rgba(0, 128, 55, 0.18);
  background: #f0faf4;
}

.request-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.action-guide {
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.action-guide-grid span {
  min-height: 72px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: #f8fafc;
  line-height: 1.35;
}

.action-guide-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

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

.request-note-field span {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}

.request-note-field textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
}

.answer-field,
.contact-grid label {
  display: grid;
  gap: 7px;
}

.answer-field span,
.contact-grid span {
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 900;
}

.answer-field textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
}

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

.choice-btn {
  min-height: 54px;
  border: 1px solid rgba(13, 27, 62, 0.12);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.choice-btn:hover,
.choice-btn.selected {
  border-color: rgba(0, 128, 55, 0.34);
  background: #f0faf4;
  box-shadow: 0 10px 20px rgba(0, 128, 55, 0.1);
  transform: translateY(-1px);
}

.choice-btn.selected {
  color: #fff;
  background: #008037;
}

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

.contact-grid input {
  width: 100%;
}

.save-answer-btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-weight: 900;
}

.response-callout {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(0, 128, 55, 0.13);
  border-radius: 8px;
  padding: 14px;
  background: #f4fbf7;
}

.response-callout strong {
  color: var(--navy);
}

.response-callout span,
.file-rule-note {
  color: var(--muted);
  line-height: 1.4;
}

.file-rule-note {
  margin: -2px 0 0;
  font-size: 0.88rem;
}

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

.upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 1px dashed rgba(13, 27, 62, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-zone:hover {
  border-color: rgba(0, 128, 55, 0.4);
  background: #f4fbf7;
  transform: translateY(-1px);
}

.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

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

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(13, 27, 62, 0.14);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--navy);
  background: #f7fbf9;
}

.file-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(13, 27, 62, 0.38);
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1;
}

.file-pill-remove:hover {
  background: #c0322b;
}

.delay-btn {
  min-height: 44px;
  border: 1px solid rgba(13, 27, 62, 0.12);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.delay-btn:hover {
  border-color: rgba(255, 231, 0, 0.86);
  background: #fffbe8;
}

.dialog-detail {
  margin-top: 12px;
  border-top: 1px solid rgba(13, 27, 62, 0.08);
  padding-top: 12px;
  font-weight: 900;
}

.empty-documents-state {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(0, 128, 55, 0.18);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(135deg, #ffffff, #f4fbf7 64%, #fffbe6);
  box-shadow: var(--shadow-soft);
}

.empty-documents-state h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.empty-documents-state p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.completed-row em {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #008037;
  background: #f0faf4;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 900;
}

.completed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.completed-check {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #008037;
  background: #e8f7ee;
  box-shadow: 0 12px 24px rgba(0, 128, 55, 0.25);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

.completed-row.sent-stamped {
  position: relative;
  overflow: hidden;
  opacity: 0.82;
  filter: grayscale(0.18);
}

.sent-confirmation {
  display: inline-flex;
  width: fit-content;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
  border-radius: 999px;
  padding: 8px 13px;
  color: #fff;
  background: #008037;
  font-size: 0.92rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 128, 55, 0.22);
}

.sent-confirmation b {
  border-left: 1px solid rgba(255, 255, 255, 0.42);
  padding-left: 10px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.completed-row.under-review em {
  color: #5b4a00;
  background: #fff7bf;
}

.completed-row.needs-attention {
  border-color: rgba(190, 18, 60, 0.18);
  background: #fff8fa;
}

.completed-row.needs-attention em {
  color: #be123c;
  background: #ffe4ec;
}

.completed-row.accepted em {
  color: #fff;
  background: #008037;
}

@keyframes upload-guide-sweep {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes next-step-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: inset 0 0 0 1px rgba(0, 128, 55, 0.16), 0 0 0 0 rgba(0, 128, 55, 0);
  }

  50% {
    transform: scale(1.06);
    box-shadow: inset 0 0 0 1px rgba(0, 128, 55, 0.28), 0 0 0 10px rgba(0, 128, 55, 0.12);
  }
}

@keyframes current-card-glow {
  0%,
  100% {
    box-shadow: 0 18px 42px rgba(13, 27, 62, 0.1), 0 0 0 0 rgba(0, 128, 55, 0.12);
  }

  50% {
    box-shadow: 0 20px 46px rgba(13, 27, 62, 0.13), 0 0 0 7px rgba(0, 128, 55, 0.1);
  }
}

@keyframes current-card-heartbeat {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 18px 42px rgba(13, 27, 62, 0.1), 0 0 0 0 rgba(255, 231, 0, 0);
  }

  12% {
    transform: scale(1.012);
    box-shadow: 0 20px 48px rgba(13, 27, 62, 0.13), 0 0 0 6px rgba(255, 231, 0, 0.2);
  }

  22% {
    transform: scale(1);
    box-shadow: 0 18px 42px rgba(13, 27, 62, 0.1), 0 0 0 0 rgba(255, 231, 0, 0);
  }

  34% {
    transform: scale(1.018);
    box-shadow: 0 22px 52px rgba(13, 27, 62, 0.14), 0 0 0 9px rgba(255, 231, 0, 0.22);
  }

  48% {
    transform: scale(1);
    box-shadow: 0 18px 42px rgba(13, 27, 62, 0.1), 0 0 0 0 rgba(255, 231, 0, 0);
  }
}

@keyframes top-request-heartbeat {
  0%,
  100% {
    transform: scale(1);
    box-shadow: inset 4px 0 0 #008037, 0 0 0 0 rgba(255, 231, 0, 0);
  }

  18% {
    transform: scale(1.018);
    box-shadow: inset 4px 0 0 #008037, 0 0 0 9px rgba(255, 231, 0, 0.24);
  }

  36% {
    transform: scale(1);
    box-shadow: inset 4px 0 0 #008037, 0 0 0 0 rgba(255, 231, 0, 0);
  }
}

@keyframes send-button-breathe {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 14px 28px rgba(0, 128, 55, 0.22), 0 0 0 0 rgba(0, 128, 55, 0);
  }

  50% {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(0, 128, 55, 0.26), 0 0 0 8px rgba(0, 128, 55, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .needed-arrow,
  .send-pulse,
  .request-tabs button.active,
  .doc-card.current-request,
  .doc-card.current-request::after,
  .doc-card.current-request .upload-zone {
    animation: none;
  }
}

@media (max-width: 760px) {
  .documents-shell {
    width: min(100% - 28px, 1120px);
  }

  .view-mode-label {
    grid-template-columns: 1fr;
  }

  .view-mode-label nav {
    justify-content: flex-start;
  }

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

  .document-side-rail {
    position: static;
  }

  .document-focus-header {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .request-navigator-heading {
    align-items: start;
    flex-direction: column;
  }

  .focus-stage-row,
  .profile-current-grid {
    grid-template-columns: 1fr;
  }

  .stage-chip {
    width: fit-content;
  }

  .borrower-profile-panel summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .borrower-profile-panel summary span {
    grid-column: 1 / -1;
  }

  .profile-current-grid {
    display: grid;
  }

  .document-request-intro {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .needed-arrow,
  .send-documents-btn,
  .send-request-btn,
  .support-btn {
    width: 100%;
  }

  .request-send-panel {
    grid-template-columns: 1fr;
  }

  .sent-confirmation {
    font-size: 0.76rem;
  }

  .sent-confirmation b {
    border-left: 0;
    padding-left: 0;
    font-size: 0.72rem;
  }

  .suite-bridge-notice {
    grid-template-columns: 1fr;
  }

  .suite-bridge-chip {
    justify-self: start;
  }

  .file-snapshot,
  .snapshot-grid,
  .application-review-grid,
  .loan-detail-grid,
  .correction-grid,
  .action-guide-grid,
  .choice-grid,
  .contact-grid,
  .version-grid {
    grid-template-columns: 1fr;
  }

  .documents-hero {
    margin-bottom: 12px;
  }

  .document-status,
  .application-snapshot,
  .file-snapshot,
  .action-guide,
  .admin-copy-editor,
  .empty-documents-state,
  .doc-card.current-request {
    padding: 16px;
  }

  .loan-details-panel summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .loan-details-panel summary b,
  .loan-details-panel summary::after {
    justify-self: start;
  }

  .loan-details-panel summary b {
    white-space: normal;
  }

  .doc-card.current-request::after {
    position: static;
    width: fit-content;
    margin: 0 0 -2px 0;
    order: -1;
  }

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

  .snapshot-grid span,
  .action-guide-grid span {
    min-height: auto;
    place-items: start;
    text-align: left;
  }
}

/* ── Mobile: get the first request (the action) up the page + larger type.
   The hero and focus header compress hard on phones so an older borrower
   sees what to DO without scrolling two screens. ── */
@media (max-width: 760px) {
  html {
    font-size: 17.5px;
  }

  .documents-hero {
    padding: 18px 16px;
  }

  .documents-hero .brand-logo {
    width: 128px;
    margin-bottom: 8px;
  }

  .documents-hero h1 {
    font-size: 1.5rem;
  }

  .documents-hero .hero-subtitle {
    font-size: 0.92rem;
  }

  .documents-hero .signal-row {
    display: none;
  }

  .documents-hero .progress-card {
    padding: 12px 14px;
  }

  .document-focus-header {
    padding: 16px 14px;
  }

  .document-focus-header h2 {
    font-size: 1.28rem;
  }

  .document-focus-header .borrower-profile-panel {
    margin-top: 8px;
  }

  .request-navigator {
    padding: 12px 14px;
  }

  .document-request button,
  .document-request .upload-label,
  .document-status button {
    min-height: 48px;
  }

  .portal-welcome-card button {
    min-height: 54px;
    font-size: 1.08rem;
  }
}

@media (max-width: 760px) {
  .focus-stage-row {
    gap: 6px;
  }

  .focus-stage-row .eyebrow {
    margin-bottom: 0;
  }

  .focus-stage-row .stage-chip {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .document-focus-header .focus-copy > p {
    margin: 6px 0 8px;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .document-focus-header h2 {
    margin: 6px 0 0;
  }

  .borrower-profile-panel summary {
    padding: 8px 10px;
  }

  .borrower-profile-panel {
    margin-top: 6px;
  }
}

@media (max-width: 760px) {
  /* the subtitle and progress card repeat what the focus header + navigator
     already say — on a phone that space belongs to the actual request */
  .documents-hero .hero-subtitle,
  .documents-hero .progress-card {
    display: none;
  }

  .documents-hero {
    padding: 14px 16px;
  }

  .documents-hero .brand-logo {
    width: 108px;
    margin-bottom: 4px;
  }

  .documents-hero .eyebrow {
    margin-bottom: 2px;
  }

  .documents-hero h1 {
    font-size: 1.3rem;
  }

  .focus-copy {
    gap: 6px;
  }
}

/* big confirmation banner after an upload/update is sent */
.portal-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  max-width: min(92vw, 520px);
  border-radius: 14px;
  padding: 16px 20px;
  background: #0d5c2e;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.portal-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.portal-toast-warning {
  background: #7a4a00;
}

.portal-toast-error {
  background: #7a1f1f;
}

.sync-warning {
  display: block;
  margin-top: 6px;
  color: #be123c;
  background: #ffe4ec;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  font-style: normal;
  width: fit-content;
}

.alt-upload-notice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7e6;
  border: 1px solid rgba(180, 120, 0, 0.28);
}

.alt-upload-notice strong {
  color: #7a4a00;
  font-size: 0.95rem;
}

.alt-upload-notice span {
  color: #5b4a00;
  font-size: 0.88rem;
  line-height: 1.4;
}

.alt-upload-notice a {
  display: inline-flex;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #7a4a00;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
}

/* ── Mobile polish: centered top controls + de-crowded request list.
   The active item's pulse animation and chip shadows were bleeding onto the
   cards below it, printing text over text — on phones the list becomes calm
   stacked cards with centered titles and no overlap. ── */
@media (max-width: 760px) {
  .admin-return-link,
  .cross-nav-link {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .view-mode-label nav {
    justify-content: center;
  }

  .documents-hero .hero-copy {
    text-align: center;
  }

  .documents-hero .brand-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .request-navigator-heading {
    display: block;
    text-align: center;
  }

  .request-navigator-heading span {
    display: inline-block;
    margin-top: 8px;
  }

  .request-tabs {
    max-height: none;
    overflow: visible;
    grid-template-columns: 1fr;
  }

  .request-tabs button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-height: 0;
    padding: 14px 12px;
    text-align: center;
  }

  .request-tabs button.active {
    animation: none;
    box-shadow: inset 0 0 0 2px #008037;
  }

  .request-tabs strong {
    grid-row: auto;
  }

  .request-tabs span {
    font-size: 1.02rem;
    line-height: 1.35;
    font-weight: 800;
  }

  .request-tabs em {
    box-shadow: none;
  }

  .request-tabs small {
    grid-column: auto;
  }

  .suite-bridge-notice {
    display: block;
  }

  .suite-bridge-notice > div {
    margin-bottom: 10px;
  }

  .suite-bridge-chip {
    display: inline-block;
    justify-self: auto;
  }

  .doc-card h3 {
    text-align: center;
    font-size: 1.22rem;
    line-height: 1.3;
  }

  .doc-meta {
    justify-content: center;
  }

  .document-focus-header h2,
  .document-focus-header .focus-copy > p {
    text-align: center;
  }

  .focus-stage-row {
    justify-content: center;
  }
}

/* ── Readability: balanced titles + bulleted descriptions ──
   text-wrap: balance evens the line lengths on wrapped headings (no more
   one-word-per-line staircases); .reason-list is the quick-scan bullet
   version of long condition descriptions. */
.doc-card h3,
.request-tabs span,
.request-navigator-heading h2,
.document-focus-header h2 {
  text-wrap: balance;
}

.reason-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 1.15em;
  text-align: left;
}

.reason-list li {
  line-height: 1.5;
}

@media (max-width: 760px) {
  /* the big number badge ate 52px of a ~300px card — the list on top already
     numbers the requests, so the title gets the full width instead */
  .doc-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .doc-number {
    display: none;
  }

  .doc-card h3 {
    font-size: 1.12rem;
    line-height: 1.32;
  }

  .reason,
  .format {
    text-align: left;
  }
}

/* Title cleanup on phones: the current-request title reserved a 92px right
   gutter for the floating "Start here" pill (which sits above the chips on
   small screens anyway) and was centered — both made it wrap in a ragged
   staircase. Full width + left-aligned + balanced = clean block, matching
   the bullets below it. */
@media (max-width: 760px) {
  .doc-card.current-request h3 {
    padding-right: 0;
    font-size: 1.1rem;
  }

  .doc-card h3 {
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .doc-card .doc-meta {
    justify-content: flex-start;
  }
}
