/* Survey Intelligence Hub — Styles */
/* Corporate white theme, Inter font */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --white: #ffffff;
  --off-white: #f8f8f6;
  --surface: #f2f2ef;
  --border: #e4e4e0;
  --border-soft: #eeeeeb;
  --ink: #111110;
  --ink-2: #2c2c2a;
  --muted: #6b6b67;
  --subtle: #9c9c98;
  --blue: #1d4ed8;
  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;
  --green: #166534;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --yellow: #d97706;
  --yellow-bg: #fffbeb;
  --color-text-primary: var(--ink);
  --color-text-secondary: var(--muted);
  --color-text-tertiary: var(--subtle);
  --color-text-success: var(--green);
  --color-text-warning: var(--yellow);
  --color-text-danger: var(--red);
  --color-text-info: var(--blue);
  --color-background-primary: var(--white);
  --color-background-secondary: var(--off-white);
  --color-background-success: var(--green-bg);
  --color-background-warning: var(--yellow-bg);
  --color-background-danger: var(--red-bg);
  --color-border-tertiary: var(--border);
  --color-border-secondary: #d4d4d0;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--off-white);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */
.navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.navbar-content {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.navbar-nav {
  display: flex;
  gap: 32px;
}

.navbar-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 4px 0;
}

.navbar-nav a:hover {
  color: var(--ink);
}

.navbar-nav a.active {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

/* ── Landing Hero ── */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 80px 48px;
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: white;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--ink-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  border-color: var(--color-border-secondary);
  background: var(--off-white);
}

/* ── Stats Band ── */
.stats-band {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 28px 48px;
}

.stats-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  padding: 0 32px;
  border-right: 1px solid var(--border);
}

.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 11.5px;
  color: var(--subtle);
  font-weight: 400;
}

/* ── Features Section ── */
.features {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 72px 48px;
}

.features-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 10px;
}

.features h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 28px 28px;
  border-radius: var(--border-radius-lg);
  background: var(--off-white);
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  background: var(--white);
  border-color: var(--color-border-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.feature-icon {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 13.5px;
}

/* ── CTA Section ── */
.cta-section {
  background: var(--ink);
  padding: 72px 48px;
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.cta-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta-section p {
  color: rgba(255,255,255,0.6);
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.7;
}

.cta-section .btn-primary {
  background: white;
  color: var(--ink);
}

.cta-section .btn-primary:hover {
  background: var(--off-white);
}

/* ── Footer ── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 48px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--subtle);
  letter-spacing: 0.02em;
}

.footer-copy {
  font-size: 12px;
  color: var(--subtle);
}

/* ── Dashboard App Pages ── */

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px;
}

/* Page */
.page {
  padding: 0;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.top-bar h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.top-bar .meta {
  font-size: 12px;
  color: var(--subtle);
  margin-top: 2px;
}

.top-bar button {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--muted);
  transition: all 0.2s;
}

.top-bar button:hover {
  background: var(--off-white);
  border-color: var(--color-border-secondary);
  color: var(--ink);
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  color: var(--muted);
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all 0.2s;
}

.tab:hover {
  background: var(--off-white);
  color: var(--ink);
}

.tab.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
  margin-bottom: -1px;
  background: transparent;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.kpi {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  padding: 16px 18px;
}

.kpi .label {
  font-size: 11.5px;
  color: var(--subtle);
  margin-bottom: 6px;
  font-weight: 500;
}

.kpi .value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.kpi .sub {
  font-size: 11px;
  color: var(--subtle);
  margin-top: 4px;
}

.kpi.warn .value { color: var(--yellow); }
.kpi.danger .value { color: var(--red); }
.kpi.ok .value { color: var(--green); }

/* Section Title */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

/* Card */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 18px 20px;
}

/* Tables */
.surveyor-table,
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.surveyor-table th,
.detail-table th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 11px;
  color: var(--subtle);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.surveyor-table td,
.detail-table td {
  padding: 8px 8px;
  color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}

.surveyor-table tr:last-child td,
.detail-table tr:last-child td {
  border-bottom: none;
}

.surveyor-table tr:hover td,
.detail-table tr:hover td {
  background: var(--off-white);
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.badge.red {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fecaca;
}

.badge.yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid #fed7aa;
}

.badge.green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

/* Bar Charts */
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.bar-label {
  font-size: 12px;
  color: var(--muted);
  width: 96px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bar-fill.red { background: #E24B4A; }
.bar-fill.amber { background: #d97706; }
.bar-fill.teal { background: #059669; }

.bar-val {
  font-size: 12px;
  color: var(--muted);
  width: 34px;
  text-align: right;
  font-weight: 500;
}

/* Flag List */
.flag-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flag-name {
  font-size: 12.5px;
  color: var(--ink);
}

.flag-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Section Row */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.see-all {
  font-size: 12px;
  color: var(--blue);
  cursor: pointer;
  transition: color 0.2s;
  font-weight: 500;
}

.see-all:hover { color: #1e40af; }

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Profile Grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-card:hover {
  border-color: var(--color-border-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.profile-card .p-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-card .p-count {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.profile-card .p-pct {
  font-size: 11px;
  color: var(--subtle);
  margin-top: 4px;
}

.p-count.valid  { color: #059669; }
.p-count.review { color: #d97706; }
.p-count.drop   { color: #dc2626; }

/* Score Chips */
.score-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.score-chip.high {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.score-chip.mid {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid #fed7aa;
}

.score-chip.low {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fecaca;
}

/* Fraud Meter */
.fraud-meter {
  margin-bottom: 20px;
}

.meter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.meter-name {
  font-size: 12.5px;
  color: var(--ink);
  width: 144px;
  flex-shrink: 0;
}

.meter-track {
  flex: 1;
  height: 6px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.meter-fill.low-risk  { background: #059669; }
.meter-fill.mid-risk  { background: #d97706; }
.meter-fill.high-risk { background: #dc2626; }

.meter-pct {
  font-size: 12px;
  font-weight: 600;
  width: 38px;
  text-align: right;
}

.meter-pct.low-risk  { color: #059669; }
.meter-pct.mid-risk  { color: #d97706; }
.meter-pct.high-risk { color: #dc2626; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .navbar { padding: 0 24px; }
  .hero { padding: 60px 24px; }
  .stats-band { padding: 24px 24px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stat-item { border-right: none; padding: 0; }
  .features { padding: 56px 24px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-section { padding: 56px 24px; }
  .site-footer { padding: 20px 24px; }
  .container { padding: 20px 24px; }
}

@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .navbar-nav { gap: 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .navbar-content { flex-direction: column; gap: 12px; padding: 12px 0; }
  .hero h1 { font-size: 1.75rem; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
