body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    padding: 16px;
    background: #fafafa;
  }

.error-page {
  min-height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.error-page-card {
  width: min(560px, 100%);
  padding: 36px 32px;
  border: 1px solid #dbe2ea;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.error-page-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 32px;
  padding: 0 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.error-page-title {
  margin: 0 0 12px;
  color: #111827;
  font-size: 32px;
  line-height: 1.1;
}

.error-page-message {
  margin: 0 auto;
  max-width: 420px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.6;
}

.error-page-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.logout-form {
  margin: 0;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.user-menu[open] .user-menu-trigger,
.user-menu-trigger:hover {
  background: #1e293b;
  border-color: #94a3b8;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 240px;
  padding: 8px;
  border: 1px solid #dbe3f4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 6px;
  z-index: 60;
}

.user-menu-identity {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.user-menu-name {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.user-menu-email {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.user-menu-action {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
}

.user-menu-action:hover {
  background: #f8fafc;
  color: #0f172a;
}

.mail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  text-decoration: none;
  color: #4338ca;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.mail-link svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.mail-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fafafa;
}

.mail-link:hover {
  background: rgba(67, 56, 202, 0.08);
  color: #4338ca;
  transform: translateY(-1px);
}

.mail-link.active {
  background: #4338ca;
  color: #ffffff;
}

.settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  text-decoration: none;
  color: #4338ca;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.settings-link svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.settings-link:hover {
  background: rgba(67, 56, 202, 0.08);
  color: #4338ca;
  transform: translateY(-1px);
}

.settings-link.active {
  background: #4338ca;
  color: #ffffff;
}

.letters-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  text-decoration: none;
  color: #4338ca;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.letters-link svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.letters-link:hover {
  background: rgba(67, 56, 202, 0.08);
  color: #4338ca;
  transform: translateY(-1px);
}

.letters-link.active {
  background: #4338ca;
  color: #ffffff;
}

.activity-page,
.activity-report-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.activity-page,
.audit-page {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0 0 36px;
}

.activity-page-header {
  align-items: flex-start;
  gap: 16px;
}

.activity-page-header .page-subtitle {
  max-width: 820px;
}

.activity-report-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.activity-report-logo {
  width: 84px;
  height: auto;
  object-fit: contain;
}

.activity-report-brand-name {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-table th,
.activity-table td {
  vertical-align: top;
}

.activity-time-cell {
  white-space: nowrap;
  min-width: 196px;
}

.activity-kind-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.activity-kind-status {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.activity-kind-uploads {
  border-color: #bae6fd;
  background: #ecfeff;
  color: #0f766e;
}

.activity-kind-documents {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.activity-kind-package {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.activity-kind-emails {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.activity-kind-admin {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #475569;
}

.activity-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.activity-report-stat {
  padding: 18px 20px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-report-stat .label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-report-stat strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
}

.activity-report-stat small {
  color: #64748b;
  line-height: 1.5;
}

.activity-report-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-report-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-report-preset {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #dbe2ea;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.activity-report-preset.active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.activity-report-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.activity-report-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.activity-report-panel {
  padding: 18px 20px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
}

.activity-report-panel-wide {
  grid-column: span 1;
}

.activity-report-panel h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 16px;
}

.activity-report-kv-list,
.activity-report-checkpoint-list,
.activity-report-requirements,
.activity-report-table-lite {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-report-kv-row,
.activity-report-checkpoint,
.activity-report-requirement,
.activity-report-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f8fafc;
}

.activity-report-checkpoint,
.activity-report-requirement,
.activity-report-table-row-files {
  align-items: flex-start;
}

.activity-report-checkpoint-main,
.activity-report-requirement-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-report-checkpoint strong,
.activity-report-requirement strong,
.activity-report-kv-row strong,
.activity-report-readiness strong {
  color: #0f172a;
}

.activity-report-checkpoint small,
.activity-report-requirement small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}

.activity-report-readiness {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.activity-readiness-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.activity-readiness-badge.ok {
  background: #f0fdf4;
  color: #15803d;
}

.activity-readiness-badge.warn {
  background: #fffbeb;
  color: #b45309;
}

.activity-readiness-badge.error {
  background: #fef2f2;
  color: #b91c1c;
}

.activity-report-empty {
  color: #64748b;
  padding: 8px 0;
}

@media (max-width: 1080px) {
  .activity-report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-report-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .activity-report-summary-grid {
    grid-template-columns: 1fr;
  }

  .activity-time-cell {
    min-width: 156px;
  }
}

.sos-contact-card input[type="checkbox"] {
  width: 16px !important;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.sos-contact-body {
  display: grid;
  gap: 4px;
}

  /* Related Properties Styling */
  .related-properties-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
  }

  /* Linked lead properties (lead detail page) - scroll container */
  .linked-properties-container {
    max-height: min(520px, 60vh);
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
  }

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

  .linked-properties-container .properties-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
  }

  .linked-properties-empty,
  .linked-properties-loading {
    padding: 10px 12px;
  }

  /* Claim properties split panels */
  .claim-properties-panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    margin-top: 12px;
    overflow: hidden;
  }

  .claim-properties-summary {
    cursor: pointer;
    padding: 12px 14px;
    background: #f9fafb;
    font-weight: 600;
    color: #111827;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .claim-properties-summary::-webkit-details-marker {
    display: none;
  }

  .claim-collapsible-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    color: #4b5563;
    transition: transform 0.15s ease;
  }

  .claim-collapsible-panel[open] .claim-collapsible-icon {
    transform: rotate(90deg);
  }

  .claim-properties-body {
    padding: 12px 14px;
  }

  .claim-prop-action-btn {
    min-width: 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
  }

  .claim-prop-action-icon {
    font-size: 16px;
  }

  .btn.btn-ghost.claim-prop-add-btn {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
  }

  .btn.btn-ghost.claim-prop-add-btn:hover {
    background: #bbf7d0;
  }

  .btn.btn-ghost.claim-prop-remove-btn {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
  }

  .btn.btn-ghost.claim-prop-remove-btn:hover {
    background: #fecaca;
  }

  .claim-validation-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #111827;
  }

  .table-sort-btn {
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .table-sort-btn .sort-indicator {
    font-size: 10px;
    color: #6b7280;
  }

  .related-properties-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }

  .related-properties-table thead th {
    text-align: left;
    padding: 10px 8px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .related-properties-table tbody tr.property-row {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
  }

  .related-properties-table tbody tr.property-row:hover {
    background-color: #f9fafb;
  }

  .related-properties-table tbody td {
    padding: 10px 8px;
    vertical-align: middle;
  }

  .related-properties-table tbody td code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  }

  /* Smaller checkboxes for property selection */
  .property-checkbox-small {
    width: 16px !important;
    height: 16px !important;
    cursor: pointer;
    accent-color: #3b82f6;
  }

  .property-checkbox-small:checked {
    accent-color: #3b82f6;
  }

  /* Link Related Properties button styling */
  #add-property-btn {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    margin-bottom: 8px;
  }

  #add-property-btn:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
  }

  #add-property-btn:active {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
  }

/* Entity intel container */
#entity-intel-result {
  max-width: none;
  margin: 0 0 20px;
  width: 100%;
  box-sizing: border-box;
}

#agent-intel-result {
  max-width: none;
  margin: 0 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Contacts Section styles */
.contacts-section {
  margin: 24px 0;
}

.contacts-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.contact-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.2s ease;
}

.contact-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.contact-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.contact-details {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.contact-details > div {
  margin-bottom: 8px;
}

.contact-details strong {
  color: #111827;
  font-weight: 600;
}

.contact-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}

.contact-source {
  color: #6b7280;
}

.priority-rank {
  color: #6b7280;
}

.contacts-note {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.role-bucket-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #dbeafe;
  color: #1e40af;
}

/* Recommendations Section styles */
.recommendations-card {
  margin: 24px 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
}

.recommendations-card h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.recommendations-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.no-web-presence-notice {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 16px;
}

.no-web-presence-notice strong {
  display: block;
  margin-bottom: 8px;
  color: #856404;
  font-size: 14px;
}

.no-web-presence-notice p {
  margin: 8px 0 0 0;
  color: #856404;
  font-size: 13px;
  line-height: 1.5;
}

.actionable-contact-status {
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.actionable-contact-status strong {
  color: #111827;
  font-weight: 600;
  margin-right: 8px;
}

.actionable-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.actionable-yes {
  background: #d1fae5;
  color: #065f46;
}

.actionable-no {
  background: #fee2e2;
  color: #991b1b;
}

.template-category {
  padding: 10px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 14px;
}

.template-category strong {
  color: #111827;
  font-weight: 600;
  margin-right: 8px;
}

.communication-notes {
  padding: 12px;
  background: #f0f9ff;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.communication-notes strong {
  color: #111827;
  font-weight: 600;
  margin-right: 8px;
}

.enrichment-needs {
  padding: 12px;
  background: #fef3c7;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
}

.enrichment-needs h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
}

.enrichment-needs ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: #78350f;
}

.enrichment-needs li {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.missing-data {
  padding: 12px;
  background: #fee2e2;
  border-radius: 6px;
  border-left: 3px solid #ef4444;
}

.missing-data h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #991b1b;
}

.missing-data ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: #7f1d1d;
}

.missing-data li {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.no-action-needed {
  padding: 12px;
  background: #f0fdf4;
  border-radius: 6px;
  border: 1px solid #86efac;
  text-align: center;
}

.no-action-needed p {
  margin: 0;
  color: #166534;
  font-size: 14px;
}

  /* Owner name styling - consistent across the app */
  .owner-name {
    font-weight: 600;
    color: #1e40af;
    background: rgba(59, 130, 246, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    font-size: 14px;
  }

  /* Property detail button in properties table */
  .property-detail-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
  }

  .property-detail-btn:hover {
    background-color: #f3f4f6;
    color: #3b82f6;
  }

  .property-detail-btn:active {
    background-color: #e5e7eb;
  }

  .property-detail-btn svg {
    width: 16px;
    height: 16px;
  }

  .modal {
    position: fixed;
    inset: 0;
    background: rgba(32, 33, 36, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
    padding: 20px;
  }

.modal .modal-content {
  background: linear-gradient(145deg, #ffffff, #f5f7fb);
  border-radius: 18px;
  box-shadow:
    0 20px 50px rgba(30, 41, 59, 0.18),
    0 4px 12px rgba(30, 41, 59, 0.12);
  width: min(1200px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.12);
  background: rgba(248, 250, 252, 0.8);
  flex-shrink: 0;
}

.modal .modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.modal .modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modal .modal-body .confirm-modal-message,
.modal .modal-body .error-modal-list {
  margin: 0;
}

.modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(30, 41, 59, 0.08);
  background: rgba(248, 250, 252, 0.5);
  flex-shrink: 0;
}

/* Success variant for info modal (e.g. "Saved", "Created", "Updated") */
.modal .modal-content--success .modal-header {
  background: rgba(240, 253, 244, 0.9);
  border-bottom-color: rgba(34, 197, 94, 0.25);
}

.modal .modal-content--success .modal-header h3 {
  color: #15803d;
  font-weight: 600;
}

.modal .modal-content--success .modal-body {
  color: #166534;
}

#blocking-modal .modal-content {
  padding: 24px;
}

.blocking-modal-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(30, 41, 59, 0.15);
  border-top-color: rgba(30, 41, 59, 0.55);
  border-radius: 999px;
  margin: 0 auto 12px;
  animation: blocking-spin 0.9s linear infinite;
}

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

  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 18px;
    box-shadow:
      0 12px 28px rgba(99, 102, 241, 0.18),
      0 4px 10px rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
  }

  .brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #312e81;
  }

  .top-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    color: #4338ca;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  }

  .nav-link:hover {
    background: rgba(99, 102, 241, 0.15);
  }

  .nav-link.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  .icon-button {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #4b5563;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  }

  .icon-button span {
    line-height: 1;
  }

  .icon-button:hover {
    background: rgba(249, 250, 251, 0.9);
    transform: translateY(-1px);
  }

  .icon-button.danger {
    border-color: rgba(220, 38, 38, 0.25);
  }

  .icon-button.danger svg {
    width: 25px;
    height: 25px;
  }

  .icon-button.danger:hover {
    background: rgba(254, 226, 226, 0.7);
  }
  
  table {
    border-collapse: collapse;
    width: 100%;
  }
  
  th, td {
    padding: 6px 10px;
    border: 1px solid #dcdcdc;
    text-align: left;
  }

  .page {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .page-with-sidebar {
    display: flex;
    align-items: flex-start;
    position: relative;
  }

  .filter-toggle-btn {
    position: absolute;
    left: 0;
    top: -5px;
    z-index: 101;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #6366f1;
  }

  .filter-toggle-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
  }

  .filter-toggle-btn:active {
    transform: scale(0.95);
  }

  .filter-icon {
    transition: transform 0.3s ease;
  }

  .filter-toggle-btn.collapsed .filter-icon {
    transform: rotate(180deg);
  }

  .filters-sidebar {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
    margin-top: 40px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    transition: all 0.3s ease;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .filters-sidebar.collapsed {
    flex: 0 0 0;
    width: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
    overflow: hidden;
  }

  .filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
  }

  .filters-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
  }

  .filter-group {
    margin-bottom: 20px;
  }

  .filter-advanced {
    margin-bottom: 20px;
  }

  .filter-advanced-summary {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    margin-bottom: 12px;
    list-style: none;
  }

  .filter-advanced-summary::-webkit-details-marker {
    display: none;
  }

  .filter-advanced-summary::after {
    content: '▾';
    float: right;
    color: #6b7280;
  }

  .filter-advanced[open] .filter-advanced-summary::after {
    content: '▴';
  }

  .filter-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .filter-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .filter-select,
  .filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
  }

  .filter-select:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
    font-size: 14px;
    background: #fff;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .filter-select:focus,
  .filter-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }

  .filter-input {
    appearance: textfield;
    -moz-appearance: textfield;
  }

  .filter-input::-webkit-outer-spin-button,
  .filter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  .page-content {
    flex: 1;
    min-width: 0;
    transition: margin-left 0.3s ease;
  }

  .page-content .page {
    gap: 24px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }

  .btn-block {
    width: 100%;
  }

  .page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .page-header .page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .page-header .page-subtitle {
    margin: 0 0 0 50px;
    color: #64748b;
    font-size: 14px;
  }

  .leads-header-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .page-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .page-total-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-left: 45px;
    padding: 0 16px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  .leads-header-copy .page-subtitle {
    margin-left: 45px;
  }

  .owner-type-segment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
  }

  .owner-type-segment-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }

  .owner-type-segment-link:hover {
    background: #eef2ff;
    color: #1e3a8a;
  }

  .owner-type-segment-link.is-active {
    background: #111827;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  }

  .page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .page-actions-gap-lg {
    gap: 12px;
  }

  .inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .text-muted-small {
    font-size: 12px;
  }

  .text-muted-label {
    font-size: 13px;
  }

  .empty-state-padding {
    padding: 16px;
  }

  .page-content-full-width {
    width: 100%;
  }

  .table-empty-state {
    text-align: center;
    padding: 20px;
  }

  .bulk-actions-bar-hidden {
    display: none;
  }

  .task-popup {
    display: none;
  }

  .task-popup-hidden {
    display: none;
  }

  .task-section-hidden {
    display: none;
  }

  .task-empty-hidden {
    display: none;
  }

  /* Lead Form Styles */
  .btn-disabled {
    opacity: 0.5;
    pointer-events: none;
  }

  .action-cluster-gap {
    gap: 8px;
  }

  .lead-claims-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }

  .lead-claims-assignment-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .lead-claims-assignment-form label {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
  }

  .lead-claims-assignment-form select {
    min-width: 240px;
    width: min(340px, 100%);
    max-width: 340px;
    min-height: 36px;
  }

  .btn-margin-bottom {
    margin-bottom: 8px;
  }

  .svg-inline {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
  }

  .primary-property-row {
    font-weight: bold;
    background-color: #f0f8ff;
  }

  .table-cell-center {
    width: 40px;
    text-align: center;
  }

  .text-muted-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    font-size: 16px;
  }

  .btn-icon-only {
    border: none;
    background: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 16px;
  }

  .modal-hidden {
    display: none;
  }

  .modal-loading-center {
    text-align: center;
    padding: 20px;
  }

  .modal-content-hidden {
    display: none;
  }

  .modal-margin-bottom {
    margin-bottom: 16px;
  }

  .checkbox-label-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }

  .checkbox-label-flex input[type="checkbox"] {
    width: auto;
    flex: 0 0 auto;
  }

  .checkbox-cursor {
    cursor: pointer;
  }

  .modal-errors {
    color: #dc2626;
    margin-top: 12px;
    display: none;
  }

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

  .form-inline {
    display: inline;
  }

.token-filter-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.token-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.token-filter-grid {
  align-items: center;
}

.token-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  flex: 1 1 auto;
  min-width: 240px;
}

.token-filter-options {
  display: flex;
  gap: 8px;
  align-items: center;
}

.token-filter-options .checkbox-label-flex {
  margin-top: 0;
}

