:root {
  --ins-report-primary: #0a4f8a;
  --ins-report-primary-strong: #083c67;
  --ins-report-accent: #11b5cd;
  --ins-report-bg: #eef5fb;
  --ins-report-surface: #ffffff;
  --ins-report-text: #1f2f3d;
  --ins-report-muted: #5f7489;
  --ins-report-border: #cfdfeb;
  --ins-report-shadow: 0 16px 42px rgba(8, 60, 103, 0.15);
}

.insurance-report-page {
  min-height: 100vh;
  padding: 7.2rem 1rem 2.6rem;
  background:
    radial-gradient(circle at 8% 0%, rgba(17, 181, 205, 0.2), rgba(17, 181, 205, 0) 28%),
    radial-gradient(circle at 92% 10%, rgba(10, 79, 138, 0.18), rgba(10, 79, 138, 0) 34%),
    linear-gradient(165deg, #edf5fb 0%, #e6f1f8 46%, #f4fbff 100%);
}

.insurance-report-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  background: var(--ins-report-surface);
  border: 1px solid var(--ins-report-border);
  border-radius: 16px;
  box-shadow: var(--ins-report-shadow);
  overflow: hidden;
}

.insurance-report-shell-wide {
  width: 98%;
  max-width: none;
}

.insurance-report-header {
  padding: 1.3rem 1.4rem;
  background: linear-gradient(145deg, var(--ins-report-primary), var(--ins-report-accent));
  color: #fff;
}

.insurance-report-header h2 {
  margin: 0;
  font-family: Montserrat, "Segoe UI", Tahoma, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.insurance-report-header p {
  margin: 0.42rem 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.95);
}

.insurance-report-body {
  padding: 1.15rem 1.2rem 1.4rem;
}

.insurance-report-toolbar {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.insurance-report-search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.insurance-report-search input[type="text"] {
  min-width: 280px;
  border: 1px solid var(--ins-report-border);
  border-radius: 10px;
  padding: 0.62rem 0.8rem;
  color: var(--ins-report-text);
  outline: none;
}

.insurance-report-search input[type="text"]:focus {
  border-color: var(--ins-report-accent);
  box-shadow: 0 0 0 3px rgba(17, 181, 205, 0.16);
}

.insurance-report-btn {
  border: none;
  border-radius: 10px;
  padding: 0.62rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.insurance-report-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #0d5ea8 0%, #0a4f8a 100%);
  box-shadow: 0 6px 16px rgba(11, 78, 132, 0.18);
}

.insurance-report-btn.secondary {
  color: var(--ins-report-primary-strong);
  border: 1px solid var(--ins-report-border);
  background: linear-gradient(180deg, #ffffff 0%, #f4faff 100%);
}

.insurance-report-btn.receipt {
  color: #0b3f5f;
  border: 1px solid #afdcf2;
  background: linear-gradient(180deg, #ecfdf5 0%, #dff7ee 100%);
  box-shadow: 0 4px 10px rgba(30, 120, 92, 0.09);
}

.insurance-report-meta {
  color: var(--ins-report-muted);
  font-size: 0.86rem;
}

.insurance-report-table-wrap {
  overflow-x: hidden;
  border: 1px solid var(--ins-report-border);
  border-radius: 12px;
}

.insurance-report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.insurance-report-table th,
.insurance-report-table td {
  border-bottom: 1px solid #e3edf5;
  padding: 0.54rem 0.44rem;
  vertical-align: top;
  color: var(--ins-report-text);
  font-size: 0.81rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.insurance-report-table th:nth-child(1),
.insurance-report-table td:nth-child(1) {
  width: 5%;
}

.insurance-report-table th:nth-child(2),
.insurance-report-table td:nth-child(2) {
  width: 13%;
}

.insurance-report-table th:nth-child(3),
.insurance-report-table td:nth-child(3) {
  width: 10%;
}

.insurance-report-table th:nth-child(4),
.insurance-report-table td:nth-child(4) {
  width: 11%;
}

.insurance-report-table th:nth-child(5),
.insurance-report-table td:nth-child(5) {
  width: 9%;
}

.insurance-report-table th:nth-child(6),
.insurance-report-table td:nth-child(6) {
  width: 13%;
}

.insurance-report-table th:nth-child(7),
.insurance-report-table td:nth-child(7) {
  width: 11%;
}

.insurance-report-table th:nth-child(8),
.insurance-report-table td:nth-child(8) {
  width: 11%;
}

.insurance-action-col,
.insurance-action-cell {
  width: 17%;
}

.insurance-actions-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-start;
}

.insurance-report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0f7fc;
  font-family: Montserrat, "Segoe UI", Tahoma, sans-serif;
  font-weight: 700;
}

.insurance-report-table tr:hover td {
  background: #fbfdff;
}

.insurance-report-table select,
.insurance-report-table input[type="text"],
.insurance-report-table input[type="date"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 0.74rem;
  padding: 0.28rem 0.35rem;
}

.insurance-date-input {
  border: 1px solid var(--ins-report-border);
  border-radius: 8px;
  padding: 0.28rem 0.35rem;
  background: #fff;
}

.insurance-report-table .insurance-report-btn {
  width: auto;
  min-width: 74px;
  justify-content: center;
  padding: 0.34rem 0.5rem;
  font-size: 0.71rem;
  line-height: 1.1;
  white-space: nowrap;
}

.insurance-report-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.insurance-pagination {
  margin-top: 0.92rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.insurance-pagination a,
.insurance-pagination span {
  border: 1px solid var(--ins-report-border);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  text-decoration: none;
  color: var(--ins-report-primary-strong);
  background: #fff;
  font-size: 0.84rem;
}

.insurance-pagination .current {
  background: var(--ins-report-primary);
  border-color: var(--ins-report-primary);
  color: #fff;
}

.insurance-alert {
  margin-bottom: 0.8rem;
}

.insurance-empty {
  color: var(--ins-report-muted);
  margin: 0.6rem 0;
}

.insurance-dynamic-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ins-report-border);
  border-radius: 8px;
}

.insurance-dynamic-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.insurance-dynamic-table th,
.insurance-dynamic-table td {
  border: 1px solid var(--ins-report-border);
  padding: 0.5rem 0.6rem;
  color: var(--ins-report-text);
  font-size: 0.81rem;
}

.insurance-dynamic-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0f7fc;
  font-family: Montserrat, "Segoe UI", Tahoma, sans-serif;
  font-weight: 700;
}

