/* Color System Variables */
:root {
  --bg-dark: #090d16;
  --surface-dark: #121826;
  --surface-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --brand-primary: #6366f1;
  --brand-primary-hover: #4f46e5;
  --brand-glow: rgba(99, 102, 241, 0.15);
  --curve-easing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset rules */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Global Navbar Styling */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid var(--surface-border);
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  margin-right: 28px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Button UI Utilities */
.btn-text {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.btn-text:hover { color: var(--text-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s var(--curve-easing), background-color 0.2s var(--curve-easing);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-primary { background: var(--brand-primary); color: white; }
.btn-primary:hover { background: var(--brand-primary-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-dark); color: var(--text-primary); border: 1px solid var(--surface-border); }
.btn-secondary:hover { background: rgba(255,255,255,0.03); transform: translateY(-1px); }

/* Hero Core Grid Layout */
.hero-section { padding: 100px 0 140px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }

.badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

h1 { font-size: 3.8rem; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 24px; font-weight: 800; }
p { color: var(--text-secondary); font-size: 1.15rem; line-height: 1.6; margin-bottom: 36px; }
.cta-group { display: flex; gap: 16px; margin-bottom: 48px; }

/* Social Proof Text */
.social-proof { font-size: 0.85rem; color: #4b5563; }
.proof-logos { display: flex; gap: 24px; margin-top: 12px; font-size: 1rem; color: #6b7280; }

/* Dashboard UI Mockup Frame */
.dashboard-window {
  background: var(--surface-dark);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8), 0 0 80px 0 var(--brand-glow);
  overflow: hidden;
}
.window-header {
  background: rgba(0, 0, 0, 0.2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--surface-border);
}
.window-dots { display: flex; gap: 6px; margin-right: 20px; }
.dot { width: 8px; height: 8px; background: rgba(255,255,255,0.15); border-radius: 50%; }
.window-tab { font-size: 0.75rem; color: var(--text-secondary); font-family: monospace; }

.window-body { display: flex; height: 320px; }
.mockup-sidebar { width: 50px; background: rgba(0,0,0,0.1); border-right: 1px solid var(--surface-border); padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.sb-item { width: 20px; height: 20px; background: rgba(255,255,255,0.05); border-radius: 4px; }
.sb-item.active { background: var(--brand-primary); }

.mockup-content { flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.mockup-stats { display: flex; gap: 16px; }
.stat-card { flex: 1; background: rgba(255,255,255,0.02); border: 1px solid var(--surface-border); padding: 16px; border-radius: 8px; }
.stat-card .label { display: block; font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; }
.stat-card .value { font-size: 1.4rem; font-weight: 700; color: white; }

.mockup-chart { flex: 1; display: flex; align-items: flex-end; gap: 12px; padding-top: 20px; border-bottom: 1px solid var(--surface-border); }
.chart-bar { flex: 1; background: linear-gradient(to top, var(--brand-primary), #818cf8); height: var(--height); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: barGrow 1.2s var(--curve-easing) 0.6s forwards; scale: 1 0; }

/* Custom Keyframe Entrance Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes barGrow {
  to { scale: 1 1; }
}

.animate-slide-up { opacity: 0; animation: fadeInUp 0.8s var(--curve-easing) forwards; }
.animate-fade-in { opacity: 0; animation: fadeIn 1s ease forwards; }
.animate-scale-up { opacity: 0; animation: scaleIn 1s var(--curve-easing) forwards; }

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

/* Responsive break rules */
@media (max-width: 968px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .cta-group { justify-content: center; }
  .social-proof { display: flex; flex-direction: column; align-items: center; }
  .proof-logos { justify-content: center; }
  h1 { font-size: 2.8rem; }
  .nav-links { display: none; }
}

/* ==========================================
   Dashboard Application Additions
   ========================================== */
.app-body {
  background-color: #070a12;
  overflow: hidden;
  height: 100vh;
}

.dashboard-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styling Engine */
.app-sidebar {
  width: 260px;
  background-color: var(--surface-dark);
  border-right: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 40px;
}
.sidebar-brand img { width: 24px; height: 24px; }

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.menu-item:hover, .menu-item.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}
.menu-item.active {
  background-color: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

/* App Main Panel Engine Layout */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px;
  overflow-y: auto;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}
.app-header h2 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.app-header p { font-size: 0.95rem; color: var(--text-secondary); margin: 0; }

/* Grid & Responsive Widgets layout rules */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.widget-card {
  background-color: var(--surface-dark);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 24px;
}

.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.meta-label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }

.badge-success { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }

.card-value { font-size: 2.2rem; font-weight: 700; color: #fff; margin-bottom: 8px; letter-spacing: -0.02em; }
.card-value .unit { font-size: 1.1rem; color: var(--text-secondary); margin-left: 4px; }

.card-footer-text { font-size: 0.8rem; color: var(--text-secondary); }
.text-success { color: #34d399; }
.text-warning { color: #fbbf24; }

/* Interactive Line Chart UI Layer */
.chart-section { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.chart-header h3 { font-size: 1.2rem; font-weight: 600; }
.chart-header p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.chart-canvas-wrapper { width: 100%; background: rgba(0,0,0,0.15); border-radius: 8px; padding: 12px; }

@media (max-width: 768px) {
  .dashboard-container { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; padding: 16px; }
  .sidebar-brand { margin-bottom: 16px; }
  .app-main { padding: 20px; }
}