.token-filter-actions {
  margin-top: 4px;
}

.token-filter-actions-inline {
  margin-top: 0;
  flex: 0 0 auto;
  align-self: center;
}

.token-filter-order {
  margin-top: 4px;
}

.related-properties-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-properties-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.related-properties-options .checkbox-label-flex {
  margin-top: 0;
}

.related-properties-modal .token-filter-list {
  max-height: 160px;
  overflow: auto;
}

.related-properties-modal > .modal-content {
  box-sizing: border-box;
  gap: 16px;
  padding: 24px;
}

.related-properties-modal > .modal-content > h2 {
  margin: 0;
}

.related-properties-modal #modal-content {
  overflow: auto;
  padding-right: 2px;
}

.related-properties-select-row {
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .related-properties-modal > .modal-content {
    padding: 16px;
  }

  .related-properties-modal > .modal-content > h2 {
    font-size: 1.25rem;
  }
}

  .card-margin-top {
    margin-top: 24px;
  }

  .section-margin-bottom {
    margin-bottom: 12px;
  }

  .table-header-border {
    border-bottom: 1px solid #e5e7eb;
  }

  .table-header-cell {
    text-align: left;
    padding: 8px;
    width: 40px;
  }

  .table-row-border {
    border-bottom: 1px solid #f3f4f6;
  }

  .table-cell-padding {
    padding: 8px;
  }

  .text-muted-info {
    margin-top: 12px;
    color: #6b7280;
    font-size: 13px;
  }

  .page-actions input[type="text"] {
    min-width: 220px;
  }

  .search-form-inline {
    display: flex;
    align-items: center;
  }

  .search-input-group {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
  }

  .search-input-group .search-input {
    border: none;
    padding: 8px 12px;
    min-width: 200px;
    font-size: 14px;
    outline: none;
  }

.search-input-group .search-input + .search-input {
  border-left: 1px solid #e5e7eb;
}

.search-input-group .email-thread-read-filter {
  align-self: stretch;
  border: none;
  border-left: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 14px;
  padding: 0 30px 0 10px;
  outline: none;
}

  .search-input-group .search-input-exact {
    min-width: 140px;
  }

  .search-input-group .search-clear-btn {
    flex: 0 0 auto;
    border: none;
    border-left: 1px solid #e5e7eb;
    background: transparent;
    padding: 4px 10px;
    font-size: 18px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    margin: 0;
  }

  .search-input-group .search-clear-btn:hover {
    color: #4b5563;
    background: #f3f4f6;
  }

  .search-input-group .search-button {
    border: none;
    border-left: 1px solid #d1d5db;
    border-radius: 0;
    padding: 8px 12px;
    margin: 0;
    min-width: 42px;
  }

  .search-input-group .search-reset-button {
    border: none;
    border-left: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 8px 12px;
    margin: 0;
    min-width: 42px;
  }

  .search-input-group .search-action-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex: 0 0 auto;
  }

  .search-input-group:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }

  .card {
    background: linear-gradient(145deg, #ffffff, #f5f7fb);
    border-radius: 18px;
    box-shadow:
      0 18px 30px rgba(30, 41, 59, 0.12),
      0 6px 12px rgba(30, 41, 59, 0.08);
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.2);
  }

  .card header,
  .lead-section header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
  }

  .card h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 20px;
    color: #111827;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .owner-type-pill,
  .owner-status-pill {
    text-transform: none;
    letter-spacing: 0;
  }

  .owner-type-pill-business {
    background: rgba(30, 64, 175, 0.12);
    color: #1d4ed8;
  }

  .owner-type-pill-individual {
    background: rgba(14, 116, 144, 0.12);
    color: #0f766e;
  }

  .owner-status-pill-business {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
  }

  .owner-status-pill-individual {
    background: rgba(190, 24, 93, 0.12);
    color: #be185d;
  }

  .readonly-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    font-weight: 500;
    font-size: 11px;
    margin-left: 8px;
    text-transform: none;
    letter-spacing: 0;
  }

  .ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s ease;
  }

  .ghost-link:hover {
    background: rgba(99, 102, 241, 0.2);
  }

  .pager {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }

  .pager-info {
    color: #64748b;
    font-size: 13px;
  }

  .pager-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .pager-page-link {
    min-width: 34px;
    justify-content: center;
    padding: 6px 10px;
  }

  .pager-page-link.is-active {
    background: #4338ca;
    color: #ffffff;
  }

  .lead-overview {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .owner-metadata {
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }

  .owner-meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }

  .owner-metadata select,
  .owner-metadata input {
    width: 100%;
  }

  .owner-metadata [data-owner-section="business"],
  .owner-metadata [data-owner-section="individual"] {
    transition: opacity 0.2s ease;
  }

  .grid.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }

  .grid.street-secondary {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 16px;
  }

  .btn-inline {
    white-space: nowrap;
  }

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
  }

  label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
  }

  input,
  select,
  textarea {
    width: 100%;
    padding: 6px 10px;
    min-height: 36px;
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .filters-sidebar .filter-controls-multi .filter-select[multiple] option {
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1.4;
  }

  .filter-dropdown {
    width: 100%;
  }

  .filter-dropdown-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    user-select: none;
  }

  .filter-dropdown-summary::-webkit-details-marker {
    display: none;
  }

  .filter-dropdown-summary::after {
    content: "▾";
    color: #64748b;
    font-size: 12px;
    flex-shrink: 0;
  }

  .filter-dropdown[open] .filter-dropdown-summary::after {
    content: "▴";
  }

  .filter-dropdown-label {
    font-weight: 600;
    color: #334155;
  }

  .filter-dropdown-value {
    color: #64748b;
    font-size: 13px;
    margin-left: auto;
    text-align: right;
  }

  .filter-checkbox-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    max-height: 240px;
    overflow-y: auto;
  }

  .filter-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
  }

  .filter-checkbox-option input[type="checkbox"] {
    width: auto;
    min-height: auto;
    margin: 0;
    flex-shrink: 0;
  }

  input:focus,
  select:focus,
  textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  }

  input:disabled,
  select:disabled,
  textarea:disabled,
  input[readonly],
  select[readonly],
  textarea[readonly] {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.8;
  }

  select:disabled {
    background-image: none;
  }

  select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6366f1 50%), linear-gradient(135deg, #6366f1 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
  }

  .letters-counts {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .letters-filter-select {
    padding-right: 32px;
    min-width: 150px;
  }

  .letters-pill-muted {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
  }

  .letters-table .letters-select-cell {
    width: 44px;
    text-align: center;
  }

  .letters-table .letters-select {
    width: 16px;
    height: 16px;
  }

  .letters-table input[type="checkbox"].letters-select,
  #letters-select-all {
    min-height: 18px;
    padding: 0;
  }

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

  .letters-table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .letters-print-btn {
    position: relative;
    padding-right: 46px;
  }

  .letters-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-sizing: border-box;
  }

  .letters-modal[data-variant="error"] .letters-modal-message {
    color: #b91c1c;
  }

  .letters-modal[data-variant="warning"] .letters-modal-message {
    color: #b45309;
  }

  .letters-modal-message {
    font-size: 14px;
    line-height: 1.5;
  }

  .letters-modal-list {
    margin: 0;
    padding-left: 18px;
  }

  .letters-modal-list li {
    margin-bottom: 6px;
  }

  #claim-status-select {
    width: auto;
    min-width: 180px;
    padding: 6px 32px 6px 12px;
  }

  #claim-status-update:empty {
    display: none;
  }

  #claim-status-update {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
  }

  #claim-status-update.text-success {
    color: #059669;
    background-color: #d1fae5;
  }

  #claim-status-update.text-danger {
    color: #dc2626;
    background-color: #fee2e2;
  }

  #claim-status-update.text-muted {
    color: #6b7280;
  }

  /* Claim Package Section Styling */
  .claim-package-section {
    padding: 16px 0;
  }

  .claim-package-section:first-child {
    padding-top: 0;
  }

  .claim-package-section:last-child {
    padding-bottom: 0;
  }

  .claim-package-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 8px 0;
  }

  .claim-document-workflow-card .section-content {
    padding-top: 14px;
  }

  .claim-document-workflow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
    align-items: start;
  }

  .claim-document-workflow-column {
    min-width: 0;
    display: grid;
    gap: 14px;
  }

  .claim-document-workflow-card .claim-package-section,
  .claim-document-workflow-card .claim-client-uploads-panel {
    margin-top: 0;
    padding: 16px;
    border: 1px solid #dbe3f4;
    border-radius: 10px;
    background: #ffffff;
  }

  .claim-document-workflow-card .claim-secure-upload-email-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

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

  .claim-checklist li {
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background-color: #f9fafb;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    display: block;
  }

  .claim-checklist-item-content {
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  .claim-checklist-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
  }

  .claim-checklist-icon {
    font-size: 14px;
    font-weight: 700;
  }

  .claim-checklist-files {
    display: grid;
    gap: 6px;
    padding-left: 22px;
  }

  .claim-checklist-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    border: 1px solid #dbe3f4;
    border-radius: 6px;
    background: #ffffff;
  }

  .claim-checklist-file-name {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
  }

  .claim-checklist-file-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
  }

  .claim-checklist li.text-success {
    border-left-color: #10b981;
    background-color: #ecfdf5;
  }

  .claim-checklist li.text-success span:first-child {
    color: #10b981;
  }

  .claim-checklist li.text-danger {
    border-left-color: #ef4444;
    background-color: #fef2f2;
  }

  .claim-checklist li.text-danger span:first-child {
    color: #ef4444;
  }

  .claim-checklist li.text-optional {
    border-left-color: #3b82f6;
    background-color: #eff6ff;
  }

  .claim-checklist li.text-optional span:first-child {
    color: #3b82f6;
  }

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

  .claim-file-list li {
    padding: 12px;
    margin: 6px 0;
    border-radius: 6px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
  }

  .claim-file-list li > div {
    flex: 1;
    min-width: 0;
  }

  .claim-file-list li:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
  }

  .claim-file-list li.text-muted {
    background-color: transparent;
    border: none;
    padding: 12px;
    color: #9ca3af;
    font-style: italic;
  }

  textarea {
    resize: vertical;
    min-height: 90px;
    padding-top: 8px;
  }

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

/* Claim detail layout cleanups */
.claim-page {
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(191, 219, 254, 0.28), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #f7f8fb 42%, #ffffff 100%);
}

.claim-page .card {
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.claim-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.claim-inline-meta {
  margin-top: 4px;
}

/* Claim Summary section styling - consistent with Client Information and Claim Details */
#claim-detail .label,
.claim-overview-stat .label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

.claim-overview-card {
  overflow: hidden;
  border: 1px solid #d9e5f5;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
}

.claim-overview-content {
  display: grid;
  gap: 8px;
}

.claim-overview-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 26px;
  margin-bottom: 24px;
}

.claim-overview-intro h2 {
  margin: 6px 0 10px;
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 720px;
  overflow-wrap: anywhere;
  color: #0f172a;
}

.claim-overview-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.claim-overview-subtitle {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.claim-overview-subtitle a {
  color: #2563eb;
  text-decoration: none;
}

.claim-overview-subtitle a:hover {
  text-decoration: underline;
}

.claim-overview-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.claim-overview-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #d5e3f6;
  background: rgba(248, 251, 255, 0.92);
  color: #3b4b63;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.claim-overview-status-card {
  min-width: 320px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(244, 248, 255, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
  border: 1px solid #d7e4f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.claim-overview-status-card .claim-status-row {
  flex-direction: column;
  align-items: stretch;
}

.claim-overview-status-card .claim-status-label {
  justify-content: space-between;
}

.claim-overview-status-card .claim-status-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
}

.claim-overview-status-card .claim-status-actions > label,
.claim-overview-status-card .claim-status-actions > .claim-status-message {
  grid-column: 1 / -1;
}

.claim-overview-status-card .claim-status-actions > label {
  margin-bottom: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #516173;
}

.claim-overview-status-card #claim-status-select {
  min-width: 0;
  width: 100%;
  background: #ffffff;
}

.claim-overview-status-card #claim-status-btn {
  min-width: 78px;
}

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

.claim-overview-stat {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
  border: 1px solid #d8e3f1;
  min-height: 118px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 24px rgba(148, 163, 184, 0.08);
}

.claim-overview-stat-tint {
  background: linear-gradient(180deg, #f2f7ff 0%, #ffffff 100%);
  border-color: #d2e0f4;
}

.claim-overview-stat strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  color: #111827;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.claim-overview-stat strong a {
  color: #1d4ed8;
  text-decoration: none;
}

.claim-overview-stat small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  line-height: 1.45;
}

.claim-overview-stat-meta {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: #66758a;
  font-size: 12.5px;
  line-height: 1.45;
}

.claim-overview-stat-featured {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #e9f3ff 0%, #ffffff 100%);
  border-color: #bfd8fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 12px 28px rgba(96, 165, 250, 0.14);
}

.claim-overview-stat-featured strong {
  font-size: 30px;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.claim-overview-kpi-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(96px, 0.75fr);
  gap: 14px;
  align-items: end;
}

.claim-overview-kpi {
  min-width: 0;
  padding-right: 10px;
}

.claim-overview-kpi + .claim-overview-kpi {
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  padding-left: 14px;
  padding-right: 0;
}

.claim-overview-kpi:first-child strong {
  white-space: nowrap;
}

.claim-overview-kpi small {
  margin-top: 6px;
  color: #5f6f84;
}

.claim-path-value {
  word-break: break-word;
}