.insurance-dynamic-table tbody tr:nth-child(even) td {
  background: #fafcfe;
}

.insurance-dynamic-table tbody tr:hover td {
  background: #eaf4fb;
}

.insurance-selflookup-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
  border: 1px solid var(--ins-report-border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.6rem;
}

.insurance-selflookup-title {
  margin: 0 0 0.3rem;
  font-family: Montserrat, "Segoe UI", Tahoma, sans-serif;
  font-weight: 700;
  color: var(--ins-report-primary-strong);
  font-size: 1.15rem;
}

.insurance-selflookup-hint {
  margin: 0 0 1rem;
  color: var(--ins-report-muted);
  font-size: 0.88rem;
}

.insurance-selflookup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.insurance-selflookup-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.insurance-selflookup-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ins-report-text);
}

.insurance-selflookup-field input {
  min-width: 240px;
  border: 1px solid var(--ins-report-border);
  border-radius: 10px;
  padding: 0.62rem 0.8rem;
  color: var(--ins-report-text);
  outline: none;
}

.insurance-selflookup-field input:focus {
  border-color: var(--ins-report-accent);
  box-shadow: 0 0 0 3px rgba(17, 181, 205, 0.16);
}

.insurance-selflookup-submit {
  height: 43px;
}

.insurance-selflookup-results {
  margin-top: 1.4rem;
}

.insurance-selflookup-message {
  color: var(--ins-report-muted);
  font-size: 0.95rem;
  margin: 0;
}

.insurance-selflookup-empty {
  color: #b3261e;
  font-weight: 600;
  background: #fdecea;
  border: 1px solid #f4c3bf;
  border-radius: 10px;
  padding: 0.8rem 1rem;
}

.insurance-result-record + .insurance-result-record {
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px dashed var(--ins-report-border);
}

.insurance-result-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  align-items: stretch;
}

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

.insurance-result-table-wrap {
  flex: 1 1 260px;
  min-width: 260px;
  border: 1px solid var(--ins-report-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(8, 60, 103, 0.07);
}

.insurance-result-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ins-report-surface);
}

.insurance-result-section-row th {
  text-align: left;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, var(--ins-report-primary), var(--ins-report-accent));
  color: #fff;
  font-family: Montserrat, "Segoe UI", Tahoma, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.insurance-result-section-row:not(:first-child) th {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.insurance-result-label-cell {
  width: 42%;
  padding: 0.6rem 1.1rem;
  color: var(--ins-report-muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #eef3f8;
  white-space: nowrap;
}

.insurance-result-value-cell {
  padding: 0.6rem 1.1rem;
  color: var(--ins-report-text);
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 1px solid #eef3f8;
  overflow-wrap: anywhere;
}

.insurance-result-table tbody tr:last-child td {
  border-bottom: none;
}

.insurance-result-table tbody tr:not(.insurance-result-section-row):hover td {
  background: #f7fbfe;
}

@media (max-width: 640px) {
  .insurance-result-label-cell {
    width: 50%;
    white-space: normal;
  }
}

.insurance-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.insurance-header-flex .insurance-header-text {
  flex: 1 1 260px;
}

.insurance-header-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.insurance-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.15s ease;
}

.insurance-header-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.insurance-header-btn.solid {
  background: #fff;
  color: var(--ins-report-primary-strong);
  border-color: #fff;
}

.insurance-header-btn.solid:hover {
  background: #eaf4fb;
  color: var(--ins-report-primary-strong);
}

.insurance-header-btn.hospital {
  background: #f2a541;
  border-color: #f2a541;
  color: #3a2405;
}

.insurance-header-btn.hospital:hover {
  background: #ffb84d;
  border-color: #ffb84d;
  color: #3a2405;
}

.insurance-header-btn.reviews {
  background: #8e6dc9;
  border-color: #8e6dc9;
  color: #fff;
}

.insurance-header-btn.reviews:hover {
  background: #a688dd;
  border-color: #a688dd;
  color: #fff;
}

.insurance-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.insurance-chart-card {
  background: var(--ins-report-surface);
  border: 1px solid var(--ins-report-border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 6px 18px rgba(8, 60, 103, 0.06);
}

.insurance-chart-card h4 {
  margin: 0 0 0.9rem;
  font-family: Montserrat, "Segoe UI", Tahoma, sans-serif;
  font-weight: 700;
  color: var(--ins-report-primary-strong);
  font-size: 1rem;
}

.insurance-chart-card canvas {
  max-height: 320px;
}

@media (max-width: 900px) {
  .insurance-report-page {
    padding-top: 6.2rem;
  }

  .insurance-report-header,
  .insurance-report-body {
    padding: 1rem;
  }

  .insurance-report-search input[type="text"] {
    min-width: 220px;
  }

  .insurance-selflookup-field input {
    min-width: 0;
    width: 100%;
  }

  .insurance-charts-grid {
    grid-template-columns: 1fr;
  }
}