/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* === Layout === */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* === Header === */
.header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: #6d28d9;
}
.logo-dot {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { font-size: 14px; color: #64748b; font-weight: 500; transition: color 0.15s; }
.nav a:hover { color: #0f172a; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.4);
  transform: translateY(-1px);
}
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-outline {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-ghost {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  padding: 8px 18px;
  font-size: 13px;
}
.btn-ghost:hover { background: rgba(124, 58, 237, 0.14); }

/* === Hero === */
.hero {
  background: linear-gradient(160deg, #faf5ff 0%, #ede9fe 30%, #e0e7ff 60%, #f0f9ff 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1e1b4b 0%, #6d28d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  color: #64748b;
  font-size: 18px;
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* === Features === */
.features { padding: 80px 0; }
.features h2 { text-align: center; font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.features-subtitle { text-align: center; color: #64748b; font-size: 16px; margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #3b82f6);
  opacity: 0;
  transition: opacity 0.25s;
}
.feature-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.feature-card:hover::before { opacity: 1; }
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { color: #64748b; font-size: 14px; line-height: 1.7; }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.icon-purple { background: #f3e8ff; color: #7c3aed; }
.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-emerald { background: #d1fae5; color: #059669; }

/* === Footer === */
.footer {
  border-top: 1px solid #e2e8f0;
  padding: 28px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  background: #fff;
}

/* ================================================
   DASHBOARD STYLES
   ================================================ */

.dashboard-page { background: #f1f5f9; min-height: 100vh; }

/* === Notice Banner === */
.banner {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  margin-bottom: 28px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.banner-icon {
  width: 28px;
  height: 28px;
  background: #fbbf24;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.banner-text strong { color: #92400e; }
.banner-text p { color: #78350f; margin: 0; font-size: 13px; }

/* === Dashboard Title === */
.dashboard-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #0f172a;
}
.dashboard-subtitle {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 28px;
}

/* === Filters Bar === */
.filters {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 18px 22px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}
.filter-group label { font-weight: 600; white-space: nowrap; }
.filter-group input,
.filter-group select {
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  background: #f8fafc;
  transition: border-color 0.15s;
}
.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.filter-group input[type="date"] { width: 145px; }
.btn-apply {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
}
.btn-apply:hover {
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.35);
  transform: translateY(-1px);
}

/* === Debug Panel === */
.debug-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #f1f5f9;
}
.debug-header h3 {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
}
.debug-toggle {
  font-size: 12px;
  background: #f1f5f9;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #64748b;
  font-weight: 500;
  transition: background 0.15s;
}
.debug-toggle:hover { background: #e2e8f0; }
.debug-body {
  padding: 0 18px 18px;
  max-height: 280px;
  overflow-y: auto;
}
.debug-body pre {
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  font-size: 11.5px;
  line-height: 1.6;
  color: #475569;
  white-space: pre-wrap;
  word-break: break-all;
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
}
.debug-body.hidden { display: none; }

/* === Info Cards === */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.info-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s;
}
.info-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.info-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
}
.info-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-card-icon.purple { background: #f3e8ff; color: #7c3aed; }
.info-card-icon.blue { background: #e0f2fe; color: #0284c7; }
.info-card-icon.amber { background: #fef3c7; color: #d97706; }
.info-card p { font-size: 14px; color: #64748b; margin-bottom: 4px; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* === Metrics Table === */
.metrics-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.metrics-header {
  padding: 18px 22px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metrics-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}
.metrics-header span { font-size: 13px; color: #94a3b8; font-weight: 400; }
.metrics-empty {
  padding: 48px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  background: #f8fafc;
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
  color: #334155;
}
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: #f8fafc; }
tfoot td {
  padding: 12px 14px;
  font-weight: 700;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
  color: #0f172a;
}
.action-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.15s;
}
.action-btn:hover {
  background: #f3e8ff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

/* === Loading === */
.loading-text { color: #94a3b8; font-size: 14px; }

/* === Policy pages === */
.policy-page { padding: 48px 24px 60px; }
.policy-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.policy-page h2 { font-size: 18px; font-weight: 600; margin-top: 28px; margin-bottom: 10px; color: #1e293b; }
.policy-page p, .policy-page li { font-size: 15px; color: #475569; line-height: 1.8; }
.policy-page ul, .policy-page ol { padding-left: 20px; margin: 10px 0; }
.policy-page a { color: #7c3aed; }
.policy-page a:hover { text-decoration: underline; }

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .features-grid { grid-template-columns: 1fr; }
  .cards-row { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .nav { gap: 12px; font-size: 12px; }
  .header-inner { height: 54px; }
}