.claim-phase-board {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.claim-post-submission-section {
  margin-top: 18px;
  width: 62%;
  max-width: 760px;
  border: 1px solid #e5e7eb;
}

.claim-post-submission-header {
  padding: 22px 22px 0;
}

.claim-post-submission-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.claim-post-submission-list {
  display: grid;
  gap: 12px;
}

.claim-post-submission-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.claim-post-submission-item-from_agency {
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
  border-color: #fcd9a5;
}

.claim-post-submission-item-to_client {
  background: linear-gradient(180deg, #f3f8ff 0%, #ffffff 100%);
  border-color: #c7ddff;
}

.claim-post-submission-item-to_agency {
  background: linear-gradient(180deg, #f1fbf7 0%, #ffffff 100%);
  border-color: #bde7d3;
}

.claim-post-submission-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.claim-post-submission-item-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.claim-post-submission-item-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  color: #111827;
}

.claim-post-submission-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.claim-post-submission-chip-from_agency {
  background: #fff1d6;
  color: #9a5b00;
}

.claim-post-submission-chip-to_client {
  background: #e1efff;
  color: #1d4ed8;
}

.claim-post-submission-chip-to_agency {
  background: #ddf4e8;
  color: #0f766e;
}

.claim-post-submission-thread-link {
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
  white-space: nowrap;
}

.claim-post-submission-item-meta {
  margin-top: 6px;
  color: #6b7280;
  font-size: 12px;
}

.claim-post-submission-item-detail {
  margin-top: 6px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.45;
}

.claim-phase-card {
  position: relative;
  padding: 22px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.claim-phase-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: #94a3b8;
}

.claim-phase-preparation::before {
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.claim-phase-submission::before {
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 100%);
}

.claim-phase-completion::before {
  background: linear-gradient(90deg, #0f766e 0%, #2dd4bf 100%);
}

.claim-phase-header h3 {
  margin: 6px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.claim-phase-kicker {
  font-size: 12px;
  font-weight: 700;
  padding-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
}

.claim-phase-primary {
  margin-top: 20px;
}

.claim-phase-primary .btn,
.claim-phase-actions .btn {
  width: 100%;
}

.claim-phase-complete-btn.btn,
.claim-phase-complete-btn.btn:disabled,
.claim-phase-complete-btn.btn[disabled] {
  width: 100%;
  justify-content: center;
  border: 1px solid #fed7aa;
  background: #fff7ed !important;
  color: #9a3412 !important;
  box-shadow: none;
  opacity: 1;
  cursor: default;
}

.claim-phase-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.claim-manifest-status {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.claim-manifest-status:empty {
  display: none;
}

.claim-manifest-status-ready {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.claim-manifest-status-missing,
.claim-manifest-status-stale {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.claim-manifest-status-waiting {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.claim-phase-send-wrap {
  margin-top: 8px;
}

.claim-phase-send-wrap .btn {
  width: 100%;
}

.claim-phase-path {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  word-break: break-word;
}

.claim-phase-path-secondary {
  margin-top: 6px;
}

.claim-phase-file-group {
  margin-top: 14px;
}

.claim-phase-file-group-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.claim-phase-file-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.claim-phase-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.claim-phase-file-name-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.claim-phase-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.claim-phase-file-meta {
  flex-shrink: 0;
  color: #6b7280;
  font-size: 12px;
}

.claim-phase-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.claim-phase-file-action {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.claim-workspace {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.claim-workspace-main,
.claim-workspace-side {
  display: contents;
}

#client-claim-info-section {
  order: 1;
}

.claim-document-workflow-card {
  order: 2;
}

.claim-package-card {
  order: 3;
}

.claim-audit-card {
  order: 4;
}

.claim-workspace > .card {
  width: 100%;
}

.claim-workspace .section-stack {
  margin-top: 0;
}

.claim-workspace .claim-document-workflow-card,
.claim-workspace .claim-package-card,
.claim-workspace #client-claim-info-section,
.claim-workspace .claim-audit-card {
  margin-top: 0;
}

.claim-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.claim-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.claim-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.claim-status-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.claim-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.claim-status-message {
  flex: 0 0 auto;
  text-align: left;
  white-space: normal;
}

.claim-status-label {
  font-size: 13px;
  white-space: normal;
}

.section-stack {
  margin-top: 16px;
}

.claim-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.claim-file-list-wrapper {
  margin-top: 12px;
}

.claim-subtitle {
  margin: 0 0 4px 0;
}

.claim-subheading {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}

.claim-upload-grid {
  align-items: flex-end;
}

.claim-client-uploads-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dbe3f4;
  border-radius: 8px;
  background: #f8fafc;
}

.claim-client-upload-list {
  display: grid;
  gap: 8px;
}

.claim-client-upload-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.claim-client-upload-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.claim-client-upload-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.claim-client-upload-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.claim-client-upload-content strong,
.claim-client-upload-content small {
  overflow-wrap: anywhere;
}

.claim-client-upload-content small {
  color: #64748b;
}

.claim-client-upload-actions {
  display: flex;
  justify-content: flex-end;
}

.claim-client-upload-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.client-upload-review-content {
  width: min(1100px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 20px;
  gap: 16px;
  overflow: hidden;
}

.client-upload-review-pages {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.client-upload-review-page {
  display: grid;
  gap: 10px;
}

.client-upload-review-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.client-upload-review-page-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-upload-review-page img {
  width: 100%;
  height: auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
}

.claim-client-upload-status {
  font-size: 13px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.claim-client-upload-status.is-loading::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  animation: claim-status-pulse 1.2s ease-out infinite;
}

.claim-client-upload-status.is-success {
  color: #166534;
}

@keyframes claim-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    transform: scale(1);
  }
}

.claim-client-upload-empty {
  padding: 10px 0;
}

  .audit-filter-row {
    margin-bottom: 8px;
    align-items: center;
    gap: 8px;
  }

  .audit-filter-card,
  .audit-table-card {
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }

  .audit-filter-card {
    padding: 14px;
    margin-bottom: 12px;
  }

  .audit-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    grid-column: 1 / -1;
  }

  .audit-section-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.2;
  }

  .audit-section-title-row,
  .audit-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .audit-heading-actions {
    justify-content: flex-end;
  }

  .activity-filter-title,
  .audit-filter-title {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    color: #1e3a8a;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    white-space: nowrap;
  }

  .audit-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .audit-mode-control,
  .audit-report-type-control {
    display: block;
    position: relative;
  }

  .audit-mode-control::after,
  .audit-report-type-control::after,
  .audit-download-trigger::after {
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .audit-download-trigger::after {
    transform: translateY(-1px) rotate(45deg);
  }

  .audit-mode-control::after,
  .audit-report-type-control::after {
    position: absolute;
    right: 12px;
    top: 50%;
    pointer-events: none;
    transform: translateY(-60%) rotate(45deg);
  }

  .audit-mode-control select,
  .audit-report-type-control select {
    appearance: none;
    -webkit-appearance: none;
    min-height: 34px;
    padding: 6px 34px 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
  }

  .audit-mode-control select {
    width: 132px;
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
  }

  .audit-report-type-control select {
    width: 168px;
    font-size: 13px;
  }

  .audit-clear-link {
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }

  .audit-clear-link:hover {
    text-decoration: underline;
  }

  .audit-page-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 148px 148px 120px minmax(220px, max-content);
    gap: 12px;
    align-items: end;
  }

  .audit-page-filters-data {
    grid-template-columns: minmax(190px, 0.9fr) minmax(220px, 1fr) 148px 148px minmax(150px, max-content);
  }

  .audit-page-filters-claim-pdf {
    grid-template-columns: minmax(200px, 0.9fr) minmax(230px, 1fr) 148px 148px 120px minmax(220px, max-content);
  }

  .audit-page-filters-summary-pdf {
    grid-template-columns: minmax(250px, 1fr) 148px 148px 120px minmax(220px, max-content);
  }

  .activity-page-filters-data,
  .activity-page-filters-claim-pdf {
    grid-template-columns: minmax(220px, 1fr) 170px 148px 148px minmax(190px, max-content);
  }

  .activity-page-filters-summary-pdf {
    grid-template-columns: minmax(220px, 1fr) 170px 148px 148px 120px minmax(190px, max-content);
  }

  .audit-page-filters label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
  }

  .audit-page-filters input,
  .audit-page-filters select {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
  }

  .audit-page-filters .audit-mode-control select,
  .audit-page-filters .audit-report-type-control select {
    min-height: 34px;
    padding: 6px 34px 6px 10px;
  }

  .audit-page-filters .audit-mode-control select {
    width: 132px;
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
  }

  .audit-page-filters .audit-report-type-control select {
    width: 168px;
    font-size: 13px;
  }

  .audit-filter-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
    min-width: 220px;
  }

  .audit-filter-actions .btn {
    min-width: 104px;
    white-space: nowrap;
  }

  .audit-filter-actions .btn.disabled,
  .audit-filter-actions .btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.58;
  }

  .audit-filter-note {
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
  }

  .audit-download-menu {
    position: relative;
  }

  .audit-download-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    line-height: 1;
  }

  .audit-download-menu summary::-webkit-details-marker {
    display: none;
  }

  .audit-download-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 10;
    min-width: 132px;
    padding: 6px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  }

  .audit-download-panel a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
  }

  .audit-download-panel a:hover {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .audit-export-warning {
    color: #92400e !important;
  }

  .audit-table-card {
    overflow: hidden;
  }

  .audit-table-toolbar,
  .audit-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
  }

  .audit-table-toolbar {
    border-bottom: 1px solid #e2e8f0;
  }

  .audit-table-footer {
    border-top: 1px solid #e2e8f0;
  }

  .audit-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
  }

  .audit-pagination .ghost-link.disabled {
    pointer-events: none;
    opacity: 0.45;
  }

  .audit-table-wrap {
    overflow-x: auto;
  }

  .audit-table {
    min-width: 1120px;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .audit-table thead th {
    text-align: left;
  }

  .audit-table tbody td {
    vertical-align: top;
  }

  .audit-time,
  .audit-event-type,
  .audit-record-links span,
  .audit-muted {
    overflow-wrap: anywhere;
  }

  .audit-time,
  .audit-event-type {
    display: block;
    font-weight: 700;
    color: #0f172a;
  }

  .audit-muted {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
  }

  .audit-result {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
  }

  .audit-result-success {
    background: #dcfce7;
    color: #166534;
  }

  .audit-result-failure,
  .audit-result-error,
  .audit-result-failed {
    background: #fee2e2;
    color: #991b1b;
  }

  .audit-record-links {
    display: grid;
    gap: 4px;
  }

  .audit-details summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 700;
  }

  .audit-details pre {
    max-width: 420px;
    max-height: 220px;
    overflow: auto;
    margin: 8px 0 0;
    padding: 10px;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    white-space: pre-wrap;
  }

  .audit-empty-state {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

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

    .audit-section-heading,
    .audit-heading-actions {
      align-items: flex-start;
      flex-direction: column;
    }

    .audit-mode-control,
    .audit-report-type-control {
      width: 100%;
    }

    .audit-mode-control select,
    .audit-report-type-control select {
      width: 100%;
    }

    .audit-filter-actions {
      flex-wrap: wrap;
      justify-content: flex-start;
      min-width: 0;
    }

    .audit-filter-actions .btn {
      width: 100%;
    }

    .audit-table-toolbar,
    .audit-table-footer {
      align-items: flex-start;
      flex-direction: column;
    }

    .audit-pagination {
      justify-content: flex-start;
    }

  }

/* Claim Detail Form Styles - extracted from inline styles */
.claim-form-card {
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

.claim-form-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}

.claim-form-card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.claim-form-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
  display: block;
}

.claim-form-label-inline {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.claim-grid-three-col {
  display: grid;
  grid-template-columns: 2fr 1.2fr 0.8fr;
  gap: 16px;
  align-items: end;
}

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

.claim-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.claim-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: normal;
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  margin-bottom: 0;
  flex-shrink: 0;
}

.claim-checkbox-label-large {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
  font-size: 13px;
  color: #6b7280;
}

.claim-checkbox-input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.claim-input-full {
  width: 100%;
}

.claim-input-flex {
  flex: 1;
}

.claim-section-divider {
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}

.claim-section-spacing {
  margin-bottom: 24px;
}

.claim-form-actions-top {
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
}

.claim-form-actions-inline {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.claim-form-actions-inline-end {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 2px;
}

.claim-file-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.claim-required-asterisk {
  color: #ef4444;
}

.claim-optional-label {
  color: #9ca3af;
  font-weight: normal;
}

.claim-upload-mode-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.claim-upload-mode-btn.active {
  background: #e5e7eb;
  color: #111827;
  font-weight: 500;
}

.claim-upload-combine-hint {
  font-size: 13px;
  margin: 0 0 12px 0;
  max-width: 480px;
}

.claim-secure-upload-panel {
  display: grid;
  gap: 14px;
}

.claim-secure-upload-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.claim-secure-upload-header p {
  margin: 0;
  font-size: 13px;
}

.claim-secure-upload-email-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.claim-secure-upload-email-grid input {
  width: 100%;
}

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

.claim-upload-request-secret-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
}

.claim-upload-request-label {
  display: block;
  margin-bottom: 4px;
  color: #1e40af;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.claim-upload-request-code {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
  border-radius: 6px;
  background: #ffffff;
  padding: 8px 10px;
  color: #0f172a;
}

.claim-upload-request-list-wrap h4 {
  margin: 4px 0 8px;
  font-size: 13px;
  color: #475569;
}

.claim-upload-request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.claim-upload-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.claim-upload-request-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.claim-upload-request-main strong,
.claim-upload-request-main span {
  overflow-wrap: anywhere;
}

