@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;600;700&display=swap");

:root {
  --bg: #000;
  --bg-card: linear-gradient(160deg, #121212, #080808);
  --text: #fff;
  --text-soft: #b8b8b8;
  --text-muted: #6f6f6f;
  --text-faint: #4f4f4f;
  --line: #242424;
  --line-strong: #3a3a3a;
  --accent: #c9a84c;
  --accent-soft: rgba(201, 168, 76, 0.18);
  --accent-glow: rgba(201, 168, 76, 0.25);
  --panel-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --grid: rgba(255, 255, 255, 0.03);
}

body[data-theme="light"] {
  --bg: #f5f2ea;
  --bg-card: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(239, 233, 218, 0.92));
  --text: #161616;
  --text-soft: #4d4d4d;
  --text-muted: #7d7462;
  --text-faint: #948a76;
  --line: rgba(25, 25, 25, 0.12);
  --line-strong: rgba(25, 25, 25, 0.22);
  --accent: #a88622;
  --accent-soft: rgba(168, 134, 34, 0.14);
  --accent-glow: rgba(168, 134, 34, 0.18);
  --panel-shadow: 0 24px 60px rgba(50, 35, 0, 0.12);
  --grid: rgba(25, 25, 25, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, var(--grid) 0px, var(--grid) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
  z-index: 5;
}

.landing-page {
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.landing-page.video-focus .bg-video {
  opacity: 0.82;
  filter: saturate(1.02) contrast(1.04) brightness(0.92);
}

.landing-page.video-focus .splash-bg {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.24) 100%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(201, 168, 76, 0.04) 0%, transparent 70%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.035) 0px, rgba(0, 0, 0, 0.035) 1px, transparent 1px, transparent 4px);
}

.landing-page.video-focus .splash-content {
  max-width: 520px;
}

#splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.72;
  filter: saturate(1) contrast(1.02) brightness(0.84);
  pointer-events: none;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.34) 100%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(201, 168, 76, 0.05) 0%, transparent 70%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.04) 0px, rgba(0, 0, 0, 0.04) 1px, transparent 1px, transparent 4px);
  z-index: 1;
}

body[data-theme="light"] .splash-bg {
  background:
    linear-gradient(180deg, rgba(245, 242, 234, 0.58) 0%, rgba(245, 242, 234, 0.78) 100%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(168, 134, 34, 0.08) 0%, transparent 70%),
    repeating-linear-gradient(0deg, rgba(25, 25, 25, 0.03) 0px, rgba(25, 25, 25, 0.03) 1px, transparent 1px, transparent 4px);
}

.scan-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.15), transparent);
  animation: scan 4s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

.splash-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #1a1a1a;
  border-style: solid;
  z-index: 2;
}

body[data-theme="light"] .splash-corner {
  border-color: rgba(25, 25, 25, 0.14);
}

.splash-corner.tl { top: 24px; left: 24px; border-width: 1px 0 0 1px; }
.splash-corner.tr { top: 24px; right: 24px; border-width: 1px 1px 0 0; }
.splash-corner.bl { bottom: 24px; left: 24px; border-width: 0 0 1px 1px; }
.splash-corner.br { bottom: 24px; right: 24px; border-width: 0 1px 1px 0; }

.splash-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 40px 24px;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.splash-top,
.splash-center,
.splash-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-top {
  padding-top: 12px;
}

.splash-center {
  flex: 1;
  justify-content: center;
}

.splash-actions {
  padding-bottom: 20px;
}

.splash-eyebrow,
.section-kicker {
  font-family: "Oswald", sans-serif;
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease 0.2s both;
}

.splash-logo,
.dashboard-logo {
  font-family: "Bebas Neue", cursive;
  font-size: clamp(64px, 20vw, 130px);
  letter-spacing: 4px;
  line-height: 0.9;
  background: linear-gradient(180deg, #fff 0%, #999 35%, #c0c0c0 55%, #555 80%, #222 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.8s ease 0.4s both;
}

body[data-theme="light"] .splash-logo,
body[data-theme="light"] .dashboard-logo {
  background: linear-gradient(180deg, #2f2f2f 0%, #5e5e5e 35%, #a88622 60%, #695117 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-sub,
.dashboard-sub {
  font-family: "Bebas Neue", cursive;
  font-size: clamp(16px, 5vw, 28px);
  letter-spacing: 16px;
  color: var(--text-muted);
  margin-top: 6px;
  animation: fadeUp 0.8s ease 0.6s both;
}

.splash-divider,
.dashboard-divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  margin: 36px auto;
  animation: fadeUp 0.8s ease 0.8s both;
}

.splash-tagline,
.dashboard-tagline {
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 0;
  animation: fadeUp 0.8s ease 0.9s both;
}

.status-text {
  font-size: 13px;
  color: #9a9a9a;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 34px;
  animation: fadeUp 0.8s ease 1s both;
}

.enter-btn,
.secondary-btn,
.theme-toggle,
.dashboard-link {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 290px;
  padding: 18px 28px;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.3s ease;
}

.landing-page .enter-btn + .secondary-btn,
.landing-page .enter-btn + .secondary-btn + .secondary-btn {
  margin-top: 14px;
}

.enter-btn {
  font-family: "Bebas Neue", cursive;
  font-size: 26px;
  letter-spacing: 8px;
  color: #000;
  background: linear-gradient(135deg, #c9a84c 0%, #f5dc6e 40%, #c9a84c 70%, #7a5810 100%);
  border: none;
  box-shadow: 0 0 40px rgba(201, 168, 76, 0.25), 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: fadeUp 0.8s ease 1.1s both;
}

.enter-btn::before,
.theme-toggle::before,
.dashboard-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shimmer 3s ease 2s infinite;
}

.enter-btn:hover,
.secondary-btn:hover,
.theme-toggle:hover,
.dashboard-link:hover {
  transform: scale(1.03);
}

.enter-btn:active,
.secondary-btn:active,
.theme-toggle:active,
.dashboard-link:active {
  transform: scale(0.97);
}

.secondary-btn,
.theme-toggle,
.dashboard-link {
  margin-top: 14px;
  font-family: "Oswald", sans-serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--text);
  background: linear-gradient(160deg, rgba(17, 17, 17, 0.92), rgba(9, 9, 9, 0.94));
  border: 1px solid var(--line);
}

body[data-theme="light"] .secondary-btn,
body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .dashboard-link {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(239, 233, 218, 0.95));
}

