/* NRC PARTNER DASHBOARD STYLES
   Brand palette pulled from CRS / Memorial Day LPs:
   - Dark navy: #0b1f3a (hero bg)
   - Deep navy: #00022c (gradient end)
   - Orange accent: #ff7850
   - Light bg: #f1f4fa
   - Success green: #2a8a3a
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  color: #1c2540;
  background: #f1f4fa;
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

/* ---------- TOP BAR ---------- */
.topbar {
  background: linear-gradient(135deg, #0b1f3a 0%, #00022c 100%);
  color: white;
  padding: 18px 24px;
  border-bottom: 3px solid #ff7850;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.brand-lockup {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brand-partner { color: white; }
.brand-times {
  color: #ff7850;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}
.brand-nrc {
  color: white;
  opacity: 0.92;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #b8c2d6;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a8a3a;
  box-shadow: 0 0 8px rgba(42,138,58,0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.live-label { font-weight: 600; color: white; }
.refresh-time { color: #b8c2d6; }

/* ---------- INTRO ---------- */
.intro {
  background: white;
  padding: 40px 24px 30px;
  border-bottom: 1px solid #e5e8ee;
}
.intro-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.intro h1 {
  font-size: 28px;
  font-weight: 800;
  color: #0b1f3a;
  margin-bottom: 8px;
}
.intro p {
  font-size: 16px;
  color: #555;
  max-width: 720px;
}

/* ---------- SUMMARY CARDS ---------- */
.summary {
  padding: 30px 24px;
  background: #f1f4fa;
}
.summary-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 22px 22px;
  box-shadow: 0 2px 8px rgba(11,31,58,0.06);
  border: 1px solid #e5e8ee;
}
.stat-card.highlight {
  background: linear-gradient(135deg, #ff7850 0%, #e86840 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(255,120,80,0.25);
}
.stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6e7890;
  margin-bottom: 8px;
}
.stat-card.highlight .stat-label {
  color: rgba(255,255,255,0.85);
}
.stat-value {
  font-size: 34px;
  font-weight: 800;
  color: #0b1f3a;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-card.highlight .stat-value { color: white; }
.stat-sub {
  font-size: 12px;
  color: #6e7890;
}
.stat-card.highlight .stat-sub { color: rgba(255,255,255,0.85); }

/* ---------- TABLE SECTION ---------- */
.table-section {
  padding: 20px 24px 50px;
}
.table-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(11,31,58,0.06);
  border: 1px solid #e5e8ee;
  overflow: hidden;
}
.table-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e5e8ee;
}
.table-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0b1f3a;
  margin-bottom: 4px;
}
.table-sub {
  font-size: 13px;
  color: #6e7890;
}
.table-wrap {
  overflow-x: auto;
}
.deal-table {
  width: 100%;
  border-collapse: collapse;
}
.deal-table th,
.deal-table td {
  padding: 14px 24px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f0f3f8;
}
.deal-table th {
  background: #f7faff;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7890;
  white-space: nowrap;
}
.deal-table tr:last-child td { border-bottom: none; }
.deal-table tr:hover td { background: #fafcff; }

.col-date { width: 110px; white-space: nowrap; color: #6e7890; font-variant-numeric: tabular-nums; }
.col-customer { font-weight: 600; color: #0b1f3a; }
.col-rv { color: #1c2540; }
.col-state { color: #6e7890; }
.col-fee { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Status pill */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill.won { background: #e6f4ea; color: #2a8a3a; }
.status-pill.lost { background: #fbe9e7; color: #c0392b; }
.status-pill.active { background: #fff3e8; color: #b85820; }
.status-pill.new { background: #e9f0fb; color: #2a5dba; }
.status-pill.default { background: #f0f3f8; color: #6e7890; }

/* Fee display */
.fee-amount { color: #2a8a3a; }
.fee-pending { color: #6e7890; font-weight: 500; }
.fee-dash { color: #c0c8d6; }

/* ---------- STATE MESSAGES ---------- */
.state-message {
  padding: 60px 24px;
  text-align: center;
  font-size: 15px;
  color: #6e7890;
}
.error-message {
  color: #c0392b;
  background: #fbe9e7;
  border-radius: 8px;
  margin: 24px;
  padding: 20px 24px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: white;
  padding: 30px 24px;
  border-top: 1px solid #e5e8ee;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.footer p {
  font-size: 14px;
  color: #6e7890;
  margin-bottom: 8px;
}
.footer-fine {
  font-size: 12px;
  color: #8893ab;
}
.footer-fine strong { color: #1c2540; }
.footer a { color: #ff7850; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .summary-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .topbar { padding: 14px 16px; }
  .brand-lockup { font-size: 15px; }
  .intro { padding: 28px 16px 20px; }
  .intro h1 { font-size: 22px; }
  .summary { padding: 20px 16px; }
  .summary-inner { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px 14px; }
  .stat-value { font-size: 26px; }
  .table-section { padding: 12px 16px 30px; }
  .deal-table th, .deal-table td { padding: 12px 14px; font-size: 13px; }
  .col-state { display: none; }
}