.claim-upload-request-status {
  width: fit-content;
  border-radius: 999px;
  background: #eef2ff;
  padding: 2px 8px;
  color: #3730a3;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.claim-upload-request-status-revoked,
.claim-upload-request-status-expired {
  background: #f1f5f9;
  color: #64748b;
}

.claim-upload-request-empty {
  padding: 8px 0;
}

.claim-combine-files {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.claim-combine-file-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.claim-status-margin {
  margin-left: 12px;
}

.claim-grid-gap-sm {
  gap: 12px;
}

.claim-grid-gap-md {
  gap: 16px;
}

.claim-margin-bottom-sm {
  margin-bottom: 12px;
}

.claim-margin-zero {
  margin: 0;
}

.claim-min-width-btn {
  min-width: 200px;
}

.claim-flex-grow {
  flex: 1;
}

.claim-text-muted-small {
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
}

.claim-submission-modal-content {
  width: min(1120px, 94vw);
  height: min(92vh, 900px);
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.claim-submission-frame-shell {
  flex: 1;
  min-height: 0;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.claim-submission-frame-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.claim-submission-embedded {
  padding: 10px;
  background: #f8fafc;
}

.claim-submission-embedded .card {
  box-shadow: none;
  border-radius: 14px;
}

@media (max-width: 1280px) {
  .claim-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claim-phase-board {
    grid-template-columns: 1fr;
  }

  .claim-post-submission-section {
    width: 100%;
    max-width: none;
  }

}

@media (max-width: 1024px) {
  .claim-overview-top {
    flex-direction: column;
  }

  .claim-overview-status-card {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

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

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

  .claim-secure-upload-email-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .claim-page {
    padding: 12px;
  }

  .claim-overview-content,
  .claim-phase-card,
  .claim-post-submission-header,
  .claim-post-submission-section .section-content {
    padding: 18px;
  }

  .claim-overview-grid {
    grid-template-columns: 1fr;
  }

  .claim-overview-kpi-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .claim-status-row,
  .claim-status-actions,
  .claim-flex-between {
    flex-direction: column;
    align-items: stretch;
  }

  .claim-status-actions {
    justify-content: flex-start;
  }

  .claim-actions {
    width: 100%;
  }

  .claim-actions .btn,
  .claim-actions .icon-button {
    flex: 1 1 auto;
  }

  .claim-phase-file-item,
  .claim-phase-file-name-wrap,
  .claim-secure-upload-header,
  .claim-upload-request-item,
  .claim-checklist-file-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .claim-secure-upload-header .btn,
  .claim-upload-request-item .btn,
  .claim-checklist-file-actions,
  .claim-checklist-file-actions .btn {
    width: 100%;
  }

  .claim-checklist-file-actions {
    flex-direction: column;
  }
}

/* Preview modal */
.preview-modal {
  display: none;
  align-items: center;
  justify-content: center;
}

.preview-modal-content {
  width: 90%;
  max-width: 960px;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
}

.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-title {
  font-weight: 600;
  font-size: 16px;
}

.preview-meta {
  font-size: 12px;
}

.preview-iframe-wrapper {
  flex: 1;
  min-height: 70vh;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.preview-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.preview-footer-actions {
  display: flex;
  gap: 8px;
}

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  .btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.35);
  }

  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(79, 70, 229, 0.4);
  }

  .btn-secondary {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
  }

  .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.16);
  }

  .settings-page {
    max-width: 1280px;
    margin: 24px auto;
    padding: 0 16px 32px;
  }

  .settings-page > .card {
    border-radius: 12px;
  }

  .settings-admin-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 14px 0 20px;
  }

  .settings-admin-nav-link {
    display: grid;
    gap: 3px;
    padding: 13px 14px;
    border: 1px solid #dbe3f4;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  .settings-admin-nav-link span {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
  }

  .settings-admin-nav-link small {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
  }

  .settings-admin-nav-link:hover {
    border-color: #bfdbfe;
    background: #f1f7ff;
  }

  .settings-admin-nav-link.active {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #bfdbfe;
  }

  .admin-menu {
    position: relative;
  }

  .admin-menu summary {
    list-style: none;
  }

  .admin-menu summary::-webkit-details-marker {
    display: none;
  }

  .admin-menu .settings-link {
    cursor: pointer;
  }

  .admin-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    padding: 8px;
    border: 1px solid #dbe3f4;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    display: grid;
    gap: 4px;
    z-index: 50;
  }

  .admin-menu-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
  }

  .admin-menu-link:hover {
    background: #f8fafc;
    color: #0f172a;
  }

  .admin-menu-link.active {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .auth-page {
    min-height: 100vh;
    margin: 0;
    background: #f4f7fb;
    color: #0f172a;
  }

  .auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .auth-panel {
    width: min(100%, 380px);
    padding: 28px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  }

  .auth-brand {
    font-size: 14px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 16px;
  }

  .auth-panel h1 {
    margin: 0 0 18px;
    font-size: 24px;
  }

  .auth-form {
    display: grid;
    gap: 10px;
  }

  .auth-form label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
  }

  .auth-form input[type="email"],
  .auth-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
  }

  .auth-submit {
    margin-top: 8px;
    width: 100%;
  }

  .settings-alert {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
  }

  .settings-alert-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
  }

  .settings-section {
    margin-top: 20px;
  }

  .settings-page > .card {
    display: flex;
    flex-direction: column;
  }

  .settings-main-form {
    order: 10;
  }

  .secure-documents-settings {
    order: 20;
  }

  .settings-section h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #111827;
  }

  .settings-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
  }

  .settings-section-heading h3 {
    margin-bottom: 4px;
  }

  .settings-section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
  }

  .secure-documents-settings {
    padding: 16px;
    border: 1px solid #dbe3f4;
    border-radius: 10px;
    background: #f8fafc;
  }

  .secure-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
  }

  .secure-health-card {
    padding: 14px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #fff;
  }

  .secure-health-label {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .secure-health-card p {
    margin: 8px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
  }

  .secure-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
  }

  .secure-status-ok {
    background: #dcfce7;
    color: #166534;
  }

  .secure-status-warn {
    background: #fef3c7;
    color: #92400e;
  }

  .secure-status-error {
    background: #fee2e2;
    color: #991b1b;
  }

  .secure-temp-table {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #fff;
  }

  .secure-temp-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 140px 90px 120px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid #e5edf8;
    color: #334155;
    font-size: 13px;
  }

  .secure-temp-row:first-child {
    border-top: 0;
  }

  .secure-temp-header {
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .secure-temp-row strong,
  .secure-temp-row small {
    display: block;
  }

  .secure-temp-row small {
    margin-top: 3px;
    color: #64748b;
    overflow-wrap: anywhere;
  }

  .weekly-refresh-form {
    margin-top: 16px;
  }

  .weekly-refresh-reminder {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
  }

  .weekly-refresh-reminder ol {
    display: grid;
    gap: 4px;
    margin: 10px 0 0;
    padding-left: 18px;
  }

  .weekly-refresh-reminder li code {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #0f172a;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .data-refresh-config-table {
    overflow-x: auto;
  }

  .data-refresh-config-row {
    grid-template-columns: minmax(180px, 0.8fr) minmax(210px, 0.9fr) minmax(320px, 1.4fr);
  }

  .data-refresh-config-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .data-refresh-config-row code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .data-refresh-checkbox-label {
    display: inline-grid;
    grid-template-columns: 16px auto;
    align-items: center;
    column-gap: 8px;
    margin: 0;
    color: #334155;
    cursor: pointer;
    font-weight: 600;
    line-height: 16px;
  }

  .data-refresh-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    place-self: center;
  }

  .data-refresh-checkbox-label span {
    line-height: 16px;
  }

  .weekly-refresh-live {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #fff;
  }

  .weekly-refresh-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }

  .weekly-refresh-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    color: #334155;
    font-size: 13px;
  }

  .weekly-refresh-log {
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .weekly-refresh-history {
    margin-top: 16px;
  }

  .weekly-refresh-history-header,
  .weekly-refresh-history-row {
    grid-template-columns: 180px minmax(220px, 1fr) 150px minmax(220px, 1fr);
  }

  .public-intake-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #f4f8fc;
    color: #0f172a;
  }

  .public-intake-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 18px max(20px, calc((100vw - 1180px) / 2 + 20px));
    border-bottom: 1px solid rgba(210, 223, 236, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    box-shadow: 0 10px 24px rgba(16, 32, 53, 0.06);
  }

  .public-intake-shell {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(100vh - 82px);
    padding: 44px 20px 64px;
    background: #f4f8fc;
  }

  .public-intake-panel {
    width: min(100%, 1120px);
    padding: 42px;
    border: 1px solid #e2ebf5;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 42px rgba(15, 61, 113, 0.1);
  }

  .public-intake-panel::before {
    content: "";
    display: block;
    width: 68px;
    height: 4px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, #1e93e2 0%, #67b7f0 100%);
    box-shadow: 0 8px 18px rgba(30, 147, 226, 0.25);
  }

  .public-intake-hero-panel {
    display: grid;
    gap: 30px;
  }

  .public-intake-panel-wide {
    width: min(100%, 1120px);
  }

  .public-intake-panel-hero {
    width: min(100%, 980px);
  }

  .public-intake-brand-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid rgba(210, 223, 236, 0.95);
    border-right-color: transparent;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 253, 0.98) 100%);
    box-shadow: 0 14px 28px rgba(16, 32, 53, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  .public-intake-brand-mark::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #1e93e2 0%, #78c0f3 100%);
  }

  .public-intake-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  .public-intake-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: #314256;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
  }

  .public-intake-nav-link:hover {
    color: #009cff;
    text-decoration: none;
  }

  .public-intake-phone-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d9e4ee;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    color: #28405a;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
  }

  .public-intake-phone-link {
    color: #009cff;
  }

  .public-intake-phone-link:hover {
    border-color: #bcd7ec;
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    color: #009cff;
  }

  .public-intake-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    padding: 0 20px 28px;
    background: #f4f8fc;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
  }

  .public-intake-footer a {
    color: #009cff;
    text-decoration: none;
  }

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

  .public-intake-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 120px;
    max-height: 54px;
    object-fit: contain;
  }

  .public-intake-step {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #d9e4ee;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    color: #28405a;
    font-size: 12px;
    font-weight: 800;
  }

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

  .public-intake-progress span {
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
  }

  .public-intake-progress span.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
  }

  .public-intake-progress span.is-done {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
  }

  .public-intake-kicker {
    display: block;
    margin-bottom: 10px;
    color: #1e93e2;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .public-intake-panel h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .public-intake-copy {
    max-width: 640px;
    margin: 10px 0 22px;
    color: #475569;
    font-size: 16px;
    line-height: 1.45;
  }

  .public-intake-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1.26fr);
    gap: 42px;
    align-items: start;
  }

  .public-intake-side {
    padding: 22px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  }

  .public-intake-side span,
  .public-intake-amount-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .public-intake-side strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.2;
  }

  .public-intake-side p {
    margin: 10px 0 0;
    color: #475569;
    line-height: 1.45;
  }

  .public-intake-side-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
  }

  .public-intake-side-list div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
  }

  .public-intake-side-list b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
  }

  .public-intake-side-list span {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-transform: none;
  }

  .public-intake-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
  }

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

  .public-intake-form label:not(.public-intake-check) {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
  }

  .public-intake-required {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    vertical-align: middle;
  }

  .public-intake-form input[type="text"],
  .public-intake-form input[type="email"],
  .public-intake-form input[type="tel"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
  }

  .public-intake-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  }

  .public-intake-field-tip {
    margin: -4px 0 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
  }

  .public-intake-form .btn {
    margin-top: 6px;
    justify-self: start;
  }

  .public-intake-page .btn {
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
  }

  .public-intake-page .btn-primary {
    background: #009cff;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 156, 255, 0.22);
  }

  .public-intake-page .btn-primary:hover {
    background: #0087df;
    box-shadow: 0 12px 24px rgba(0, 135, 223, 0.26);
    transform: translateY(-1px);
  }

  .public-intake-page .btn-secondary {
    border-color: #d9e4ee;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    color: #28405a;
  }

  .public-intake-page .btn-secondary:hover {
    border-color: #bcd7ec;
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    color: #009cff;
    transform: translateY(-1px);
  }

  .public-intake-page .btn:focus-visible {
    outline: 3px solid rgba(0, 156, 255, 0.28);
    outline-offset: 2px;
  }

  .public-intake-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
  }

  .public-intake-form-actions span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
  }

  .public-intake-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .public-intake-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
  }

  .public-intake-summary div {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
  }

  .public-intake-summary span,
  .public-intake-reference {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .public-intake-summary strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
  }

  .public-intake-amount-card {
    min-width: 0;
    margin-bottom: 0;
    padding: 24px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  }

  .public-intake-amount-card strong {
    display: block;
    margin-top: 8px;
    color: #166534;
    max-width: 100%;
    font-size: clamp(24px, 3.4vw, 37px);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
  }

  .public-intake-amount-card p {
    margin: 10px 0 0;
    color: #3f6212;
    font-weight: 600;
  }

  .public-intake-confirm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 24px;
    align-items: stretch;
  }

  .public-intake-auth-callout {
    max-width: none;
    margin-top: 0;
    padding: 16px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #7c2d12;
  }

  .public-intake-auth-callout strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
  }

  .public-intake-auth-callout p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
  }

  .public-intake-reference-card {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #dbe3f4;
  }

  .public-intake-reference-card strong {
    font-size: 14px;
  }

  .public-intake-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
  }

  .public-intake-check {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 6px;
    color: #334155;
    line-height: 1.35;
    cursor: pointer;
  }

  .public-intake-check span {
    overflow-wrap: anywhere;
  }

  .public-intake-checkbox {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
  }

  .client-status-timeline {
    display: grid;
    gap: 10px;
    margin: 24px 0;
  }

  .client-status-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
  }

  .client-status-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 800;
  }

  .client-status-step strong {
    font-size: 15px;
  }

  .client-status-step.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
  }

  .client-status-step.is-done span {
    background: #16a34a;
    color: #ffffff;
  }

  .client-status-step.is-current {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
  }

  .client-status-callout {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
  }

  .client-status-callout strong {
    display: block;
    margin-bottom: 6px;
  }

  .client-status-callout p {
    margin: 0;
    line-height: 1.45;
  }

  .intake-request-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
  }

  .intake-contact-actions {
    display: grid;
    gap: 6px;
    min-width: 230px;
    margin: 0;
  }

  .intake-contact-actions select {
    max-width: 230px;
    min-height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
  }

  .intake-verification-state {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 130px;
  }

  .intake-review-page {
    display: grid;
    gap: 16px;
  }

  .intake-review-hero,
  .intake-review-card,
  .intake-review-empty {
    border-radius: 8px;
  }

  .intake-review-kicker,
  .intake-review-section-label {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .intake-review-hero .page-subtitle {
    margin-left: 0;
    margin-top: 6px;
  }

  .intake-review-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 18px;
  }

  .intake-review-metric {
    display: grid;
    gap: 6px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
  }

  .intake-review-metric span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
  }

  .intake-review-metric strong {
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
  }

  .intake-review-metric.active {
    border-color: #2563eb;
    background: #eff6ff;
  }

  .intake-review-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-top: 18px;
  }

  .intake-review-filter label {
    width: 100%;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .intake-review-filter select,
  .intake-contact-actions select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
  }

  .intake-review-workflow .intake-contact-actions select {
    width: 100%;
    max-width: none;
  }

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

  .intake-review-card-main {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 0.9fr) minmax(260px, 0.9fr);
    gap: 18px;
    align-items: start;
  }

  .intake-review-card-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .intake-review-card h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
  }

  .intake-review-card h3 a {
    color: #0f172a;
    text-decoration: none;
  }

  .intake-review-card h3 a:hover {
    color: #2563eb;
  }

  .intake-review-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  .intake-review-facts div {
    min-height: 66px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
  }

  .intake-review-facts span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .intake-review-facts strong {
    display: block;
    margin-top: 5px;
    color: #0f172a;
    overflow-wrap: anywhere;
  }

  .intake-review-requester strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 16px;
  }

  .intake-review-requester p,
  .intake-review-workflow p {
    margin: 6px 0 10px;
    color: #475569;
    line-height: 1.45;
  }

  .intake-review-contact-line {
    display: grid;
    gap: 4px;
    margin: 10px 0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .intake-status-pending_staff_review {
    background: #fff7ed;
    color: #c2410c;
  }

  .intake-status-accepted {
    background: #ecfdf5;
    color: #047857;
  }

  .intake-status-proof_sent,
  .intake-status-proof_completed,
  .intake-status-documents_requested {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .intake-status-closed {
    background: #f1f5f9;
    color: #475569;
  }

  @media (max-width: 640px) {
    .public-intake-site-header {
      align-items: flex-start;
      padding: 14px 16px;
    }

    .public-intake-header-actions {
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
    }

    .public-intake-nav-link {
      min-height: 30px;
      font-size: 11px;
    }

    .public-intake-phone-link {
      min-height: auto;
      padding: 0;
      border: 0;
      background: transparent;
      font-size: 11px;
      box-shadow: none;
    }

    .public-intake-phone-link:hover {
      background: transparent;
      text-decoration: underline;
    }

    .public-intake-logo {
      width: 112px;
    }

    .public-intake-brand-mark {
      padding: 8px 12px;
      border-radius: 16px;
    }

    .public-intake-shell {
      min-height: auto;
      padding: 24px 16px 44px;
    }

    .public-intake-panel {
      padding: 22px;
    }

    .public-intake-layout,
    .public-intake-grid,
    .public-intake-confirm-grid {
      grid-template-columns: 1fr;
    }

    .public-intake-summary,
    .public-intake-progress,
    .intake-review-metrics,
    .intake-review-card-main,
    .intake-review-facts {
      grid-template-columns: 1fr;
    }

    .public-intake-panel h1 {
      font-size: 28px;
    }

    .public-intake-amount-card strong {
      font-size: 30px;
    }

    .public-intake-form-actions {
      align-items: stretch;
    }

    .public-intake-form-actions .btn {
      width: 100%;
    }
  }

  @media (max-width: 1100px) {
    .intake-review-card-main {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 640px) {
    .intake-review-metrics {
      grid-template-columns: 1fr;
    }
  }

  .secure-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
  }

  .audit-export-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
  }

  .audit-export-form label {
    display: grid;
    gap: 5px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
  }

  .audit-export-form input {
    width: 180px;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
  }

  .settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px 20px;
  }

  .settings-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
  }

  .settings-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
  }

  .settings-field-label-row label {
    margin-bottom: 0;
  }

  .settings-signature-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  .settings-signature-status-ok {
    background: #ecfdf3;
    color: #027a48;
  }

  .settings-signature-status-missing {
    background: #fff7ed;
    color: #b45309;
  }

  .settings-field input[type="text"],
  .settings-field input[type="email"],
  .settings-field input[type="number"],
  .settings-field input[type="password"],
  .settings-field input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 14px;
  }

  .settings-field input[type="file"] {
    cursor: pointer;
    color: #475569;
  }

  .settings-field input[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
  }

  .settings-field input[type="file"]::file-selector-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
  }

  .settings-field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 14px;
  }

  .settings-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  .settings-note {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
  }

  .settings-actions {
    margin-top: 18px;
  }

  .account-security-page > .card {
    max-width: 760px;
  }

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

  .account-profile-summary > div {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
  }

  .account-profile-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .account-profile-value {
    margin-top: 4px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  .account-password-form {
    max-width: 460px;
  }

  .settings-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .settings-user-list {
    display: grid;
    gap: 16px;
  }

  .settings-standalone-mailbox-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
  }

  .settings-standalone-mailbox-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 14px;
    border: 1px solid #dbe3f4;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 14px;
  }

  .settings-standalone-mailbox-form label {
    display: grid;
    gap: 4px;
    min-width: min(240px, 100%);
    font-weight: 700;
    color: #334155;
  }

  .settings-standalone-mailbox-form label span {
    font-size: 12px;
    color: #64748b;
  }

  .settings-standalone-mailbox-form label.settings-active-toggle {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-width: 0;
    gap: 8px;
    white-space: nowrap;
  }

  .settings-standalone-mailbox-form label.settings-active-toggle span {
    font-size: 13px;
    color: #334155;
  }

  .settings-standalone-mailbox-form input[type="email"],
  .settings-standalone-mailbox-form input[type="text"],
  .settings-standalone-mailbox-form input[type="password"] {
    width: 100%;
    min-height: 40px;
  }

  .settings-user-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid #dbe3f4;
    border-radius: 10px;
    background: #f8fafc;
  }

  .settings-user-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
  }

  .settings-user-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .settings-user-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #111827;
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
  }

  .settings-user-name {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 800;
    color: #111827;
  }

  .settings-user-email {
    margin-top: 2px;
    font-size: 13px;
    color: #64748b;
    overflow-wrap: anywhere;
  }

  .settings-user-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
  }

  .settings-user-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .settings-active-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #dbe3f4;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
  }

  .settings-active-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  .settings-user-card-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }

  .settings-user-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px 16px;
  }

  .settings-checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .settings-checkbox-field label {
    margin-bottom: 0;
  }

  .settings-capability-panel {
    border: 1px solid #dbe3f4;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
  }

  .settings-capability-heading {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 800;
    color: #111827;
  }

  .settings-capability-groups {
    display: grid;
    grid-template-columns: minmax(520px, 1.55fr) minmax(280px, 0.85fr);
    gap: 14px;
    align-items: stretch;
  }

  .settings-capability-group {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
  }

  .settings-capability-group-label {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .settings-capability-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
  }

  .settings-capability-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  }

  .settings-capability-chip input[type="checkbox"] {
    appearance: none;
    width: 15px;
    min-height: 15px;
    padding: 3px 0px;
    flex: 0 0 18px;
    margin: 0;
    border: 1.5px solid #94a3b8;
    border-radius: 5px;
    background: #ffffff;
    display: grid;
    place-items: center;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }

  .settings-capability-chip input[type="checkbox"]::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    transition: transform 0.12s ease;
  }

  .settings-capability-chip:hover {
    border-color: #bfd2ea;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  }

  .settings-capability-chip:has(input:checked) {
    border-color: #93c5fd;
    background: #f0f7ff;
    color: #1e3a8a;
  }

  .settings-capability-chip input[type="checkbox"]:checked {
    border-color: #1677f2;
    background: #1677f2;
  }

  .settings-capability-chip input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
  }

  .settings-user-create {
    margin-top: 14px;
  }

  .settings-collapsible {
    border: 1px solid #dbe3f4;
    border-radius: 14px;
    padding: 10px 12px 12px;
    background: #f8fafc;
  }

  .settings-collapsible > summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    list-style: none;
  }

  .settings-collapsible > summary::-webkit-details-marker {
    display: none;
  }

  @media (max-width: 1100px) {
    .settings-capability-groups {
      grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
  }

  @media (max-width: 760px) {
    .settings-user-card-header {
      align-items: flex-start;
      flex-direction: column;
    }

    .settings-user-card-actions {
      justify-content: flex-start;
      width: 100%;
    }

    .settings-user-fields-grid {
      grid-template-columns: 1fr;
    }

    .settings-capability-groups {
      grid-template-columns: 1fr;
    }

    .settings-capability-chip {
      min-height: 40px;
    }
  }

  .settings-collapsible > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    color: #6366f1;
    transition: transform 0.2s ease;
  }

  .settings-collapsible[open] > summary::before {
    transform: rotate(90deg);
  }

  .settings-collapsible .settings-grid {
    margin-top: 10px;
  }

  .notice {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #111827;
    margin-bottom: 12px;
  }

  .notice.success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
  }

.notice.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.email-thread-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1024px) {
  .email-thread-layout {
    grid-template-columns: 1fr;
  }
}

.email-snippet {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.4;
}

.email-thread-messages {
  display: grid;
  gap: 12px;
}

.email-message-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
}

.email-message-card.inbound {
  border-left: 4px solid #3b82f6;
}

.email-message-card.outbound {
  border-left: 4px solid #10b981;
}

.email-message-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.email-message-header {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #111827;
}

