/* NexBio Billing Analytics Dashboard
   Design: Matches landing page brand (Outfit + DM Sans, dark command-center, emerald/gold/navy) */

/* ── NAV ── */
.dash-nav {
  background: rgba(5,10,18,0.97);
  border-bottom: 1px solid rgba(240,180,41,0.15);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.dash-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.dash-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.dash-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.dash-logo-text span { color: var(--gold); }
.dash-nav-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-left: 1px solid rgba(255,255,255,0.1);
  padding-left: 20px;
}
.dash-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(46,139,87,0.15);
  border: 1px solid rgba(46,139,87,0.3);
  color: #6fdfa0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  font-family: 'Outfit', sans-serif;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6fdfa0;
  animation: pulse-dot 2s infinite;
  box-shadow: 0 0 6px #6fdfa0;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.dash-date {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  font-family: 'DM Sans', sans-serif;
}

/* ── FILTER BAR ── */
.filter-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
}
.filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}
.filter-tabs {
  display: flex;
  gap: 4px;
}
.filter-tab {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.filter-tab:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
}
.filter-tab.active {
  background: var(--gold-dim);
  border-color: rgba(240,180,41,0.3);
  color: var(--gold);
}

/* ── DASHBOARD MAIN ── */
.dashboard-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── KPI ROW ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.kpi-tile {
  background: var(--glass-bg);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 24px 20px;
  backdrop-filter: blur(12px);
  transition: all 0.25s;
}
.kpi-tile:hover {
  border-color: rgba(240,180,41,0.3);
  box-shadow: 0 0 24px rgba(240,180,41,0.06);
}
.kpi-tile-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.kpi-tile-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.kpi-tile-value.kpi-good { color: #6fdfa0; text-shadow: 0 0 16px rgba(46,139,87,0.4); }
.kpi-tile-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  font-family: 'DM Sans', sans-serif;
}

/* ── CARD ── */
.dash-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.dash-card.full-width {
  width: 100%;
}
.dash-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.dash-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.dash-card-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.45);
  font-family: 'Outfit', sans-serif;
}
.dash-card-badge.red {
  background: rgba(220, 80, 80, 0.15);
  color: #e07070;
  border: 1px solid rgba(220, 80, 80, 0.25);
}

/* ── GRID 2 COL ── */
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── AR CHART ── */
.ar-chart-container {
  padding: 24px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ar-bucket-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px 80px;
  align-items: center;
  gap: 14px;
}
.ar-bucket-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.ar-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  height: 20px;
  overflow: hidden;
}
.ar-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald) 0%, #3daa73 100%);
  border-radius: 4px;
  transition: width 0.8s ease;
  box-shadow: 0 0 10px rgba(46,139,87,0.4);
}
.ar-bucket-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}
.ar-bucket-count {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  text-align: right;
  font-family: 'DM Sans', sans-serif;
}
.ar-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
}
.ar-total-row span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  font-family: 'DM Sans', sans-serif;
}
.ar-total-row strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
}

/* ── DENIAL TABLE ── */
.denial-table-wrap {
  overflow-x: auto;
  padding: 0;
}
.denial-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
}
.denial-table th {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.denial-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.65);
  vertical-align: middle;
}
.denial-table tr:last-child td { border-bottom: none; }
.denial-table tr:hover td { background: rgba(255,255,255,0.02); }
.code-cell {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}
.reason-cell { color: rgba(255,255,255,0.7); max-width: 220px; }
.num-cell { text-align: right; color: rgba(255,255,255,0.6); }
.risk-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.08em;
}
.risk-high { background: rgba(220,80,80,0.18); color: #e07070; border: 1px solid rgba(220,80,80,0.3); }
.risk-med  { background: rgba(240,180,41,0.15); color: var(--gold); border: 1px solid rgba(240,180,41,0.3); }
.risk-low  { background: rgba(46,139,87,0.12); color: #6fdfa0; border: 1px solid rgba(46,139,87,0.25); }
.denial-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  font-family: 'DM Sans', sans-serif;
}

/* ── CLAIMS TABLE ── */
.claims-meta {
  margin-left: auto;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.claims-table-wrap {
  overflow-x: auto;
}
.claims-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
}
.claims-table th {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.claims-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.55);
}
.claims-table tr:last-child td { border-bottom: none; }
.claims-table tr:hover td { background: rgba(255,255,255,0.02); }
.claim-num {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}
.cpt-cell {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}
.date-cell { color: rgba(255,255,255,0.4); white-space: nowrap; }
.status-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.status-paid    { background: rgba(46,139,87,0.15); color: #6fdfa0; border: 1px solid rgba(46,139,87,0.3); }
.status-denied  { background: rgba(220,80,80,0.15); color: #e07070; border: 1px solid rgba(220,80,80,0.3); }
.status-appealed { background: rgba(240,180,41,0.12); color: var(--gold); border: 1px solid rgba(240,180,41,0.25); }
.status-partial  { background: rgba(33,150,181,0.15); color: #64c8e8; border: 1px solid rgba(33,150,181,0.3); }
.status-pending  { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.1); }
.empty-cell { text-align: center; color: rgba(255,255,255,0.25); padding: 32px; }

/* ── FOOTER ── */
.dash-footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
  font-family: 'DM Sans', sans-serif;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .dash-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .dashboard-main { padding: 20px 16px 40px; }
  .dash-nav-inner { padding: 12px 16px; gap: 12px; }
  .dash-nav-title { display: none; }
  .filter-inner { padding: 10px 16px; }
  .filter-tabs { flex-wrap: wrap; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-tile { padding: 18px 14px; }
  .kpi-tile-value { font-size: 1.5rem; }
  .ar-bucket-row { grid-template-columns: 70px 1fr 80px 60px; gap: 10px; }
  .claims-table { font-size: 0.72rem; }
  .claims-table td, .claims-table th { padding: 9px 10px; }
}
@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
}