/* Career Performance Dashboard — ListerPros (Q1 design system) */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.hidden { display: none !important; }

/* Loading */
.loading-screen {
  position: fixed; inset: 0; background: #fff; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.loading-content { text-align: center; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #e5e7eb; border-top-color: #0066FF;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: #6b7280; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #f0f0f0;
  padding: 0 40px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-weight: 800; font-size: 22px; color: #1a1a1a; letter-spacing: -.5px; display: flex; align-items: center; }
.btn-cta {
  background: #0066FF; color: #fff;
  font-weight: 600; font-size: 14px;
  padding: 10px 24px; border-radius: 980px;
  transition: background .2s;
}
.btn-cta:hover { background: #0052cc; }

/* Agent Header (hero) */
.agent-header {
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  padding: 48px 24px 64px;
  text-align: center; color: #fff;
}
.hero-badge-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 16px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.agent-header h1 {
  font-size: clamp(24px, 4vw, 32px); font-weight: 800;
  margin-bottom: 4px; letter-spacing: -0.5px;
}
.agent-office { font-size: 14px; color: rgba(255, 255, 255, 0.7); margin-bottom: 12px; }
.agent-perf-badge {
  display: inline-block; padding: 6px 16px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
}
.perf-career { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

/* Container */
.container { max-width: 800px; margin: 0 auto; padding: 0 32px; }

/* Metrics */
.metrics { margin-top: 24px; margin-bottom: 48px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.stat-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 24px 20px; text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.sc-value { font-size: 32px; font-weight: 800; color: #1a1a1a; margin-bottom: 4px; letter-spacing: -0.5px; }
.sc-label { font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; }

/* Section title */
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #1a1a1a; }

/* Split */
.split-section { margin-bottom: 48px; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 24px; text-align: center;
}
.split-header {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px; color: #6b7280;
}
.listing-side .split-header { color: #7c3aed; }
.selling-side .split-header { color: #0891b2; }
.split-deals { font-size: 36px; font-weight: 800; letter-spacing: -0.5px; }
.listing-side .split-deals { color: #7c3aed; }
.selling-side .split-deals { color: #0891b2; }
.split-volume { font-size: 20px; font-weight: 700; color: #1a1a1a; margin-top: 12px; }
.split-label { font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* Chart */
.chart-section { margin-bottom: 48px; }
.chart-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.chart-tab {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 8px 20px;
  font-size: 13px; font-weight: 600;
  color: #6b7280; transition: all .15s; font-family: inherit;
}
.chart-tab:hover { border-color: #0066FF; color: #0066FF; }
.chart-tab.active { background: #0066FF; border-color: #0066FF; color: #fff; }
.chart-container {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 20px;
}

/* Table */
.table-section { margin-bottom: 48px; }
.table-wrapper {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: #f9fafb; }
th {
  padding: 12px 16px; text-align: left;
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px;
  color: #6b7280;
}
td { padding: 12px 16px; border-top: 1px solid #f3f4f6; }
tr:hover td { background: #fafbfc; }
.year-best { background: #eff6ff !important; font-weight: 700; }
.year-best td:first-child { color: #0066FF; }

/* Expandable rows */
.year-row { cursor: pointer; }
.year-row:hover td { background: #eff6ff; }
.year-row td:first-child::before {
  content: "\25B6"; font-size: 9px; margin-right: 8px;
  color: #9ca3af; transition: transform .2s; display: inline-block;
}
.year-row.expanded td:first-child::before { transform: rotate(90deg); color: #0066FF; }
.deal-detail-row { display: none; }
.deal-detail-row.visible { display: table-row; }
.deal-detail-row td { padding: 0; border-top: none; }
.deal-table { width: 100%; font-size: 12px; background: #f9fafb; }
.deal-table th { font-size: 10px; padding: 8px 12px; background: #f3f4f6; color: #6b7280; }
.deal-table td { padding: 6px 12px; font-size: 12px; border-top: 1px solid #eef1f5; }
.deal-table tr:hover td { background: #eef1f5; }
.deal-side-listing { color: #7c3aed; font-weight: 600; }
.deal-side-buyer { color: #0891b2; font-weight: 600; }

/* Offices */
.offices-section { margin-bottom: 48px; }
.offices-list { display: flex; flex-wrap: wrap; gap: 8px; }
.office-tag {
  background: #eff6ff; color: #0066FF;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  border: 1px solid #dbeafe;
}

/* License */
.license-section { margin-bottom: 48px; }
.license-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.license-item {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 16px;
}
.license-item-label {
  font-size: 11px; text-transform: uppercase;
  color: #9ca3af; letter-spacing: .5px; font-weight: 600;
}
.license-item-value { font-size: 15px; font-weight: 600; margin-top: 4px; color: #1a1a1a; }
.lic-active { color: #16a34a; }
.lic-terminated { color: #dc2626; }

/* Projection Callout */
.projection-section { margin-bottom: 48px; }
.projection-card {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-radius: 16px; padding: 24px;
}
.projection-header { text-align: center; margin-bottom: 20px; }
.projection-badge {
  display: inline-block;
  background: #0066FF; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 6px 16px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 1px;
}
.projection-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr auto 1fr;
  gap: 12px; align-items: center;
  margin-bottom: 16px;
}
.projection-item { text-align: center; }
.projection-label {
  font-size: 11px; font-weight: 600;
  color: #6b7280; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 4px;
}
.projection-value {
  font-size: 24px; font-weight: 800;
  color: #1a1a1a; letter-spacing: -0.5px;
}
.projection-future .projection-value { color: #0066FF; }
.projection-arrow {
  font-size: 20px; color: #93c5fd;
  font-weight: 700; padding: 0 4px;
}
.projection-caption {
  text-align: center; font-size: 12px;
  color: #6b7280; font-style: italic;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #0066FF, #0052cc);
  border-radius: 16px; padding: 40px 24px;
  text-align: center; margin: 32px 0 48px;
  color: #fff;
}
.cta-banner h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.cta-banner .cta-sub { font-size: 14px; opacity: 0.9; margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.cta-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; max-width: 520px;
  margin: 0 auto 28px;
}
.cta-feature {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px; padding: 14px 8px;
  backdrop-filter: blur(8px);
}
.cta-feature-value { font-size: 18px; font-weight: 800; margin-bottom: 2px; letter-spacing: -0.3px; }
.cta-feature-label { font-size: 11px; opacity: 0.85; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.cta-btn {
  display: inline-block;
  background: #fff; color: #0066FF;
  font-weight: 700; font-size: 15px;
  padding: 14px 32px; border-radius: 10px;
  transition: transform .15s;
}
.cta-btn:hover { transform: translateY(-1px); }

/* Data Note */
.data-note {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 12px; padding: 20px 24px;
  margin-bottom: 32px;
}
.data-note-title {
  font-size: 13px; font-weight: 700; color: #92400e;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px;
}
.data-note p { font-size: 13px; color: #78350f; line-height: 1.6; }
.data-note a { color: #0066FF; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(0,102,255,.3); text-underline-offset: 2px; }
.data-note a:hover { text-decoration-color: #0066FF; }

/* Footer */
.site-footer { background: #1a1a1a; color: #fff; padding: 40px 24px; margin-top: 40px; }
.footer-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.footer-logo { font-weight: 800; font-size: 20px; margin-bottom: 16px; }
.footer-disc {
  font-size: 12px; color: #9ca3af; line-height: 1.6;
  margin-bottom: 16px; max-width: 560px;
  margin-left: auto; margin-right: auto;
}
.footer-links { display: flex; gap: 16px; justify-content: center; margin-bottom: 16px; }
.footer-links a { font-size: 12px; color: #9ca3af; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; color: #6b7280; }

/* Not Found */
.not-found { min-height: 100vh; background: #fff; }
.not-found .nf-inner {
  max-width: 480px; margin: 80px auto;
  padding: 0 24px; text-align: center;
}
.not-found h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.not-found p { color: #6b7280; font-size: 15px; margin-bottom: 24px; }

/* =============== Market Dashboard additions =============== */
.market-hero { padding-bottom: 40px; }
.hero-switch {
  display: inline-flex; gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px; border-radius: 999px;
  margin-top: 20px;
  backdrop-filter: blur(8px);
}
.hero-switch-btn {
  padding: 8px 18px; font-size: 13px;
  font-weight: 600; color: rgba(255,255,255,0.75);
  border-radius: 999px; transition: all .15s;
}
.hero-switch-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.hero-switch-btn.active { background: #fff; color: #0066FF; }

.container { max-width: 1040px; }

.metrics-header { margin-bottom: 16px; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ytd-subtitle { font-size: 12px; color: #9ca3af; font-weight: 500; text-transform: none; letter-spacing: 0; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sc-delta {
  font-size: 11px; margin-top: 6px; font-weight: 600;
  color: #6b7280;
}
.sc-delta.up   { color: #059669; }
.sc-delta.down { color: #dc2626; }

.chart-caption {
  display: inline-block; margin-left: 6px;
  font-size: 12px; font-weight: 500; color: #9ca3af;
  text-transform: none; letter-spacing: 0;
}
.chart-note {
  margin-top: 10px; font-size: 12px; color: #6b7280;
  font-style: italic; line-height: 1.5;
}

.insights-section { margin-bottom: 48px; }
.insights-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.insight-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 18px 20px;
  border-left: 4px solid #0066FF;
}
.insight-card.up    { border-left-color: #059669; }
.insight-card.down  { border-left-color: #dc2626; }
.insight-card.note  { border-left-color: #f59e0b; }
.insight-title {
  font-size: 12px; font-weight: 700;
  color: #6b7280; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 6px;
}
.insight-body { font-size: 14px; color: #1a1a1a; line-height: 1.5; }
.insight-highlight { color: #0066FF; font-weight: 700; }

.market-table th.num, .market-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.market-table tbody td { font-size: 13px; }
.market-table .month-row td { background: #f9fafb; padding: 6px 16px; font-size: 12px; }
.market-table .month-row td:first-child { padding-left: 44px; color: #6b7280; }
.bar-chip {
  display: inline-block; height: 6px; min-width: 2px;
  background: #0066FF; border-radius: 3px; vertical-align: middle;
  margin-right: 6px;
}
.bar-chip.closed    { background: #059669; }
.bar-chip.cancelled { background: #ea580c; }
.bar-chip.expired   { background: #dc2626; }
.bar-chip.other     { background: #9ca3af; }

.overview-grid {
  display: grid; gap: 16px; margin-bottom: 32px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.market-compare-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 20px 22px;
}
.mc-market {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #6b7280;
  margin-bottom: 4px;
}
.mc-market.phx { color: #0066FF; }
.mc-market.tuc { color: #7c3aed; }
.mc-value { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 2px; }
.mc-label { font-size: 12px; color: #6b7280; }

/* Responsive */
@media (max-width: 768px) {
  .site-header { padding: 0 20px; }
  .container { padding: 0 20px; }
  .split-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .agent-header { padding: 40px 20px 56px; }
  .agent-header h1 { font-size: 24px; }
  .sc-value { font-size: 26px; }
  .split-deals { font-size: 30px; }
  .cta-banner { padding: 32px 20px; }
  .cta-banner h3 { font-size: 20px; }
  .market-table { font-size: 12px; }
  .market-table th, .market-table td { padding: 8px 10px; }
}
@media (max-width: 640px) {
  .projection-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .projection-arrow { display: none; }
  .cta-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .chart-tabs { flex-wrap: wrap; }
  table { font-size: 13px; }
  th, td { padding: 10px 12px; }
}