.email-message-subject {
  margin-top: 6px;
  font-size: 13px;
  color: #111827;
}

.email-message-body {
  margin-top: 8px;
  white-space: pre-wrap;
  font-size: 13px;
  color: #374151;
}

.email-message-body.html {
  white-space: normal;
  line-height: 1.5;
}

.email-message-body.email-html-container {
  padding: 0;
  overflow: hidden;
}

.email-message-iframe {
  width: 100%;
  min-height: 120px;
  border: 0;
  display: block;
  background: #ffffff;
}

.email-message-body.html p {
  margin: 0 0 8px;
}

.email-message-body.html ul,
.email-message-body.html ol {
  margin: 0 0 8px 18px;
}

.email-message-body.html table {
  border-collapse: collapse;
  width: 100%;
}

.email-message-body.html td,
.email-message-body.html th {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  font-size: 12px;
}

.email-message-actions {
  margin-top: 8px;
}

.email-message-card.collapsed .email-message-body {
  display: none;
}

.email-message-attachments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.email-attachments-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}

.email-attachments-icon {
  font-size: 14px;
}

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

.attachment-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}

.attachment-item-row:last-child {
  border-bottom: none;
}

.attachment-filename {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.draft-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-form input[type="number"] {
  width: 110px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 13px;
}

.draft-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
}

.draft-output input[type="text"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.draft-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.draft-output {
  margin-top: 16px;
}

.draft-advisory {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d6e4ff;
  background: #eef4ff;
  color: #1f3b73;
  font-size: 13px;
  line-height: 1.45;
}

.draft-output textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  background: #f9fafb;
}

.draft-meta {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  font-size: 13px;
}

.draft-meta ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.draft-attachments {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.draft-preview {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.email-preview-body {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #f9fafb;
  line-height: 1.5;
}

.email-preview-body p {
  margin: 0 0 8px;
}

.email-preview-signature {
  margin-top: 10px;
}


.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-item {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.attachment-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #4338ca;
}

.draft-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.data-table tr.email-thread-unread {
  background: #f8fafc;
}

.data-table tr.email-thread-unread td {
  color: #111827;
}

.data-table tr.email-thread-unread .email-thread-subject a {
  font-weight: 700;
  position: relative;
  padding-left: 16px;
}

.data-table tr.email-thread-unread .email-thread-subject a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.email-thread-account-nav-wrap {
  margin-bottom: 12px;
}

.email-thread-account-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.email-thread-account-link {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  padding: 8px 14px;
}

.email-thread-list-actions {
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.email-thread-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-thread-search-form .search-input-group .search-input {
  min-width: 380px;
  width: min(52vw, 460px);
}

.email-thread-bulk-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.email-thread-bulk-trigger {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
}

.email-thread-bulk-trigger:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.email-thread-bulk-trigger:disabled {
  background: #f8fafc;
  color: #94a3b8;
}

.email-thread-bulk-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 188px;
  padding: 6px;
  border: 1px solid #dbe3f4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  z-index: 30;
}

.email-thread-bulk-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #334155;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.email-thread-bulk-menu-item:hover:not(:disabled) {
  background: #f8fafc;
}

.email-thread-bulk-menu-item:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.email-thread-bulk-menu-item.danger {
  color: #b42318;
}

.email-thread-bulk-menu-item.danger:hover:not(:disabled) {
  background: #fef3f2;
}

.email-thread-selected-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -5px;
  right: -6px;
}

.email-thread-pager {
  justify-content: flex-end;
}

.email-thread-compose-form {
  max-width: 980px;
}

.email-thread-compose-form .email-body-editor {
  min-height: 320px;
  max-height: none;
  line-height: 1.6;
  font-family: Arial, Helvetica, sans-serif;
}

.email-thread-compose-form input[type="file"] {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.email-compose-file-input {
  cursor: pointer;
}

.email-compose-file-input::file-selector-button {
  padding: 8px 16px;
  margin-right: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.email-compose-file-input::file-selector-button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.email-thread-compose-form .tox.tox-tinymce {
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.email-thread-compose-form .tox .tox-toolbar__primary {
  background: #f9fafb;
}

.email-thread-compose-form .tox .tox-edit-area::before {
  border: 0;
}

@media (max-width: 900px) {
  .email-thread-search-form .search-input-group .search-input {
    min-width: 240px;
    width: min(70vw, 360px);
  }

  .search-input-group .email-thread-read-filter {
    max-width: 110px;
  }
}

.email-thread-checkbox-cell {
  width: 44px;
  text-align: center;
}

.email-thread-checkbox-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.data-table.email-threads-table {
  border-collapse: separate;
  border-spacing: 0 6px;
}

.data-table.email-threads-table thead th {
  border: none;
  padding: 4px 12px 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table.email-threads-table tbody tr td {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: none;
  border-right: none;
  padding: 4px 12px;
  vertical-align: middle;
}

.data-table.email-threads-table tbody tr td:first-child {
  border-left: 1px solid #e5e7eb;
  border-radius: 12px 0 0 12px;
}

.data-table.email-threads-table tbody tr td:last-child {
  border-right: 1px solid #e5e7eb;
  border-radius: 0 12px 12px 0;
}

.data-table.email-threads-table tbody tr:hover td {
  background: #f8fafc;
  border-color: #dbe3f4;
}

.data-table.email-threads-table .email-thread-subject a {
  text-decoration: none;
  color: #4b5563;
  font-weight: 600;
}

.data-table.email-threads-table .email-thread-subject a:hover {
  color: #4338ca;
}

.data-table.email-threads-table tr.email-thread-unread td {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.data-table.email-threads-table tr.email-thread-unread .email-thread-subject a {
  font-weight: 700;
  padding-left: 0;
}

.data-table.email-threads-table tr.email-thread-unread .email-thread-subject a::before {
  content: none;
}

  .btn:disabled,
  .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    pointer-events: none;
  }

  .btn:disabled:hover,
  .btn[disabled]:hover {
    transform: none;
    box-shadow: none;
    background: #f3f4f6 !important;
  }

  .btn-danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
  }

  .btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 16px 28px rgba(220, 38, 38, 0.35);
  }

  .generate-letter-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
  }

  .generate-letter-btn.loading {
    position: relative;
    padding-right: 40px;
  }

  .generate-letter-btn.loading::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(14, 116, 144, 0.25);
    border-top-color: #0e7490;
    animation: spin 0.8s linear infinite;
  }

  .generate-letter-btn.success {
    background: #0f766e !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.25);
    opacity: 1;
  }

  .generate-letter-btn.success:hover {
    background: #0f5f5a !important;
  }

  .one-pager-btn.loading {
    position: relative;
    padding-right: 40px;
  }

  .one-pager-btn.loading::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(14, 116, 144, 0.25);
    border-top-color: #0e7490;
    animation: spin 0.8s linear infinite;
  }

  .one-pager-btn.success {
    background: #0f766e !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.25);
    opacity: 1;
  }

  .one-pager-btn.success:hover {
    background: #0f5f5a !important;
  }

  .create-claim-btn.loading {
    position: relative;
    padding-right: 40px;
  }

  .create-claim-btn.loading::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(14, 116, 144, 0.25);
    border-top-color: #0e7490;
    animation: spin 0.8s linear infinite;
  }

  .create-claim-btn.success {
    background: #0f766e !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.25);
    opacity: 1;
  }

  .create-claim-btn.success:hover {
    background: #0f5f5a !important;
  }


  .file-action-btn.loading {
    position: relative;
    padding-right: 32px;
    pointer-events: none;
  }

  .file-action-btn.loading::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border-radius: 50%;
    border: 2px solid rgba(14, 116, 144, 0.25);
    border-top-color: #0e7490;
    animation: spin 0.8s linear infinite;
  }

  .file-action-btn.success {
    background: #0f766e !important;
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.25);
    opacity: 1;
  }

  .file-action-btn.success:hover {
    background: #0f5f5a !important;
  }

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

  .collapse-toggle {
    white-space: nowrap;
    font-weight: 600;
  }

  .collapsible-panel[data-collapsed="true"] {
    display: none;
  }

  .collapsible-panel {
    margin-bottom: 16px;
  }

  .btn-ghost {
    background: transparent;
    color: #4338ca;
  }

  .btn-ghost:hover {
    background: rgba(99, 102, 241, 0.12);
  }

  .btn:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .lead-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 32px;
  }

  .lead-sections.two-column-layout {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  }

  .lead-sections.full-width-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

.lead-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

.lead-section .section-content {
  overflow-x: auto;
}

  .lead-section header h2 {
    margin: 0;
  }


  .stacked-form {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: grid;
    gap: 12px;
  }

  .grid.three-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }

  .stacked-form > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .stacked-form select,
  .stacked-form input,
  .stacked-form textarea {
    margin: 0;
  }

  .empty-state {
    color: #5f6368;
    font-style: italic;
  }

  .muted {
    color: #5f6368;
  }

  .lead-section table form {
    display: inline;
  }

