:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #141417;
  --bg-accent: #1e1e24;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --accent-primary: #3b82f6; /* Electric Blue */
  --accent-secondary: #10b981; /* Pulse Green */
  --border-color: #27272a;
  --card-bg: #18181b;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 80px;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 4rem);
}

/* Navbar */
.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.nav-logo .pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-secondary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-accent);
  border-color: var(--text-secondary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Sections */
section {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0;
}

main > :first-child {
  margin-top: 0;
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(10, 10, 12, 0) 70%);
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent-primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--accent-primary);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.feature-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Dashboard Preview (Visual Component) */
.dashboard-preview {
  margin-top: var(--space-2xl);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
}

.preview-header {
  height: 40px;
  background: var(--bg-accent);
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  gap: var(--space-xs);
  border-bottom: 1px solid var(--border-color);
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: #333; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.preview-content {
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-lg);
  background: #0e0e11;
  min-height: 500px;
}

.preview-sidebar {
  border-right: 1px solid var(--border-color);
  padding-right: var(--space-md);
}

.sidebar-item {
  height: 32px;
  margin-bottom: var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.sidebar-item.active {
  background: rgba(59, 130, 246, 0.15);
}

.preview-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.stat-box {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.stat-line {
  height: 8px;
  background: #333;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: var(--accent-primary);
  width: 60%;
}

.chart-placeholder {
  flex-grow: 1;
  background: rgba(59, 130, 246, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: var(--space-lg);
}

.bar {
  width: 30px;
  background: var(--accent-primary);
  border-radius: 4px 4px 0 0;
  opacity: 0.6;
}

/* Stats Section */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  margin-bottom: var(--space-xs);
  color: var(--accent-primary);
}

.stat-item p {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Footer */
footer {
  margin-top: var(--space-2xl);
  padding: var(--space-2xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-color);
  background: #070708;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  color: var(--text-secondary);
  max-width: 300px;
}

.footer-col h4 {
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.footer-col ul li {
  margin-bottom: var(--space-md);
}

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Placeholder classes */
.placeholder-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
}

.placeholder-image::after {
  content: attr(data-label);
  font-size: 0.8rem;
}

.placeholder-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-accent);
}

.placeholder-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dashboard Page Specific */
.dash-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.dash-sidebar {
  background: #0e0e11;
  border-right: 1px solid var(--border-color);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.dash-content {
  padding: var(--space-xl);
  background: var(--bg-primary);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.dash-nav-list {
  flex-grow: 1;
  margin-top: var(--space-xl);
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.dash-nav-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
}

.dash-nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

.dash-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.alert-card {
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.alert-card .card-title {
  color: var(--accent-alert);
}

.health-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.health-dot.green { background: var(--accent-secondary); box-shadow: 0 0 8px var(--accent-secondary); }
.health-dot.yellow { background: var(--accent-warning); box-shadow: 0 0 8px var(--accent-warning); }
.health-dot.red { background: var(--accent-alert); box-shadow: 0 0 8px var(--accent-alert); }

.sentiment-meter {
  height: 8px;
  background: var(--bg-accent);
  border-radius: var(--radius-full);
  margin: var(--space-md) 0;
  overflow: hidden;
}

.sentiment-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.chart-container {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-top: var(--space-lg);
}

.chart-bar {
  flex: 1;
  background: var(--accent-primary);
  opacity: 0.3;
  border-radius: 4px 4px 0 0;
  transition: opacity 0.3s;
  position: relative;
}

.chart-bar:hover {
  opacity: 0.8;
}

.chart-bar::after {
  content: '';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0;
}

.chart-bar:hover::after {
  content: attr(data-value);
  opacity: 1;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.heatmap-cell {
  aspect-ratio: 1;
  background: var(--bg-accent);
  border-radius: 2px;
}

.heatmap-cell.level-1 { background: rgba(59, 130, 246, 0.2); }
.heatmap-cell.level-2 { background: rgba(59, 130, 246, 0.4); }
.heatmap-cell.level-3 { background: rgba(59, 130, 246, 0.7); }
.heatmap-cell.level-4 { background: var(--accent-primary); }

.mobile-checkin-body {
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.checkin-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.emoji-selector {
  display: flex;
  justify-content: space-between;
  margin: var(--space-xl) 0;
}

.emoji-btn {
  font-size: 2rem;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  background: transparent;
  transition: all 0.2s;
}

.emoji-btn:hover, .emoji-btn.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary);
  transform: scale(1.1);
}

.checkin-textarea {
  width: 100%;
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-primary);
  font-family: inherit;
  resize: none;
  margin-bottom: var(--space-lg);
}

.checkin-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-accent);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-primary); }
input:checked + .slider:before { transform: translateX(20px); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.metric-card {
  padding: var(--space-lg);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.metric-trend {
  font-size: 0.8rem;
  font-weight: 600;
}

.trend-up { color: var(--accent-secondary); }
.trend-down { color: #ef4444; }

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: var(--space-md);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-secondary); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .hero-title { font-size: 3rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