.secondary-btn:hover,
.theme-toggle:hover,
.dashboard-link:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.meta-info,
.note,
.auto-open {
  text-transform: uppercase;
  animation: fadeUp 0.8s ease both;
}

.meta-info {
  margin-top: 24px;
  font-size: 11px;
  color: #555;
  letter-spacing: 3px;
  animation-delay: 1.3s;
}

.note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 2px;
  line-height: 1.6;
  animation-delay: 1.35s;
}

.auto-open {
  margin-top: 18px;
  font-size: 11px;
  color: #6a6a6a;
  letter-spacing: 2px;
  animation-delay: 1.4s;
}

.loader-dot-wrap {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease 0.95s both;
}

.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(201, 168, 76, 0.45);
  animation: pulse 1.4s infinite ease-in-out;
}

.loader-dot:nth-child(2) { animation-delay: .2s; }
.loader-dot:nth-child(3) { animation-delay: .4s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(.7); opacity: .45; }
  40% { transform: scale(1.15); opacity: 1; }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  animation: pf linear infinite;
}

@keyframes pf {
  0% { opacity: 0; transform: translateY(100vh); }
  10% { opacity: 0.3; }
  90% { opacity: 0.1; }
  100% { opacity: 0; transform: translateY(-10vh); }
}

.dashboard-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at top, rgba(201, 168, 76, 0.09), transparent 35%), var(--bg);
  padding: 36px 18px 60px;
}

.dashboard-shell {
  position: relative;
  z-index: 2;
  width: min(1400px, 100%);
  margin: 0 auto;
}

.dashboard-hero {
  text-align: center;
  padding: 24px 18px 18px;
  margin-bottom: 26px;
}

.dashboard-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 22px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: var(--panel-shadow);
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
  font: inherit;
}

body[data-theme="light"] .filter-input {
  background: rgba(255, 255, 255, 0.82);
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.filter-btn {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #c9a84c 0%, #f5dc6e 40%, #c9a84c 70%, #7a5810 100%);
  color: #000;
  font-family: "Oswald", sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-reset {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(17, 17, 17, 0.92), rgba(9, 9, 9, 0.94));
  color: var(--text);
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body[data-theme="light"] .filter-reset {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(239, 233, 218, 0.95));
}

.filter-meta {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.theme-toggle,
.dashboard-link {
  min-width: 180px;
  padding: 14px 18px;
}

.theme-toggle {
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card,
.chart-card,
.table-card,
.insight-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: var(--panel-shadow);
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.stat-card {
  padding: 22px 20px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.stat-value {
  font-family: "Bebas Neue", cursive;
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: 3px;
  color: var(--text);
  line-height: 1;
}

.stat-subtext {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.chart-grid.equal {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chart-card,
.table-card,
.insight-card {
  padding: 22px 20px 18px;
}

.card-title {
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.card-subtitle {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.chart-wrap {
  position: relative;
  min-height: 300px;
}

.chart-wrap.small {
  min-height: 250px;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.insight-value {
  font-family: "Bebas Neue", cursive;
  font-size: 40px;
  letter-spacing: 2px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.insight-text {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.table-card {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-soft);
}

th {
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.empty-state {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
  padding: 18px 0 10px;
}

@media (max-width: 1120px) {
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid,
  .insight-list,
  .chart-grid.equal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .filter-bar,
  .landing-page .splash-content,
  .dashboard-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .enter-btn,
  .secondary-btn {
    min-width: 100%;
  }

  .stats-grid,
  .insight-list,
  .chart-grid.equal {
    grid-template-columns: 1fr;
  }

  .splash-sub,
  .dashboard-sub {
    letter-spacing: 10px;
  }

  .splash-tagline,
  .status-text,
  .meta-info,
  .note,
  .auto-open {
    letter-spacing: 2px;
  }

  .dashboard-page {
    padding-top: 20px;
  }

  .chart-wrap {
    min-height: 260px;
  }
}