:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  background: #eef2ff;
}

.dashboard-shell {
  max-width: 1160px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #6366f1;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.05;
}

.filter-card {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.filter-group,
.search-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-group label,
.search-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #475569;
}

.filter-dropdown {
  position: relative;
}

.filter-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
}

.filter-toggle:hover,
.filter-option:hover {
  background: #eff6ff;
}

.filter-toggle-text {
  color: #0f172a;
  font-size: 0.95rem;
  text-align: left;
}

.filter-arrow {
  font-size: 0.95rem;
  color: #475569;
  transition: transform 0.2s ease;
}

.filter-dropdown.open .filter-arrow {
  transform: rotate(180deg);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 2;
  padding: 10px 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  display: none;
  max-height: 240px;
  overflow-y: auto;
}

.filter-dropdown.open .filter-menu {
  display: block;
}

.filter-option {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font-size: 0.95rem;
}

.filter-option.selected {
  background: #dbebff;
  color: #1d4ed8;
}

.selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #0f172a;
  font-size: 0.88rem;
}

.chip button {
  border: none;
  background: none;
  color: #475569;
  cursor: pointer;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
}

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

.filter-card {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.filter-group,
.search-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-group label,
.search-group label {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
}

select[multiple] {
  min-height: 120px;
}

select:focus,
input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.card {
  padding: 22px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.card-label {
  margin: 0 0 8px;
  color: #6b7280;
  font-size: 0.95rem;
}

.card h2 {
  margin: 0;
  font-size: 2rem;
}

.card-highlight {
  border: 1px solid #c7d2fe;
}

.card-warning {
  border: 1px solid #fb923c33;
}

.card-success {
  border: 1px solid #86efac33;
}

.provider-details {
  background: white;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 28px;
}

.provider-detail-header {
  margin-bottom: 28px;
}

.provider-detail-header h2 {
  margin: 8px 0 0;
  font-size: 2rem;
}

.provider-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 24px 32px;
  background: #f8fbff;
  border-radius: 24px;
  border: 1px solid #e5e7f2;
  margin-bottom: 32px;
  gap: 24px;
}

.provider-card {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  flex: 1;
  min-width: 200px;
}

.provider-card h3 {
  margin: 12px 0 0;
  font-size: 1.65rem;
  color: #111827;
}

.provider-card .meta {
  margin: 10px 0 0;
  color: #475569;
  font-size: 0.95rem;
}

.provider-card-risk {
  position: relative;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1f2937;
  background: #fee2e2;
}

.risk-pill.high {
  background: #fee2e2;
  color: #b91c1c;
}

.section-heading h2 {
  margin: 0 0 18px;
  font-size: 1.55rem;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.chart-card {
  padding: 24px;
  border-radius: 24px;
  background: white;
  border: 1px solid #e5e7f2;
  min-height: 320px;
}

.chart-card h3 {
  margin: 0 0 18px;
  font-size: 1rem;
  color: #111827;
}

.bar-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  min-height: 300px;
  gap: 40px;
  padding: 20px 10px;
}

.bar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
  max-width: 200px;
}

.bar {
  width: 80px;
  border-radius: 18px 18px 0 0;
  display: block;
  min-height: 60px;
  transition: height 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fill-high {
  background: linear-gradient(180deg, #4338ca 0%, #6366f1 100%);
}

.fill-medium {
  background: linear-gradient(180deg, #93c5fd 0%, #bfdbfe 100%);
}

.bar-label {
  font-size: 0.9rem;
  color: #475569;
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
}

.line-chart {
  position: relative;
  min-height: 260px;
  padding: 16px 8px 28px;
}

.line-grid {
  position: absolute;
  inset: 0 0 24px 0;
  background-image: linear-gradient(to bottom, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 100% 44px;
}

.line-plot {
  position: relative;
  height: 100%;
  width: 100%;
}

.line-plot::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 22px;
  top: 28px;
  border-top: 2px solid transparent;
  background: linear-gradient(to right, transparent 0%, transparent 18%, rgba(59, 130, 246, 0.9) 18%, rgba(59, 130, 246, 0.9) 24%, transparent 24%, transparent 34%, rgba(59, 130, 246, 0.9) 34%, rgba(59, 130, 246, 0.9) 40%, transparent 40%, transparent 56%, rgba(59, 130, 246, 0.9) 56%, rgba(59, 130, 246, 0.9) 62%, transparent 62%, transparent 72%, rgba(59, 130, 246, 0.9) 72%, rgba(59, 130, 246, 0.9) 78%, transparent 78%, transparent 88%, rgba(59, 130, 246, 0.9) 88%, rgba(59, 130, 246, 0.9) 92%, transparent 92%, transparent 100%);
}

.dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #2563eb;
  border: 3px solid white;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.line-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  color: #475569;
  font-size: 0.9rem;
}

.pie-chart {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto 24px;
  border-radius: 9999px;
  background: conic-gradient(
    #1d4ed8 0 48%,
    #0ea5e9 48% 72%,
    #22c55e 72% 90%,
    #cbd5e1 90% 100%
  );
}

.pie-chart::after {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 9999px;
  background: white;
}

.pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: #475569;
  font-size: 0.95rem;
}

.pie-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.blue {
  background: #1d4ed8;
}

.legend-dot.teal {
  background: #0ea5e9;
}

.legend-dot.green {
  background: #22c55e;
}

.anomaly-section {
  background: #f8fafc;
  border-radius: 24px;
  padding: 24px;
}

.anomaly-list {
  margin: 16px 0 0;
  padding-left: 20px;
  color: #334155;
}

.anomaly-list li {
  margin-bottom: 12px;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  th, td {
    padding: 14px 12px;
  }
}

th,
td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
}

thead th {
  color: #374151;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
}

tbody tr:hover {
  background: #f8fafc;
}

.provider-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.provider-cell img {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #eef2ff;
}

.provider-cell strong {
  display: block;
  font-size: 1rem;
  color: #111827;
}

.provider-cell span {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.92rem;
}

.rank-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.rank-bubble.high {
  color: #b91c1c;
  background: rgba(248, 113, 113, 0.17);
}

.rank-bubble.medium {
  color: #b45309;
  background: rgba(251, 191, 36, 0.18);
}

.rank-bubble.low {
  color:#166534;
  background: rgba(110, 231, 183, 0.18);
}

.details-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.details-link:hover {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 16px;
  background: #eef2ff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 880px) {
  .summary-cards {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  th, td {
    padding: 14px 12px;
  }
}