.insight-card {
    margin-top: 12px;
  }

  .intel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .inline-progress {
    font-size: 13px;
    color: #64748b;
  }

  .intel-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.8);
    box-sizing: border-box;
  }

  .intel-section {
    margin-bottom: 16px;
  }

  .intel-list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #1e293b;
  }

  .intel-item {
    margin-bottom: 10px;
  }

  .intel-item-header {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
  }

  .intel-tag {
    background: #e2e8f0;
    color: #1f2937;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
  }

  .intel-muted {
    color: #64748b;
    font-size: 12px;
  }

  .intel-result.empty-state {
    min-height: 60px;
    display: flex;
    align-items: center;
  }

  .intel-summary {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .intel-summary h3 {
    margin: 0 0 6px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
  }

  .intel-value {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
  }

  .intel-meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
  }

  .intel-details {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #fff;
  }

  .intel-details h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #1e293b;
  }

  .intel-details dl {
    display: grid;
    gap: 12px;
    margin: 0;
  }

  .intel-details dl > div {
    display: grid;
    gap: 4px;
  }

  .intel-details dt {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 600;
  }

  .intel-details dd {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
  }

  .intel-sos-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    font-size: 14px;
    color: #0f172a;
  }

  .confidence-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
  }

  .confidence-high {
    background: #16a34a;
  }

  .confidence-medium {
    background: #f59e0b;
  }

  .confidence-low {
    background: #dc2626;
  }

  .intel-result.error-state {
    border-color: rgba(220, 38, 38, 0.6);
    background: rgba(254, 226, 226, 0.4);
    color: #b91c1c;
  }

  .chain-assessment {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
  }

  .chain-assessment.chain-status-clear {
    border-left: 3px solid #16a34a;
  }

  .chain-assessment.chain-status-uncertain {
    border-left: 3px solid #f59e0b;
  }

  .chain-assessment.chain-status-contradictory {
    border-left: 3px solid #dc2626;
  }

  .assessment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 13px;
    color: #64748b;
  }

  .chain-status {
    font-weight: 600;
    text-transform: capitalize;
  }

  .assessment-summary {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
  }

  .current-entity {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
  }

  .entity-reason {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    font-style: italic;
  }

  .events-timeline {
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }

  .event-item {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-left: 3px solid #3b82f6;
  }

  .event-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
  }

  .event-type {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
  }

  .event-date {
    font-size: 12px;
    color: #64748b;
  }

  .event-description {
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    margin-bottom: 6px;
  }

  .event-entities {
    font-size: 13px;
    color: #475569;
    margin-top: 4px;
  }

  .entity-from {
    color: #dc2626;
    font-weight: 500;
  }

  .entity-to {
    color: #16a34a;
    font-weight: 500;
  }

  .event-jurisdiction {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
  }

  .intel-sources {
    margin-top: 20px;
  }

  .intel-sources h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #1e293b;
  }

  .sources-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
  }

  .source-item {
    padding: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
  }

  .source-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
  }

  .source-kind {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.1);
  }

  .source-link {
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
  }

  .source-link:hover {
    text-decoration: underline;
  }

  .source-title {
    font-size: 13px;
    color: #1e293b;
  }

  .source-notes {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-style: italic;
  }

  /* Entitlement Section */
  .entitlement-card {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .entitlement-card.manual-review-required {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.3) 0%, rgba(255, 251, 235, 0.2) 100%);
  }

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

  .entitlement-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
    font-weight: 700;
  }

  .entitlement-main {
    display: grid;
    gap: 12px;
  }

  .entitled-owner-name {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
  }

  .entitlement-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .entitlement-jurisdiction {
    font-size: 13px;
    color: #64748b;
  }

  .entitlement-basis {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
  }

  .entitlement-basis strong {
    color: #1e293b;
  }

  .manual-review-warning {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
  }

  .manual-review-warning strong {
    display: block;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 6px;
  }

  .manual-review-warning p {
    margin: 0;
    font-size: 13px;
    color: #78350f;
    line-height: 1.5;
  }

  /* Priority Pill */
  .priority-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .priority-high {
    background: #dc2626;
    color: #fff;
  }

  .priority-medium {
    background: #f59e0b;
    color: #fff;
  }

  .priority-low {
    background: #64748b;
    color: #fff;
  }

  /* Owner Type Badge */
  .owner-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
  }

  .owner-type-surviving-business {
    background: #16a34a;
  }

  .owner-type-dissolved-business {
    background: #dc2626;
  }

  .owner-type-individual-or-heir {
    background: #3b82f6;
  }

  .owner-type-liquidation-estate {
    background: #7c3aed;
  }

  .owner-type-unknown {
    background: #64748b;
  }

  /* GA Entity Mapping */
  .ga-entity-mapping {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
  }

  .ga-entity-mapping h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1e293b;
  }

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

  .ga-entity-item {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
  }

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

  .ga-entity-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    min-width: 200px;
  }

  .ga-entity-role {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .ga-entity-role.role-primary-match {
    background: rgba(22, 163, 74, 0.15);
    color: #15803d;
  }

  .ga-entity-role.role-related-entity-same-group {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
  }

  .ga-entity-role.role-unrelated-same-name {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
  }

  .ga-entity-role.role-ambiguous-match {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
  }

  .ga-entity-details {
    display: grid;
    gap: 4px;
    font-size: 13px;
    color: #475569;
  }

  .ga-entity-details div {
    display: flex;
    gap: 8px;
  }

  .ga-entity-details strong {
    color: #1e293b;
    min-width: 90px;
  }

  .ga-entity-reason {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
    color: #64748b;
    font-style: italic;
  }

  /* Status Profile Styles */
  .status-profile-card {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
  }

  .status-profile-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1e293b;
  }

  .status-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 16px;
  }

  .status-section h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }

  .status-details {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #475569;
  }

  .status-details div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .status-details strong {
    color: #1e293b;
    min-width: 120px;
  }

  .evidence-list {
    margin-top: 8px;
  }

  .evidence-list ul {
    margin: 4px 0 0;
    padding-left: 20px;
    font-size: 12px;
    color: #64748b;
  }

  .conflict-flags {
    margin-top: 16px;
    padding: 12px;
    background: rgba(254, 243, 199, 0.3);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
  }

  .conflict-flags ul {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 12px;
    color: #92400e;
  }

  .status-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
    color: #64748b;
  }

  /* Address Profile Styles */
  .address-profile-card {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
  }

  .address-profile-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1e293b;
  }

  .best-address {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
  }

  .best-address h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }


  .address-type {
    font-size: 12px;
    color: #64748b;
  }

  /* Style file input in claim package section */
  #claim-upload-file {
    cursor: pointer;
  }

  #claim-upload-file::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  #claim-upload-file::file-selector-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
  }

  .addresses-list {
    margin-bottom: 16px;
  }

  .addresses-list h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }

  .address-item {
    padding: 12px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
  }

  .address-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }

  .address-type-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
  }

  .address-source-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
  }

  .address-text {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 4px;
  }

  .address-notes {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
  }

  .address-quality-flags {
    margin-top: 16px;
    padding: 12px;
    background: rgba(254, 243, 199, 0.3);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
  }

  .address-quality-flags ul {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 12px;
    color: #92400e;
  }

  .address-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
    color: #64748b;
  }

  /* Contact Recommendation Styles */
  .contact-recommendation-card {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
  }

  .contact-recommendation-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1e293b;
  }

  .contact-recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 16px;
  }

  .contact-section h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }

  .contact-details {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #475569;
  }

  .contact-details div {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }

  .contact-details strong {
    color: #1e293b;
    min-width: 120px;
  }

  .recommended-targets {
    margin-top: 12px;
  }

  .recommended-targets ul {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 12px;
    color: #64748b;
  }

  .recommended-targets li {
    margin-bottom: 4px;
  }

  .registered-agent-info {
    margin-top: 20px;
    padding: 16px;
    background: rgba(248, 250, 252, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
  }

  .registered-agent-info h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }

  .ra-details {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #475569;
  }

  .ra-details div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .ra-details strong {
    color: #1e293b;
    min-width: 120px;
  }

  .risk-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .risk-badge.risk-low {
    background: rgba(22, 163, 74, 0.15);
    color: #15803d;
  }

  .risk-badge.risk-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
  }

  .risk-badge.risk-high {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
  }

  .source-priority {
    margin-top: 16px;
    padding: 12px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
  }

  .source-priority ol {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 12px;
    color: #64748b;
  }

  .contact-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
    color: #64748b;
  }

  /* Data Gaps Styles */
  .data-gaps-card {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(254, 243, 199, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
  }

  .data-gaps-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1e293b;
  }

  .missing-data {
    margin-bottom: 20px;
  }

  .missing-data h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }

  .missing-data ul {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: #64748b;
  }

  .recommended-lookups {
    margin-bottom: 16px;
  }

  .recommended-lookups h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }

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

  .lookup-item {
    padding: 12px;
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
  }

  .lookup-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
  }

  .lookup-type {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
  }

  .lookup-query {
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 4px;
  }

  .lookup-why {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
  }

  .data-gaps-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
    color: #64748b;
  }

  /* New Focused UI Styles */
  .entitled-business-card {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .entitled-business-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }

  .entitled-business-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
  }

  .entitled-business-details {
    display: grid;
    gap: 20px;
  }

  .business-status {
    display: grid;
    gap: 8px;
  }

  .status-item {
    font-size: 14px;
    color: #475569;
  }

  .status-item strong {
    color: #1e293b;
    margin-right: 8px;
  }

  .business-contact {
    display: grid;
    gap: 16px;
  }

  .contact-item {
    font-size: 14px;
    color: #475569;
  }

  .contact-item strong {
    color: #1e293b;
    display: block;
    margin-bottom: 4px;
  }

  .address-value {
    color: #1e293b;
    line-height: 1.6;
    white-space: pre-line;
    margin-top: 4px;
  }

  .address-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
  }

  .business-summary-card {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
  }

  .summary-item {
    font-size: 14px;
    color: #475569;
  }

  .summary-item strong {
    color: #1e293b;
    margin-right: 8px;
  }

  .actionable-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .actionable-badge.actionable-yes {
    background: rgba(22, 163, 74, 0.15);
    color: #15803d;
  }

  .actionable-badge.actionable-no {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
  }

  .contacts-section {
    margin-bottom: 24px;
  }

  .contacts-section h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
  }

  .contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
  }

  .contact-card {
    padding: 16px;
    border-radius: 10px;
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }

  .contact-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
  }

  .contact-type-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
  }

  .role-bucket-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
    text-transform: capitalize;
  }

  .contact-details {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #475569;
  }

  .contact-details div {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }

  .contact-details strong {
    color: #1e293b;
    min-width: 80px;
  }

  .contact-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }

  .contact-source {
    font-size: 11px;
    color: #64748b;
  }

  .contact-notes {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
  }

  .contact-why {
    margin-top: 8px;
    padding: 8px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
  }

  .contact-why strong {
    color: #1e293b;
  }

  .contactability-card {
    margin-bottom: 24px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
  }

  .contactability-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
  }

  .contactability-details {
    display: grid;
    gap: 16px;
  }

  .contactability-item {
    font-size: 14px;
    color: #475569;
  }

  .contactability-item strong {
    color: #1e293b;
    display: block;
  }

  .integration-flags {
    margin-top: 12px;
  }

  .integration-flags strong {
    color: #1e293b;
    display: block;
    margin-bottom: 8px;
  }

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

  .flag-item {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
  }

  .flag-item.flag-needed {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
  }

  .next-actions {
    margin-top: 12px;
  }

  .next-actions strong {
    color: #1e293b;
    display: block;
    margin-bottom: 8px;
  }

  .next-actions ol {
    margin: 0;
    padding-left: 20px;
    color: #475569;
  }

  .next-actions li {
    margin-bottom: 6px;
    font-size: 14px;
  }

  .stop-condition {
    margin-top: 12px;
    padding: 10px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    font-size: 13px;
    color: #92400e;
  }

  .stop-condition strong {
    color: #1e293b;
    display: block;
    margin-bottom: 4px;
  }

  .contactability-item ul {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: #64748b;
  }

  .next-sources {
    margin-top: 8px;
  }

  .next-sources strong {
    display: block;
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 14px;
  }

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

  .source-item {
    padding: 12px;
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
  }

  .source-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
  }

  .source-trigger {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
  }

  .source-why {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-style: italic;
  }

  .contact-guidance {
    margin-top: 16px;
    padding: 12px;
    background: rgba(254, 243, 199, 0.3);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
  }

  .contact-guidance strong {
    display: block;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
  }

  .contact-guidance p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
  }

  .comment-feed {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 14px;
  }

  .comment-item {
    background: rgba(248, 250, 252, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    display: grid;
    gap: 6px;
  }

  .comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
  }

  .comment-author {
    font-weight: 600;
    color: #4338ca;
  }

  .comment-dot {
    color: #94a3b8;
  }

  .comment-meta form {
    margin-left: auto;
  }

  .comment-body {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
  }

  .contact-card-list {
    display: grid;
    gap: 16px;
  }

  .contact-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 16px;
    box-shadow:
      0 8px 20px rgba(15, 23, 42, 0.08),
      0 2px 6px rgba(15, 23, 42, 0.05);
    display: grid;
    gap: 12px;
  }

  .contact-card-muted {
    background: rgba(248, 250, 252, 0.92);
    border-color: rgba(244, 63, 94, 0.28);
    box-shadow:
      inset 4px 0 0 rgba(244, 63, 94, 0.75),
      0 8px 20px rgba(15, 23, 42, 0.06),
      0 2px 6px rgba(15, 23, 42, 0.04);
  }

  .contact-card header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .contact-card-header-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex: 1 1 320px;
  }

  .contact-card .contact-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .primary-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid #fbbf24;
    box-shadow: 0 1px 2px rgba(146, 64, 14, 0.1);
  }

  .do-not-use-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #ffe4e6;
    color: #be123c;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid #fda4af;
  }

  .contact-suppressed-message {
    margin: 0;
    width: 100%;
    color: #be123c;
    font-size: 13px;
    font-weight: 600;
  }

  .contact-card .contact-title {
    color: #6366f1;
    font-weight: 600;
    font-size: 13px;
  }

  .contact-type-pill {
    background: rgba(45, 212, 191, 0.15);
    color: #0f766e;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .contact-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  .contact-actions form {
    margin: 0;
  }

  .contact-usage-form {
    margin-right: auto;
  }

  .contact-usage-form-compact {
    margin: 0;
  }

  .contact-usage-form-compact .contact-usage-switch {
    min-height: 34px;
    padding: 4px 9px 4px 6px;
    background: #fff;
  }

  .contact-usage-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 4px 10px 4px 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.9);
    cursor: pointer;
  }

  .contact-usage-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .contact-usage-track {
    position: relative;
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
  }

  .contact-usage-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
  }

  .contact-usage-switch input:checked + .contact-usage-track {
    background: #e11d48;
  }

  .contact-usage-switch input:checked + .contact-usage-track .contact-usage-thumb {
    transform: translateX(16px);
  }

  .contact-usage-switch input:focus-visible + .contact-usage-track {
    outline: 3px solid rgba(225, 29, 72, 0.25);
    outline-offset: 2px;
  }

  .contact-usage-copy {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  .contact-usage-switch input:checked ~ .contact-usage-copy {
    color: #be123c;
  }

  .contact-card dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin: 0;
  }

  .contact-card dl > div {
    display: grid;
    gap: 4px;
  }

  .contact-card dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 700;
  }

  .contact-card dd {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
    word-break: break-word;
  }

  .contact-card dd a {
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
  }

  .contact-card dd a:hover {
    text-decoration: underline;
  }

  .contact-card .contact-address-inline {
    grid-column: span 2;
  }

  .contact-card .contact-address-inline dd {
    color: #475569;
    font-size: 13px;
  }

  .contact-card footer {
    display: flex;
    justify-content: flex-end;
  }

  .data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 12px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
      0 10px 24px rgba(15, 23, 42, 0.08),
      0 2px 6px rgba(15, 23, 42, 0.05);
  }

  .data-table thead th {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4338ca;
    border: none;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 12px 14px;
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .data-table tbody td {
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 14px;
    vertical-align: middle;
    background: #fff;
  }

  .data-table tbody tr:last-child td {
    border-bottom: none;
  }

  .data-table tbody td.cell-actions {
    vertical-align: middle;
    line-height: 1.5;
  }

  .dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 12px 32px;
  }

  .dashboard-header {
    align-items: flex-end;
  }

  .dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
  }

  .dashboard-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .dashboard-mode-link {
    padding: 8px 14px;
    border-radius: 999px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
  }

  .dashboard-mode-link.is-active {
    color: #0f172a;
    background: #e2e8f0;
  }

  .dashboard-filter {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
  }

  .dashboard-funnel-card {
    background:
      linear-gradient(145deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.96)),
      #fff;
  }

  .dashboard-breakdown-card {
    background:
      linear-gradient(145deg, rgba(240, 253, 244, 0.82), rgba(255, 255, 255, 0.96)),
      #fff;
  }

  .dashboard-action-card {
    background:
      linear-gradient(145deg, rgba(255, 251, 235, 0.86), rgba(255, 255, 255, 0.96)),
      #fff;
  }

  .dashboard-filter label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .dashboard-filter input {
    min-width: 150px;
    height: 38px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #111827;
  }

  .dashboard-filter button {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
  }

  .dashboard-activity-summary-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
      radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32%),
      radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent 28%),
      linear-gradient(145deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  }

  .dashboard-activity-summary {
    display: block;
  }

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

  .dashboard-activity-highlight {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    display: grid;
    gap: 10px;
    transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .dashboard-activity-highlight span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .dashboard-activity-highlight strong {
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
  }

  .dashboard-activity-highlight:hover {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.72),
      0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .dashboard-activity-highlight-response {
    border-color: rgba(14, 165, 233, 0.22);
    background: linear-gradient(145deg, rgba(240, 249, 255, 0.95), rgba(255, 255, 255, 0.92));
  }

  .dashboard-activity-highlight-response strong {
    color: #0369a1;
  }

  .dashboard-activity-highlight-speed {
    border-color: rgba(37, 99, 235, 0.2);
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.92));
  }

  .dashboard-activity-highlight-speed strong {
    color: #1d4ed8;
  }

  .dashboard-activity-highlight-claims {
    border-color: rgba(22, 163, 74, 0.22);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.95), rgba(255, 255, 255, 0.92));
  }

  .dashboard-activity-highlight-claims strong {
    color: #15803d;
  }

  .dashboard-activity-highlight-effort {
    border-color: rgba(217, 119, 6, 0.22);
    background: linear-gradient(145deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.92));
  }

  .dashboard-activity-highlight-effort strong {
    color: #b45309;
  }

  .dashboard-metric-grid,
  .dashboard-grid,
  .dashboard-outcome-grid,
  .dashboard-overview-grid {
    display: grid;
    gap: 16px;
  }

  .dashboard-funnel-card header,
  .dashboard-breakdown-card header,
  .dashboard-action-card header {
    margin-bottom: 18px;
  }

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

  .dashboard-funnel-step {
    position: relative;
    min-height: 132px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    text-decoration: none;
  }

  .dashboard-funnel-header,
  .dashboard-metric-header,
  .dashboard-adjustment-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .dashboard-funnel-step:nth-child(1) {
    border-color: rgba(59, 130, 246, 0.26);
    background: #eff6ff;
  }

  .dashboard-funnel-step:nth-child(2) {
    border-color: rgba(6, 182, 212, 0.28);
    background: #ecfeff;
  }

  .dashboard-funnel-step:nth-child(3) {
    border-color: rgba(245, 158, 11, 0.32);
    background: #fffbeb;
  }

  .dashboard-funnel-step::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -7px;
    width: 14px;
    height: 14px;
    border-top: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    background: #f8fafc;
    transform: translateY(-50%) rotate(45deg);
    z-index: 2;
  }

  .dashboard-funnel-step:nth-child(1)::after {
    background: #eff6ff;
  }

  .dashboard-funnel-step:nth-child(2)::after {
    background: #ecfeff;
  }

  .dashboard-funnel-step:nth-child(3)::after {
    background: #fffbeb;
  }

  .dashboard-funnel-step:last-child::after {
    display: none;
  }

  .dashboard-funnel-step-success {
    border-color: rgba(16, 185, 129, 0.34);
    background: #ecfdf5;
  }

  .dashboard-funnel-step-success::after {
    background: #ecfdf5;
  }

  .dashboard-funnel-label {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .dashboard-funnel-step strong {
    color: #0f172a;
    font-size: 42px;
    line-height: 1;
  }

  .dashboard-funnel-step:nth-child(1) strong {
    color: #1d4ed8;
  }

  .dashboard-funnel-step:nth-child(2) strong {
    color: #0e7490;
  }

  .dashboard-funnel-step:nth-child(3) strong {
    color: #b45309;
  }

  .dashboard-funnel-step-success strong {
    color: #047857;
  }

  .dashboard-funnel-note {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
  }

  .dashboard-overview-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    align-items: stretch;
  }

  .dashboard-action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .dashboard-action-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    text-decoration: none;
  }

  .dashboard-action-list a:nth-child(1) {
    border-color: rgba(148, 163, 184, 0.42);
    background: #f8fafc;
  }

  .dashboard-action-list a:nth-child(2) {
    border-color: rgba(245, 158, 11, 0.3);
    background: #fffbeb;
  }

  .dashboard-action-list a:nth-child(3) {
    border-color: rgba(59, 130, 246, 0.26);
    background: #eff6ff;
  }

  .dashboard-action-list a:nth-child(4) {
    border-color: rgba(244, 63, 94, 0.24);
    background: #fff1f2;
  }

  .dashboard-action-list a:nth-child(5) {
    border-color: rgba(168, 85, 247, 0.24);
    background: #faf5ff;
  }

  .dashboard-action-list span {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
  }

  .dashboard-action-list strong {
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
  }

  .dashboard-cohort-chart {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .dashboard-cohort-stack {
    display: flex;
    width: 100%;
    height: 34px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
    box-shadow:
      inset 0 1px 2px rgba(15, 23, 42, 0.1),
      0 10px 20px rgba(15, 23, 42, 0.08);
  }

  .dashboard-cohort-stack-segment {
    min-width: 0;
    height: 100%;
    display: block;
  }

  .dashboard-cohort-bars {
    display: grid;
    gap: 13px;
  }

  .dashboard-cohort-row {
    display: grid;
    gap: 7px;
    text-decoration: none;
  }

  .dashboard-cohort-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
  }

  .dashboard-cohort-row-header span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .dashboard-cohort-row-header strong {
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
  }

  .dashboard-cohort-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
  }

  .dashboard-cohort-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
  }

  .dashboard-cohort-fill {
    height: 100%;
    border-radius: inherit;
  }

  .dashboard-cohort-meta {
    color: #64748b;
    font-size: 12px;
  }

  .dashboard-cohort-claims {
    background: linear-gradient(135deg, #059669, #34d399);
  }

  .dashboard-cohort-responded {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
  }

  .dashboard-cohort-engaged {
    background: linear-gradient(135deg, #d97706, #fbbf24);
  }

  .dashboard-cohort-not-engaged {
    background: linear-gradient(135deg, #64748b, #cbd5e1);
  }

  .dashboard-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .dashboard-metric-card {
    min-height: 128px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .dashboard-metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: #cbd5e1;
  }

  .dashboard-metric-card-attempts::before {
    background: linear-gradient(135deg, #334155, #94a3b8);
  }

  .dashboard-metric-card-contacted::before {
    background: linear-gradient(135deg, #0ea5e9, #67e8f9);
  }

  .dashboard-metric-card-responses::before {
    background: linear-gradient(135deg, #16a34a, #86efac);
  }

  .dashboard-metric-card-claims::before {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
  }

  .dashboard-metric-card-success {
    border-color: rgba(16, 185, 129, 0.34);
    background: linear-gradient(145deg, #ffffff, #f0fdf4);
  }

  .dashboard-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
  }

  .dashboard-metric-label,
  .dashboard-metric-note,
  .dashboard-chart-subtitle {
    color: #64748b;
  }

  .dashboard-adjustment-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .dashboard-reminders-card {
    margin-top: 24px;
  }

  .dashboard-reminders-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
  }

  .dashboard-reminders-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
  }

  .dashboard-reminders-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
  }

  .dashboard-reminders-pill-overdue {
    background: #fee2e2;
    color: #991b1b;
  }

  .dashboard-reminders-pill-soon {
    background: #fef3c7;
    color: #92400e;
  }

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

  .dashboard-reminder-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .dashboard-reminder-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }

  .dashboard-reminder-row-overdue {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fff7f7, #fff1f2);
  }

  .dashboard-reminder-row-due_soon {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffdf5, #fffbeb);
  }

  .dashboard-reminder-main {
    min-width: 0;
    display: grid;
    gap: 6px;
  }

  .dashboard-reminder-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
  }

  .dashboard-reminder-business {
    color: #475569;
    font-size: 14px;
  }

  .dashboard-reminder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
  }

  .dashboard-reminder-side {
    display: grid;
    gap: 8px;
    justify-items: end;
    flex-shrink: 0;
  }

  .dashboard-reminder-status {
    font-size: 13px;
    font-weight: 700;
  }

  .dashboard-reminder-status-overdue {
    color: #b91c1c;
  }

  .dashboard-reminder-status-due_soon {
    color: #b45309;
  }

  .dashboard-reminder-open {
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
  }

  .dashboard-metric-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
  }

  .dashboard-metric-card strong {
    font-size: 34px;
    line-height: 1;
    color: #0f172a;
  }

  .dashboard-metric-card-attempts strong {
    color: #334155;
  }

  .dashboard-metric-card-contacted strong {
    color: #0284c7;
  }

  .dashboard-metric-card-responses strong {
    color: #15803d;
  }

  .dashboard-metric-card-claims strong {
    color: #1d4ed8;
  }

  .dashboard-metric-note {
    font-size: 13px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  }

  .dashboard-adjustments-card {
    margin-top: 24px;
  }

  .dashboard-adjustments-card header {
    margin-bottom: 14px;
  }

  .dashboard-adjustments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
  }

  .dashboard-adjustment-item {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  }

  .dashboard-adjustment-item-header span {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
  }

  .dashboard-adjustment-item-header strong {
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
  }

  .dashboard-adjustment-item p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
  }

  .dashboard-activity-panel {
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .dashboard-activity-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: #cbd5e1;
  }

  .dashboard-activity-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09);
  }

  .dashboard-activity-panel-trend::before {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
  }

  .dashboard-activity-panel-conversion::before {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
  }

  .dashboard-activity-panel-channel::before {
    background: linear-gradient(135deg, #d97706, #fbbf24);
  }

  .dashboard-activity-panel-lifecycle::before {
    background: linear-gradient(135deg, #7c3aed, #c4b5fd);
  }

  .dashboard-chart-card header {
    align-items: flex-start;
  }

  .dashboard-chart-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
  }

  .dashboard-bar-chart,
  .dashboard-rate-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
  }

  .dashboard-bar-row {
    display: grid;
    grid-template-columns: 130px minmax(140px, 1fr) 92px;
    align-items: center;
    gap: 12px;
  }

  .dashboard-bar-label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
  }

  .dashboard-bar-track,
  .dashboard-rate-track {
    position: relative;
    overflow: hidden;
    height: 18px;
    border-radius: 999px;
    background: #e5e7eb;
  }

  .dashboard-bar-created,
  .dashboard-bar-engaged {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
  }

  .dashboard-bar-created {
    background: #cbd5e1;
  }

  .dashboard-bar-engaged,
  .dashboard-rate-fill {
    background: linear-gradient(135deg, #0f766e, #10b981);
  }

  .dashboard-bar-claims {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #1d4ed8, #60a5fa);
    opacity: 0.75;
  }

  .dashboard-bar-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #64748b;
    font-size: 12px;
  }

  .dashboard-bar-value strong {
    color: #0f172a;
    font-size: 14px;
  }

  .dashboard-legend {
    display: flex;
    gap: 16px;
    margin-top: 18px;
    color: #64748b;
    font-size: 12px;
  }

  .dashboard-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
  }

  .dashboard-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
  }

  .dashboard-legend-created {
    background: #cbd5e1;
  }

  .dashboard-legend-engaged {
    background: #10b981;
  }

  .dashboard-legend-claims {
    background: #3b82f6;
  }

  .dashboard-channel-email {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
  }

  .dashboard-channel-phone {
    background: linear-gradient(135deg, #0891b2, #67e8f9);
  }

  .dashboard-channel-mail {
    background: linear-gradient(135deg, #d97706, #fbbf24);
  }

  .dashboard-channel-linkedin {
    background: linear-gradient(135deg, #4338ca, #818cf8);
  }

  .dashboard-channel-text {
    background: linear-gradient(135deg, #059669, #34d399);
  }

  .dashboard-channel-other {
    background: linear-gradient(135deg, #64748b, #cbd5e1);
  }

  .dashboard-lifecycle-contact_started {
    background: linear-gradient(135deg, #0ea5e9, #67e8f9);
  }

  .dashboard-lifecycle-response_recorded {
    background: linear-gradient(135deg, #16a34a, #86efac);
  }

  .dashboard-lifecycle-no_response {
    background: linear-gradient(135deg, #dc2626, #fca5a5);
  }

  .dashboard-lifecycle-re_engaging {
    background: linear-gradient(135deg, #7c3aed, #c4b5fd);
  }

  .dashboard-rate-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    color: #0f172a;
  }

  .dashboard-rate-track {
    height: 26px;
    margin-top: 8px;
  }

  .dashboard-rate-fill {
    height: 100%;
    border-radius: inherit;
  }

  .dashboard-rate-row p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
  }

  .dashboard-outcome-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 16px;
  }

  .dashboard-outcome-grid div {
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
  }

  .dashboard-outcome-grid span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .dashboard-outcome-grid strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 24px;
  }

  @media (max-width: 1100px) {
    .dashboard-funnel {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-funnel-step::after {
      display: none;
    }

    .dashboard-overview-grid,
    .dashboard-grid {
      grid-template-columns: 1fr;
    }

    .dashboard-metric-grid,
    .dashboard-outcome-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @media (max-width: 700px) {
    .dashboard-toolbar,
    .dashboard-mode-toggle {
      width: 100%;
      justify-content: flex-start;
    }

    .dashboard-funnel {
      grid-template-columns: 1fr;
    }

    .dashboard-metric-grid,
    .dashboard-outcome-grid {
      grid-template-columns: 1fr;
    }

    .dashboard-activity-highlights {
      grid-template-columns: 1fr;
    }

    .dashboard-bar-row {
      grid-template-columns: 1fr;
      gap: 6px;
    }

    .dashboard-bar-value {
      align-items: flex-start;
    }

    .dashboard-reminders-header,
    .dashboard-reminder-row {
      flex-direction: column;
      align-items: flex-start;
    }

    .dashboard-reminders-summary,
    .dashboard-reminder-side {
      justify-content: flex-start;
      justify-items: start;
    }
  }

  .page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .bulk-entity-type-inline {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .bulk-entity-type-inline .bulk-entity-type-label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
  }

  .bulk-entity-type-inline .bulk-entity-type-select {
    min-width: 100px;
    max-width: 150px;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
  }

  .property-select-col {
    width: 44px;
    text-align: center;
    vertical-align: middle;
  }

  .property-select-col input[type="checkbox"].property-checkbox-small {
    width: 16px !important;
    height: 16px !important;
    min-height: 16px;
    padding: 0;
    cursor: pointer;
  }

  .properties-bulk-actions-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
  }

  .properties-selected-count {
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -6px;
  }

  .properties-bulk-trigger {
    position: relative;
    width: 38px;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
  }

  .properties-bulk-trigger:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
  }

  .properties-bulk-trigger:disabled {
    background: #f8fafc;
    color: #94a3b8;
  }

  .properties-bulk-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 172px;
    padding: 6px;
    border: 1px solid #dbe3f4;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    z-index: 30;
  }

  .properties-bulk-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    color: #334155;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
  }

  .properties-bulk-menu-item:hover:not(:disabled) {
    background: #f8fafc;
  }

  .properties-bulk-menu-item:disabled {
    color: #94a3b8;
    cursor: not-allowed;
  }

  .data-table tbody tr:hover td {
    background: #f8fafc;
  }

  .data-table tbody tr.lead-readonly td {
    background: #f9fafb;
    color: #6b7280;
    opacity: 0.7;
  }

  .data-table tbody tr.lead-readonly:hover td {
    background: #f3f4f6;
  }

  .data-table tbody tr.lead-readonly .status-pill {
    background: #e5e7eb;
    color: #6b7280;
  }

  .lead-owner-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .lead-owner-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .data-table .checkbox-column {
    width: 44px;
    text-align: center;
    padding: 12px 8px !important;
  }

  .data-table .checkbox-column input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    cursor: pointer;
  }

  .bulk-assignment-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid #dbe3f4;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow:
      0 10px 24px rgba(15, 23, 42, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  .bulk-assignment-bar select {
    min-width: 260px;
    min-height: 40px;
    width: min(380px, 100%);
    max-width: 420px;
    flex: 0 1 320px;
  }

  .bulk-assignment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    flex-wrap: wrap;
  }

  .bulk-assignment-actions .btn {
    flex: 0 0 auto;
  }

  .data-table .cell-actions {
    text-align: right;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 44px; /* Match line height of other cells */
    padding: 12px 14px !important; /* Ensure same padding as other cells */
  }

  .data-table .cell-actions a,
  .data-table .cell-actions .btn-link {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }

  .data-table .cell-actions a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
  }

  .data-table .cell-actions a:hover {
    text-decoration: underline;
  }

  .data-table.compact-table tbody td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .data-table .cell-actions form {
    display: inline-flex;
    align-items: center;
  }

  .data-table .cell-actions button {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    min-height: 32px;
  }

  .data-table .cell-actions button:hover {
    background: rgba(239, 68, 68, 0.2);
  }

  .archive-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    border-bottom: 1px solid #e5e7eb;
  }

  .archive-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: #475569;
    font-weight: 800;
    text-decoration: none;
  }

  .archive-tab:hover {
    color: #0f172a;
    background: #f8fafc;
  }

  .archive-tab.active {
    color: #0f172a;
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 -1px 0 #ffffff inset;
  }

  .archive-tab span {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
  }

  .archive-card {
    overflow-x: auto;
  }

  .archive-section-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .archive-section-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
  }

  .archive-section-header p {
    margin: 0;
  }

  .archive-table td {
    vertical-align: top;
  }

  .properties-table .property-id {
    font-weight: 600;
    font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
  }

  .properties-table tr.is-assigned {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), rgba(59, 130, 246, 0));
  }

  .properties-table tr.is-assigned .property-id {
    color: #047857;
  }

  .properties-table .property-actions {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  .properties-table .add-lead-link {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
  }

  .properties-table .add-lead-link:hover {
    text-decoration: underline;
  }

  .properties-table .linked-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .status-pill-available {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
  }

  .status-pill-assigned {
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
  }

  .status-pill-deleted {
    background: rgba(239, 68, 68, 0.18);
    color: #dc2626;
  }

  .properties-table .detail-trigger {
    background: #eef2ff;
    border: none;
    color: #4338ca;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }

  .properties-table .detail-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(67, 56, 202, 0.2);
  }

  .properties-table tr.is-assigned .detail-trigger {
    background: #dcfce7;
    color: #047857;
  }

  .properties-table .detail-trigger:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .property-detail-modal {
    border: none;
    padding: 0;
    background: transparent;
  }

  .property-detail-modal::backdrop {
    background: rgba(32, 33, 36, 0.35);
  }

  .property-detail-modal[open] .modal-content {
    animation: modal-in 0.2s ease-out;
  }

  .property-detail-modal .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(32, 33, 36, 0.35);
  }

  .property-detail-modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 720px;
    width: min(720px, 92vw);
    transform-origin: center;
    background: linear-gradient(145deg, #ffffff, #f5f7fb);
    border-radius: 18px;
    box-shadow:
      0 20px 50px rgba(30, 41, 59, 0.18),
      0 4px 12px rgba(30, 41, 59, 0.12);
    overflow: hidden;
  }

  .property-detail-modal .modal-body {
    max-height: 85vh;
    overflow-y: auto;
  }

  .property-detail-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .property-detail-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .property-detail-card .property-id-with-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
  }

  .property-detail-card .property-id-with-badge .assignment-meta {
    margin-top: 0;
  }

  .property-detail-card .assignment-meta {
    margin-top: 6px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .property-detail-card .detail-reference-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: #4b5563;
    font-size: 13px;
  }

  .property-detail-card .detail-reference-pair span {
    font-weight: 600;
  }

  .property-detail-card .detail-reference-pair code {
    padding: 2px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #111827;
  }

  .assignment-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .assignment-pill-assigned {
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
  }

  .assignment-pill-available {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
  }

  .property-detail-card header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.02em;
  }

  .property-detail-card .detail-chip {
    display: inline-block;
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    border-radius: 999px;
  }

  .property-detail-card .detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 16px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 14px;
  }

  .property-detail-card .meta-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .property-detail-card .meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    font-weight: 700;
  }

  .property-detail-card .meta-value {
    font-size: 16px;
    color: #111827;
    font-weight: 600;
  }

  .property-detail-card .meta-value.amount {
    font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  }

  .property-detail-card .value-empty {
    color: #9ca3af;
  }

  .property-detail-card .detail-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .property-detail-card .detail-grid h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
  }

  .property-detail-card .detail-grid dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 0;
  }

  .property-detail-card .detail-grid .detail-field {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: grid;
    gap: 4px;
  }

  .property-detail-card .detail-grid dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 700;
  }

  .property-detail-card .detail-grid dd {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
    word-break: break-word;
  }

  .property-detail-card .detail-grid dd .value-empty {
    font-style: italic;
  }

  .property-detail-card .detail-entity-type {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(79, 70, 229, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
  }

  .property-detail-card .entity-type-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .property-detail-card .entity-type-controls .entity-type-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    font-weight: 600;
    min-width: 70px;
  }

  .property-detail-card .entity-type-controls .entity-type-select {
    min-width: 120px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #c7d2fe;
  }

  .property-detail-card .entity-type-error {
    margin: 6px 0 0;
    color: #b91c1c;
    font-size: 12px;
  }

  .property-detail-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
  }

  .property-detail-card footer .action-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .property-detail-card footer .hint-text {
    color: #6b7280;
    font-size: 12px;
  }

  .property-detail-card footer .hint-text-assigned {
    color: #047857;
    font-weight: 600;
  }

  .property-detail-card footer .detail-add-to-lead {
    background: #4f46e5;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }

  .property-detail-card footer .detail-add-to-lead:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.4);
  }

  .property-detail-card footer .ghost {
    background: rgba(99, 102, 241, 0.12);
    border: none;
    color: #4338ca;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .property-detail-card footer .ghost:hover {
    background: rgba(99, 102, 241, 0.2);
  }

  .property-detail-card footer .ghost:disabled {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    cursor: not-allowed;
  }

  .property-detail-card footer .ghost span {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .property-detail-card footer .ghost span::before {
    display: inline-block;
  }

  .property-detail-card footer .ghost.detail-prev span::before {
    content: "◀";
    font-size: 12px;
  }

  .property-detail-card footer .ghost.detail-next span::before {
    content: "▶";
    font-size: 12px;
  }

  .property-detail-card footer .ghost span::before {
    font-family: "Segoe UI Symbol", "Apple Color Emoji", sans-serif;
  }

  .modal-loading,
  .modal-error {
    padding: 36px;
    text-align: center;
    color: #4b5563;
  }

  .property-detail-card .detail-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
  }

  .property-detail-card .detail-subtitle {
    margin: 6px 0 0;
    color: #6366f1;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 13px;
  }

  .property-detail-card .detail-close {
    border: none;
    background: #eef2ff;
    color: #4338ca;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }

  .property-detail-card .detail-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
  }

  .property-detail-card dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin: 0;
  }

  .property-detail-card dl > div {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  .property-detail-card dt {
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
  }

  .property-detail-card dd {
    margin: 0;
    font-size: 15px;
    color: #0f172a;
    word-break: break-word;
  }

  .property-detail-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
  }

  .property-detail-card footer .detail-add-to-lead {
    background: #4f46e5;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }

  .property-detail-card footer .detail-add-to-lead:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.4);
  }

  .property-detail-card footer .ghost {
    background: rgba(99, 102, 241, 0.12);
    border: none;
    color: #4338ca;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .property-detail-card footer .ghost:hover {
    background: rgba(99, 102, 241, 0.2);
  }

  .property-detail-card footer .ghost:disabled {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    cursor: not-allowed;
  }

  .modal-loading,
  .modal-error {
    padding: 36px;
    text-align: center;
    color: #4b5563;
  }

  @keyframes modal-in {
    from {
      opacity: 0;
      transform: translate(-50%, -54%) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }

  /* Email Composition Modal */
  #email-modal {
    position: fixed;
    inset: 0;
    background: rgba(32, 33, 36, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
  }

  .email-modal-content {
    background: linear-gradient(145deg, #ffffff, #f5f7fb);
    border-radius: 18px;
    box-shadow:
      0 20px 50px rgba(30, 41, 59, 0.18),
      0 4px 12px rgba(30, 41, 59, 0.12);
    max-width: 800px;
    width: min(800px, 92vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
  }

  .modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
  }

  .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
  }

  .modal-close:hover {
    background: #f3f4f6;
    color: #111827;
  }

  .confirm-modal {
    display: none;
  }

  .confirm-modal .modal-content {
    max-width: 420px;
    width: 90%;
  }

  .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
  }

  .email-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    flex: 1;
  }

  .email-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .email-form label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
  }

  .email-form input[type="email"],
  .email-form input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
  }

  .email-form input[readonly] {
    background: #f9fafb;
    color: #6b7280;
  }

  .email-body-editor {
    min-height: 300px;
    max-height: 400px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    font-family: Arial, Helvetica, sans-serif;
  }

  .email-body-editor:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
  }

  .claim-email-readonly {
    background: #f9fafb;
    color: #4b5563;
    pointer-events: auto;
    cursor: default;
    user-select: text;
  }

  .claim-email-preview {
    min-height: 340px;
    max-height: min(62vh, 720px);
    padding: 18px;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    background:
      linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    overflow: auto;
    font-size: 14px;
    line-height: 1.6;
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .claim-email-preview:focus {
    outline: none;
  }

  .claim-email-preview > *:first-child {
    margin-top: 0;
  }

  .claim-email-preview > *:last-child {
    margin-bottom: 0;
  }

  .claim-email-preview img {
    max-width: 100%;
    height: auto;
  }

  .claim-email-preview table {
    max-width: 100%;
  }

  .claim-email-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
  }

  .claim-email-tab-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .claim-email-tab-btn.active {
    border-color: #1d4ed8;
    background: #dbeafe;
    color: #1e3a8a;
  }

  .claim-email-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .claim-email-meta-row {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px 14px !important;
  }

  .claim-email-meta-row label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
  }

  .claim-email-meta-row input[readonly] {
    min-width: 0;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 100%);
    border-color: #d7dee8;
    color: #334155;
  }

  .claim-email-tab-panel[hidden] {
    display: none !important;
  }

  @media (max-width: 720px) {
    .claim-email-meta-row {
      grid-template-columns: 1fr;
      align-items: stretch;
    }
  }

  #claim-submission-required-message {
    color: #b91c1c;
    font-weight: 700;
  }

  .email-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
  }

  .email-form .form-actions .btn-ghost {
    margin-left: auto;
  }

  .email-form .form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-decoration: none;
  }

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

  .email-date-input,
  .email-time-input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    min-height: 48px;
  }

  .email-date-input {
    flex: 1;
    cursor: pointer;
  }

  .email-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 20px;
    padding: 6px;
    margin-left: 8px;
    opacity: 0.7;
  }

  .email-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
  }

  .email-time-input {
    flex: 0 0 140px;
  }

  .form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
  }

  /* Scheduled Emails Section */
  .scheduled-emails-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .scheduled-email-item {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
  }

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

  .scheduled-email-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }

  /* Profile context helpers */
  .profile-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }

  .profile-context-label {
    font-size: 13px;
    color: #4b5563;
    margin: 0;
  }

  .profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #312e81;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.04em;
  }

  .print-log-card .section-content {
    margin-top: 16px;
  }

  .print-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .contact-actions-organized {
    width: 100%;
    justify-content: flex-end;
    align-items: stretch;
    gap: 10px;
  }

  .contact-action-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
  }

  .contact-action-group-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .lead-document-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
  }

  .lead-document-title {
    display: block;
    color: #0f172a;
    font-weight: 700;
  }

  .lead-document-meta {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
  }

  .lead-document-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
  }

  .contact-document-download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    width: 32px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

  .contact-document-download-icon svg {
    flex: 0 0 auto;
  }

  .contact-document-download-icon:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #0f172a;
  }

  @media (max-width: 720px) {
    .lead-document-row {
      grid-template-columns: 1fr;
      align-items: stretch;
    }

    .lead-document-actions {
      justify-content: flex-start;
    }

    .contact-document-download-icon {
      justify-self: start;
    }
  }

  .print-log-item {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fafafa, #ffffff);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
  }

  .print-log-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

  .print-log-contact p {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    color: #0f172a;
  }

  .print-log-title {
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
  }

  .print-log-address {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .print-log-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
  }

  .print-log-time {
    font-weight: 600;
    color: #4338ca;
  }

  .print-log-path {
    display: block;
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #312e81;
    background: #eef2ff;
    padding: 4px 8px;
    border-radius: 6px;
    word-break: break-all;
  }

  .print-log-controls {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
  }

  .print-log-mail-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #0f172a;
  }

  .print-log-mail-control input {
    width: 18px;
    height: 18px;
    accent-color: #16a34a;
  }

  .print-log-mail-control.mailed {
    color: #16a34a;
  }

  .print-log-delete {
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
  }

  .print-log-delete:hover {
    color: #dc2626;
  }

  .phone-scripts-card .section-content {
    margin-top: 16px;
  }

  .phone-scripts-card.collapsed .section-content {
    display: none;
  }

  .phone-scripts-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }

  .phone-scripts-toggle {
    font-weight: 600;
    color: #4338ca;
    border-radius: 999px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .phone-scripts-toggle::after {
    content: '▾';
    font-size: 14px;
    transition: transform 0.2s ease;
  }

  .phone-scripts-card:not(.collapsed) .phone-scripts-toggle::after {
    transform: rotate(180deg);
  }

  .phone-scripts-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .phone-script-select {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(67, 56, 202, 0.25);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fff;
    cursor: pointer;
  }

  .phone-script-body {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
    padding: 20px;
    min-height: 160px;
    font-size: 14px;
    color: #1f2937;
  }

  .phone-script-body p {
    margin: 0 0 12px 0;
  }

  .phone-script-body p:last-child {
    margin-bottom: 0;
  }

  .phone-script-body h1,
  .phone-script-body h2,
  .phone-script-body h3 {
    font-weight: 600;
    color: #111827;
    margin-top: 18px;
    margin-bottom: 6px;
  }

  .phone-script-body h1 {
    font-size: 18px;
  }

  .phone-script-body h2 {
    font-size: 16px;
  }

  .phone-script-body h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4b5563;
  }

  .phone-script-body .note {
    font-size: 13px;
    color: #4b5563;
    background: #fef9c3;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
  }

  .phone-script-body .block {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .phone-script-body .line {
    margin: 4px 0;
  }

  .phone-script-body .you {
    font-weight: 700;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .phone-script-body code {
    background: #eef2ff;
    color: #312e81;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  }

  .scheduled-email-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .status-pending {
    background: #fef3c7;
    color: #92400e;
  }

  .status-sent {
    background: #d1fae5;
    color: #065f46;
  }

  .status-failed {
    background: #fee2e2;
    color: #991b1b;
  }

  .status-missed {
    background: #fce7f3;
    color: #9f1239;
  }

  .status-cancelled {
    background: #f3f4f6;
    color: #374151;
  }

  .scheduled-email-actions {
    display: flex;
    gap: 8px;
  }

  /* Toast Notifications */
  .notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
  }

  .notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 12px;
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.15),
      0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    cursor: pointer;
    transform: translateX(400px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
  }

  .notification-show {
    transform: translateX(0);
    opacity: 1;
  }

  .notification-hide {
    transform: translateX(400px);
    opacity: 0;
  }

  .notification-icon {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
  }

  .notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    font-weight: 500;
  }

  .notification-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  }

  .notification-success .notification-icon {
    color: #10b981;
  }

  .notification-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
  }

  .notification-error .notification-icon {
    color: #ef4444;
  }

  .notification-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
  }

  .notification-warning .notification-icon {
    color: #f59e0b;
  }

  .notification-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
  }

  .notification-info .notification-icon {
    color: #3b82f6;
  }

  .notification:hover {
    box-shadow:
      0 12px 36px rgba(0, 0, 0, 0.18),
      0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateX(0) scale(1.02);
  }

  .scheduled-email-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
  }

  .scheduled-email-details strong {
    color: #111827;
    margin-right: 6px;
  }

  .error-message {
    color: #dc2626;
    margin-top: 8px;
    padding: 8px;
    background: #fef2f2;
    border-radius: 4px;
    font-size: 12px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 11px;
  }

  .text-muted {
    color: #6b7280;
    font-style: italic;
  }

  .text-error {
    color: #dc2626;
  }

  /* LinkedIn Modal Styles */
  .linkedin-modal-content {
    max-width: 1000px;
    width: min(1000px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .linkedin-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 0 24px 24px;
  }

  .linkedin-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    padding-bottom: 12px;
    gap: 16px;
  }

  .linkedin-tabs {
    display: flex;
    gap: 8px;
    flex: 1;
  }

  .linkedin-connection-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
  }

  .linkedin-connection-status-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
  }

  .linkedin-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
  }

  .linkedin-tab:hover {
    color: #111827;
    background: #f9fafb;
  }

  .linkedin-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
  }

  .linkedin-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
  }

  .linkedin-template-list {
    display: none; /* Always hidden - we auto-load single templates */
  }

  .linkedin-template-item {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
  }

  .linkedin-template-item:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
  }

  .linkedin-template-item.selected {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
  }

  .linkedin-template-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .linkedin-followup-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e0e7ff;
    color: #6366f1;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .linkedin-template-attempt {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .linkedin-preview {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

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

  .linkedin-preview-title {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .linkedin-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
  }

  .linkedin-preview-actions {
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .linkedin-subject-section {
    margin-bottom: 16px;
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
  }

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

  .linkedin-subject-label {
    font-weight: 600;
    color: #0369a1;
    font-size: 13px;
  }

  .linkedin-subject-content {
    font-size: 14px;
    color: #0c4a6e;
    line-height: 1.5;
    padding: 8px 0;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }

  .linkedin-preview-content {
    flex: 1;
    overflow-y: auto;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    min-height: 300px;
  }

  .linkedin-content.single-template .linkedin-preview-content {
    min-height: 400px;
  }

  .linkedin-preview-content p {
    margin: 0;
  }

  /* Bulk Actions Bar */
  .bulk-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
  }

  .bulk-actions-info {
    font-weight: 600;
    color: #4338ca;
  }

  .bulk-actions-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .confirm-modal-message {
    margin: 16px 0;
    line-height: 1.6;
    color: #374151;
  }

  .confirm-modal-message strong {
    color: #1f2937;
    font-weight: 600;
  }

  .confirm-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .confirm-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .confirm-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #111827;
  }

  .confirm-modal-textarea {
    min-height: 88px;
    resize: vertical;
    font-family: inherit;
  }

  .error-modal-list {
    margin: 16px 0;
    padding: 0;
    list-style: none;
  }

  .error-modal-list li {
    padding: 8px 0;
    color: #dc2626;
    line-height: 1.5;
    border-bottom: 1px solid #fee2e2;
  }

  .error-modal-list li:last-child {
    border-bottom: none;
  }

  /* Responsive: Mobile adjustments for filter toggle */
  @media (max-width: 768px) {
    .page-with-sidebar {
      padding-left: 0;
    }

    .filter-toggle-btn {
      position: fixed;
      left: 10px;
      width: 40px;
      height: 40px;
      top: 80px;
      transform: translateY(0);
    }

    .filter-toggle-btn:hover {
      transform: scale(1.05);
    }

    .filter-toggle-btn:active {
      transform: scale(0.95);
    }

    .filters-sidebar {
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      z-index: 99;
      width: 280px;
      max-height: 100vh;
      border-radius: 0;
      box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    }

    .filters-sidebar.collapsed {
      transform: translateX(-100%);
    }

    .page-content {
      width: 100%;
    }
  }

  @media (max-width: 720px) {
    body {
      padding: 12px;
    }

    .lead-sections {
      grid-template-columns: 1fr;
    }

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

    .bulk-actions-buttons {
      flex-direction: column;
      width: 100%;
    }

  }

  /* Contact card header icons (Edit + Delete) – scoped to #contacts so these win over .btn / .icon-button */
  #contacts .contact-card-actions-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    flex: 0 1 auto;
    flex-wrap: wrap;
  }

  #contacts .contact-card-actions-top .icon-button,
  #contacts .contact-card-actions-top a.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.8);
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  }

  #contacts .contact-card-actions-top .icon-button:hover,
  #contacts .contact-card-actions-top a.icon-button:hover {
    color: #64748b;
    background: rgba(241, 245, 249, 0.95);
    transform: translateY(-1px);
  }

  #contacts .contact-card-actions-top .icon-button.danger,
  #contacts .contact-card-actions-top a.icon-button.danger {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(254, 242, 242, 0.6);
  }

  #contacts .contact-card-actions-top .icon-button.danger:hover,
  #contacts .contact-card-actions-top a.icon-button.danger:hover {
    color: #dc2626;
    background: rgba(254, 226, 226, 0.7);
  }

  #contacts .contact-card-actions-top .icon-button svg,
  #contacts .contact-card-actions-top a.icon-button svg {
    width: 18px;
    height: 18px;
    color: inherit;
  }

  #contacts .contact-card-actions-top .icon-button path,
  #contacts .contact-card-actions-top a.icon-button path {
    stroke: currentColor;
    fill: none;
  }

  .secure-upload-page {
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    background: #f8fafc;
    color: #0f172a;
  }

  .secure-upload-shell {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 56px 0;
  }

  .secure-upload-panel {
    border: 1px solid #dbe5f4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    padding: 32px;
  }

  .secure-upload-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .secure-upload-brand img {
    width: 132px;
    max-width: 45vw;
    max-height: 48px;
    object-fit: contain;
    display: block;
  }

  .secure-upload-close {
    width: 36px;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }

  .secure-upload-close:hover,
  .secure-upload-close:focus-visible {
    background: #f1f5f9;
    color: #0f172a;
  }

  .secure-upload-panel h1 {
    margin: 10px 0 22px;
    font-size: 30px;
    line-height: 1.2;
  }

  .secure-upload-panel h2 {
    margin: 0 0 10px;
    font-size: 18px;
  }

  .secure-upload-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
  }

  .secure-upload-summary > div {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 14px;
  }

  .secure-upload-summary span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .secure-upload-summary strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 16px;
  }

  .secure-upload-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
  }

  .secure-upload-form label {
    font-size: 14px;
    font-weight: 800;
  }

  .secure-upload-form input,
  .secure-upload-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 16px;
  }

  .secure-upload-form input[type="file"] {
    cursor: pointer;
    background: #ffffff;
  }

  .secure-upload-form input[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .secure-upload-form input[type="file"]::file-selector-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
  }

  .secure-upload-form .btn {
    justify-self: start;
    min-height: 44px;
  }

  .secure-upload-file-controls {
    display: grid;
    gap: 12px;
  }

  .secure-upload-file-controls[hidden] {
    display: none;
  }

  .secure-upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #facc15;
    border-radius: 8px;
    background: #fefce8;
    color: #854d0e;
    font-size: 14px;
    font-weight: 700;
    padding: 12px;
  }

  .secure-upload-progress[hidden] {
    display: none;
  }

  .secure-upload-submitting-control {
    opacity: 0.72;
    pointer-events: none;
  }

  .secure-upload-guidance {
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    padding: 12px 14px;
    color: #1e3a8a;
  }

  .secure-upload-guidance p {
    margin: 0;
  }

  .secure-upload-doc-preview {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    padding: 12px;
  }

  .secure-upload-doc-preview[hidden] {
    display: none;
  }

  .secure-upload-doc-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 5px 8px;
    text-transform: uppercase;
  }

  .secure-upload-doc-preview p {
    margin: 0;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.4;
  }

  .secure-upload-doc-preview strong {
    display: block;
    margin-bottom: 2px;
    color: #0f172a;
  }

  .secure-upload-file-summary {
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
    padding: 6px 10px;
  }

  .secure-upload-file-summary[hidden] {
    display: none;
  }

  .secure-upload-confirmation {
    margin-top: 18px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    padding: 14px;
  }

  .secure-upload-confirmation h2 {
    color: #14532d;
  }

  .secure-upload-confirmation ul {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .secure-upload-confirmation li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 8px;
    background: #ffffff;
    color: #166534;
    overflow-wrap: anywhere;
    padding: 10px 12px;
  }

  .secure-upload-confirmation li strong {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    padding: 4px 8px;
  }

  .secure-upload-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(380px, calc(100vw - 36px));
    border: 1px solid #86efac;
    border-radius: 8px;
    background: #f0fdf4;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    color: #166534;
    font-size: 14px;
    font-weight: 800;
    padding: 12px 14px;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .secure-upload-toast-hide {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }

  .secure-upload-toast-icon {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px #dcfce7;
  }

  .secure-upload-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(133, 77, 14, 0.25);
    border-top-color: #ca8a04;
    border-radius: 999px;
    animation: secure-upload-spin 0.8s linear infinite;
  }

  .secure-upload-spinner-large {
    width: 38px;
    height: 38px;
    border-width: 4px;
  }

  .secure-upload-blocker {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.48);
    padding: 24px;
  }

  .secure-upload-blocker[hidden] {
    display: none;
  }

  .secure-upload-blocker-card {
    width: min(360px, 100%);
    display: grid;
    justify-items: center;
    gap: 10px;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    padding: 24px;
    text-align: center;
  }

  .secure-upload-blocker-card p {
    margin: 0;
    color: #475569;
    font-size: 14px;
  }

  .secure-upload-closed .secure-upload-panel > *:not(.secure-upload-brand) {
    display: none;
  }

  .secure-upload-closed .secure-upload-panel::after {
    content: "Upload page closed. Reopen the secure link to continue.";
    display: block;
    margin-top: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    padding: 16px;
  }

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

  .secure-upload-state {
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    padding: 18px;
    color: #991b1b;
  }

  .secure-upload-state p {
    margin: 0;
  }

  @media (max-width: 640px) {
    .secure-upload-page {
      padding: 12px;
    }

    .secure-upload-shell {
      padding: 20px 0;
    }

    .secure-upload-panel {
      padding: 22px;
    }

    .secure-upload-summary {
      grid-template-columns: 1fr;
    }
  }
