.company-page,
.acord-page,
.mapping-page,
.wholesaler-page {
  color: #111827;
}

.company-page,
.acord-page,
.mapping-page {
  background: #f5f7fb;
  min-height: calc(100vh - 125px);
  padding: 30px 24px 64px;
}

.mapping-page {
  background: #f6f8fb;
  min-height: calc(100vh - 150px);
  padding: 30px 22px 64px;
}

.wholesaler-page {
  background: #fff;
  min-height: calc(100vh - 150px);
  padding: 47px 148px 80px;
}

.company-shell,
.acord-shell,
.wholesaler-shell {
  margin: 0 auto;
  max-width: 1320px;
}

.wholesaler-shell {
  max-width: 1750px;
}

.mapping-topbar,
.mapping-shell {
  margin-left: auto;
  margin-right: auto;
  max-width: 1540px;
}

.company-header,
.acord-header,
.mapping-header,
.wholesaler-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.company-header,
.acord-header {
  gap: 18px;
  margin-bottom: 18px;
}

.mapping-topbar {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.mapping-shell,
.company-card,
.acord-card {
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
  overflow: hidden;
}

.mapping-shell {
  border-color: #d7dde7;
  min-height: 760px;
}

.mapping-header {
  border-bottom: 1px solid #edf1f6;
  min-height: 68px;
  padding: 0 18px;
}

.wholesaler-header {
  background: #e9e7e7;
  border-radius: 6px;
  margin: 0;
  padding: 24px 17px;
}

.company-title-group,
.acord-title-group {
  display: grid;
  gap: 6px;
}

.company-title,
.acord-title {
  color: #0f172a;
  font-size: 30px;
  font-weight: 750;
  line-height: 1.15;
  margin: 0;
}

.wholesaler-title {
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  margin: 0;
}

.mapping-title {
  color: #1f2937;
  font-size: 20px;
  font-weight: 750;
  line-height: 1;
  margin: 0;
}

.company-subtitle,
.acord-subtitle {
  color: #64748b;
  font-size: 14px;
  margin: 0;
}

.company-actions,
.acord-actions,
.mapping-heading,
.company-row-actions,
.acord-row-actions,
.mapping-row-actions,
.wholesaler-row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.company-actions,
.acord-actions,
.mapping-heading {
  gap: 10px;
}

.acord-row-actions,
.mapping-row-actions {
  justify-content: flex-end;
}

.company-row-actions {
  justify-content: flex-start;
}

.company-button,
.acord-button,
.company-row-button,
.acord-row-button,
.mapping-row-button,
.wholesaler-row-button,
.contact-button,
.mapping-back,
.mapping-add,
.wholesaler-add,
.view-type-button {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}

.company-button,
.acord-button {
  border: 1px solid #cbd5e1;
  font-size: 14px;
  min-height: 38px;
  padding: 0 14px;
}

.company-button.primary,
.acord-button.primary,
.company-row-button.primary,
.acord-row-button.primary,
.mapping-row-button.primary,
.wholesaler-row-button.primary,
.mapping-back,
.mapping-add,
.wholesaler-add {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.company-button.secondary,
.acord-button.secondary,
.company-row-button.secondary,
.acord-row-button.secondary,
.mapping-row-button.secondary,
.wholesaler-row-button.secondary {
  background: #fff;
  color: #475569;
}

.company-row-button.danger,
.acord-row-button.danger,
.mapping-row-button.danger,
.wholesaler-row-button.danger {
  background: #fff;
  border-color: #dc3545;
  color: #dc3545;
}

.company-row-button,
.acord-row-button,
.mapping-row-button,
.wholesaler-row-button {
  border: 1px solid #cbd5e1;
  font-size: 12px;
  min-height: 30px;
  padding: 0 10px;
}

.mapping-back {
  font-size: 18px;
  font-weight: 700;
  min-height: 34px;
  padding: 0 14px;
}

.mapping-add {
  font-size: 20px;
  font-weight: 700;
  min-height: 38px;
  min-width: 58px;
}

.wholesaler-add {
  font-size: 16px;
  min-height: 36px;
  padding: 0 18px;
}

.view-type-button,
.contact-button {
  border-radius: 999px;
}

.view-type-button {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #3b82f6;
  font-size: 10px;
  min-height: 20px;
  padding: 0 8px;
}

.contact-button {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 12px;
  min-height: 30px;
  padding: 0 12px;
  text-transform: uppercase;
}

.company-card-bar {
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 18px;
}

.company-count {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.company-table-wrap,
.acord-table-wrap,
.mapping-table-wrap,
.wholesaler-table-wrap {
  overflow-x: auto;
}

.company-table,
.acord-table,
.mapping-table,
.wholesaler-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.company-table {
  min-width: 1530px;
}

.acord-table {
  min-width: 920px;
}

.mapping-table {
  min-width: 1320px;
}

.company-table th,
.company-table td,
.acord-table th,
.acord-table td,
.mapping-table th,
.mapping-table td,
.wholesaler-table th,
.wholesaler-table td {
  color: #475569;
  font-size: 13px;
  padding: 12px 18px;
  text-align: left;
  vertical-align: middle;
}

.company-table th,
.company-table td,
.acord-table th,
.acord-table td,
.mapping-table th,
.mapping-table td {
  border-bottom: 1px solid #edf1f6;
}

.wholesaler-table th,
.wholesaler-table td {
  border: 1px solid #b8b8b8;
  color: #5b5b5b;
  height: 38px;
  padding: 8px 14px;
}

.company-table th,
.acord-table th,
.mapping-table th,
.wholesaler-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mapping-table th {
  background: #fbfcfe;
  color: #8a94a6;
  font-size: 10px;
  font-weight: 800;
}

.wholesaler-table th {
  background: #eef5ff;
  color: #7a7f8b;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.company-table td,
.company-table th {
  height: 52px;
}

.company-table th {
  height: 42px;
}

.acord-table td {
  height: 46px;
}

.mapping-table td,
.mapping-table th {
  color: #7b8799;
  font-size: 12px;
  height: 34px;
  padding: 9px 18px;
}

.mapping-table td:first-child {
  color: #374151;
  font-weight: 800;
}

.company-table input,
.acord-table input,
.mapping-table input,
.mapping-table select,
.mapping-table textarea,
.wholesaler-table input {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #111827;
  font: inherit;
  min-height: 34px;
  padding: 7px 9px;
  width: 100%;
}

.mapping-table input,
.mapping-table select,
.mapping-table textarea {
  border-color: #d7dde7;
  min-height: 30px;
  padding: 6px 8px;
}

.mapping-table select[multiple] {
  min-height: 96px;
}

.mapping-table textarea {
  min-height: 58px;
  resize: vertical;
}

.wholesaler-table input {
  min-height: 30px;
  padding: 6px 8px;
}

.new-company-row,
.edit-company-row,
.new-acord-row,
.edit-acord-row,
.new-mapping-row,
.edit-mapping-row,
.new-wholesaler-row,
.edit-wholesaler-row {
  background: #f8fbff;
}

.new-company-row[hidden],
.edit-company-row[hidden],
.display-company-row[hidden],
.new-acord-row[hidden],
.edit-acord-row[hidden],
.display-acord-row[hidden],
.new-mapping-row[hidden],
.edit-mapping-row[hidden],
.display-mapping-row[hidden],
.new-wholesaler-row[hidden],
.edit-wholesaler-row[hidden],
.display-wholesaler-row[hidden] {
  display: none;
}

.mapping-input-cell {
  vertical-align: top;
}

.mapping-note-actions {
  display: grid;
  gap: 8px;
}

.empty-row td {
  color: #94a3b8;
  font-weight: 700;
  height: 96px;
  text-align: center;
}

.wholesaler-table .empty-row td {
  color: #7a7f8b;
}

.sort-arrow {
  color: #94a3b8;
  font-size: 12px;
  margin-left: 4px;
}

.company-table th:nth-child(1),
.company-table td:nth-child(1) {
  width: 150px;
}

.company-table th:nth-child(2),
.company-table td:nth-child(2) {
  width: 220px;
}

.company-table th:nth-child(3),
.company-table td:nth-child(3) {
  width: 170px;
}

.company-table th:nth-child(4),
.company-table td:nth-child(4) {
  width: 220px;
}

.company-table th:nth-child(5),
.company-table td:nth-child(5) {
  width: 150px;
}

.company-table th:nth-child(6),
.company-table td:nth-child(6) {
  width: 180px;
}

.company-table th:nth-child(7),
.company-table td:nth-child(7) {
  width: 280px;
}

.company-table th:nth-child(8),
.company-table td:nth-child(8) {
  width: 280px;
}

.acord-table td:nth-child(1),
.acord-table th:nth-child(1) {
  width: 160px;
}

.acord-table td:nth-child(2),
.acord-table th:nth-child(2) {
  width: 42%;
}

.acord-table td:nth-child(4),
.acord-table th:nth-child(4) {
  width: 190px;
}

.mapping-table th:nth-child(1),
.mapping-table td:nth-child(1) {
  width: 260px;
}

.mapping-table th:nth-child(2),
.mapping-table td:nth-child(2) {
  width: 200px;
}

.mapping-table th:nth-child(3),
.mapping-table td:nth-child(3),
.mapping-table th:nth-child(4),
.mapping-table td:nth-child(4) {
  width: 150px;
}

.mapping-table th:nth-child(6),
.mapping-table td:nth-child(6) {
  width: 160px;
}

@media (max-width: 1100px) {
  .company-title {
    font-size: 38px;
  }
}

@media (max-width: 1000px) {
  .wholesaler-page {
    padding: 28px 20px 60px;
  }

  .wholesaler-table {
    min-width: 900px;
  }
}

@media (max-width: 900px) {
  .mapping-page {
    padding: 20px 12px 46px;
  }

  .mapping-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }
}

/* Modern carrier directory: keep forms out of the summary row. */
.company-record-list{display:grid}.company-record{align-items:center;border-bottom:1px solid #e8edf3;display:grid;gap:28px;grid-template-columns:minmax(270px,1.1fr) minmax(440px,1.6fr) auto;min-height:118px;padding:22px 26px;transition:background-color .16s ease}.company-record:last-child{border-bottom:0}.company-record:hover{background:#f8fbff}.company-record-identity{align-items:center;display:flex;gap:14px;min-width:0}.company-record-number{align-items:center;background:#eaf3ff;border:1px solid #cfe2ff;border-radius:10px;color:#1769c2;display:inline-flex;flex:0 0 auto;font-size:11px;font-weight:800;justify-content:center;letter-spacing:.04em;min-height:42px;min-width:58px;padding:8px 10px}.company-record h2,.company-editor h2{color:#172033;font-size:16px;font-weight:780;line-height:1.25;margin:0}.company-record-identity p{color:#7a8799;font-size:11px;margin:5px 0 0}.company-payment-summary{display:grid;gap:24px;grid-template-columns:160px minmax(220px,1fr);min-width:0}.company-payment-summary>div{display:flex;flex-direction:column;gap:5px;min-width:0}.company-meta-label,.company-editor-eyebrow,.company-form-field>span{color:#8190a5;font-size:10px;font-weight:800;letter-spacing:.065em;text-transform:uppercase}.company-payment-summary strong,.company-payment-summary span:not(.company-meta-label){color:#334155;font-size:12px;line-height:1.45}.company-portal-link{align-items:center;color:#126fd1;display:inline-flex;font-size:12px;font-weight:750;gap:6px;text-decoration:none;width:max-content}.company-portal-link:hover{color:#0b4f9a;text-decoration:underline}.company-record .company-row-actions{flex-wrap:nowrap;justify-content:flex-end}
.company-editor{background:linear-gradient(145deg,#f8fbff,#f3f7fc);border-bottom:1px solid #dbe5f0;padding:26px}.company-editor-existing{border-left:3px solid #1677e8}.company-editor-heading{align-items:flex-start;display:flex;justify-content:space-between;margin-bottom:22px}.company-editor-eyebrow{color:#1677e8;display:block;margin-bottom:6px}.company-editor-close{align-items:center;background:#fff;border:1px solid #d9e2ec;border-radius:9px;color:#64748b;cursor:pointer;display:inline-flex;font-size:21px;height:36px;justify-content:center;line-height:1;width:36px}.company-editor-close:hover{background:#eef5fd;color:#172033}.company-form-grid{display:grid;gap:18px;grid-template-columns:repeat(4,minmax(0,1fr))}.company-form-field{display:flex;flex-direction:column;gap:7px;margin:0;min-width:0}.company-form-span-2{grid-column:span 2}.company-form-field input,.company-form-field select,.company-form-field textarea{background:#fff;border:1px solid #d4deea;border-radius:9px;box-sizing:border-box;color:#243247;font-size:13px;min-height:42px;padding:9px 11px;width:100%}.company-form-field textarea{min-height:82px;resize:vertical}.company-form-field input:focus,.company-form-field select:focus,.company-form-field textarea:focus{border-color:#2684ee;box-shadow:0 0 0 3px rgba(38,132,238,.12);outline:none}.company-editor-actions{align-items:center;border-top:1px solid #dde6f0;display:flex;gap:9px;justify-content:flex-end;margin-top:22px;padding-top:18px}.company-empty{align-items:center;color:#7a8799;display:flex;flex-direction:column;justify-content:center;min-height:240px;padding:40px;text-align:center}.company-empty-icon{align-items:center;background:#edf5ff;border-radius:50%;color:#1677e8;display:inline-flex;font-size:24px;height:48px;justify-content:center;margin-bottom:13px;width:48px}.company-empty strong{color:#334155;font-size:14px}.company-empty p{font-size:12px;margin:6px 0 0}
@media(max-width:1050px){.company-record{grid-template-columns:minmax(240px,1fr) minmax(320px,1.25fr)}.company-record .company-row-actions{grid-column:1/-1}.company-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.company-header{align-items:flex-start;flex-direction:column}.company-actions{width:100%}.company-actions .company-button{flex:1}.company-record{gap:18px;grid-template-columns:1fr;padding:20px}.company-payment-summary{gap:16px;grid-template-columns:1fr}.company-record .company-row-actions{grid-column:auto;justify-content:stretch}.company-record .company-row-button,.company-editor-actions .company-row-button{flex:1}.company-editor{padding:20px}.company-form-grid{grid-template-columns:1fr}.company-form-span-2{grid-column:auto}}

.insurance-pagination {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 16px auto 0;
  max-width: 100%;
}

.insurance-pagination-summary {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.insurance-pagination-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

.insurance-pagination-actions a,
.insurance-pagination-actions span {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 0 10px;
  text-decoration: none;
}

.insurance-pagination-actions a:hover {
  border-color: #93c5fd;
  color: #2563eb;
}

.insurance-pagination-actions .current {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.insurance-pagination-actions .disabled {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .insurance-pagination {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .insurance-pagination-actions {
    width: 100%;
  }

  .insurance-pagination-actions > * {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .company-page,
  .acord-page {
    padding: 22px 12px 48px;
  }

  .company-header,
  .acord-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ACORD form-set mapping */
.mapping-page {
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, .08), transparent 32%),
    #f4f7fb;
  padding: 38px 28px 72px;
}

.mapping-shell {
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
  min-height: 0;
}

.mapping-header {
  align-items: flex-start;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  gap: 24px;
  min-height: 0;
  padding: 28px 30px 24px;
}

.mapping-heading {
  align-items: flex-start;
  display: grid;
  gap: 7px;
}

.mapping-eyebrow {
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mapping-title {
  color: #0f172a;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
}

.mapping-subtitle {
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  max-width: 680px;
}

.mapping-header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.mapping-back,
.mapping-add {
  border-radius: 9px;
  font-size: 13px;
  font-weight: 750;
  min-height: 40px;
  padding: 0 16px;
  transition: box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.mapping-back {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.mapping-add {
  gap: 7px;
  min-width: 0;
}

.mapping-add span {
  font-size: 19px;
  font-weight: 500;
  line-height: 0;
}

.mapping-back:hover,
.mapping-add:hover {
  box-shadow: 0 8px 20px rgba(37, 99, 235, .16);
  transform: translateY(-1px);
}

.mapping-summary {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e8eef6;
  display: flex;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 30px;
}

.mapping-count {
  color: #334155;
  font-size: 13px;
  font-weight: 750;
}

.mapping-summary-note {
  color: #94a3b8;
  font-size: 12px;
}

.mapping-table {
  min-width: 1240px;
}

.mapping-table th {
  background: #f7f9fc;
  color: #536176;
  font-size: 10px;
  height: 44px;
  letter-spacing: .065em;
  padding: 11px 20px;
}

.mapping-table td {
  color: #475569;
  font-size: 13px;
  height: 58px;
  line-height: 1.5;
  padding: 13px 20px;
}

.mapping-table tbody .display-mapping-row {
  transition: background-color .15s ease;
}

.mapping-table tbody .display-mapping-row:hover {
  background: #f8fbff;
}

.mapping-table td:first-child {
  color: #172033;
  font-weight: 700;
}

.mapping-action-heading {
  text-align: right !important;
}

.mapping-value-list {
  color: #334155 !important;
  line-height: 1.65 !important;
  overflow-wrap: anywhere;
}

.mapping-notes {
  color: #64748b !important;
  white-space: pre-line;
}

.mapping-table input,
.mapping-table select,
.mapping-table textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  font-size: 12px;
  padding: 8px 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.mapping-table input:focus,
.mapping-table select:focus,
.mapping-table textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
  outline: none;
}

.mapping-table select[multiple] {
  min-height: 112px;
}

.mapping-table select[multiple] option {
  border-radius: 5px;
  padding: 6px 7px;
}

.new-mapping-row,
.edit-mapping-row {
  background: #f4f8ff;
}

.mapping-row-button {
  border-radius: 7px;
  font-weight: 750;
  min-height: 32px;
  padding: 0 11px;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.mapping-row-button:hover {
  box-shadow: 0 5px 12px rgba(15, 23, 42, .1);
  transform: translateY(-1px);
}

.mapping-empty-state {
  align-items: center;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  min-height: 180px;
}

.mapping-empty-state strong {
  color: #334155;
  font-size: 15px;
}

.mapping-empty-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  color: #2563eb;
  display: inline-flex;
  font-size: 22px;
  height: 42px;
  justify-content: center;
  margin-bottom: 4px;
  width: 42px;
}

@media (max-width: 900px) {
  .mapping-page {
    padding: 20px 12px 48px;
  }

  .mapping-header {
    padding: 22px 20px;
  }

  .mapping-header-actions {
    width: 100%;
  }

  .mapping-header-actions > * {
    flex: 1;
  }

  .mapping-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 13px 20px;
  }
}
