:root {
  /* Colors - Industrial Refined Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --brand-primary: #1e293b; /* Deep slate */
  --brand-accent: #3b82f6; /* Modern blue */
  --brand-success: #10b981;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  
  /* Glassmorphism & Elevation */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Mobile Container Simulation */
.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-primary);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  padding: var(--space-lg) var(--space-md) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(10px);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.header-actions {
  display: flex;
  gap: var(--space-md);
}

.icon-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.95);
  background: var(--border-light);
}

/* Typography */
h1 { font-size: 24px; font-weight: 700; margin: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 var(--space-md) 0; }
.text-muted { color: var(--text-muted); font-size: 14px; }
.text-bold { font-weight: 600; }

/* Main Content Area */
main {
  flex: 1;
  padding: 0 var(--space-md) 100px;
}

/* Summary Card */
.summary-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: white;
  margin-bottom: var(--space-lg);
  box-shadow: var(--card-shadow-lg);
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.summary-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.summary-unit {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.8;
}

/* Quick Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-card {
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--card-shadow);
}

.stat-label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

/* Activity List */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.activity-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.activity-item:active {
  transform: scale(0.98);
}

.activity-icon {
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
}

.activity-info {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.activity-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.activity-value {
  text-align: right;
  font-weight: 700;
  font-size: 16px;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 100px;
  right: var(--space-lg);
  width: 56px;
  height: 56px;
  background: var(--brand-accent);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  z-index: 90;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: space-around;
  padding: var(--space-sm);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

.nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-md);
}

.label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--brand-primary);
}

.input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  font-size: 16px;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--brand-accent);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: var(--space-md);
}

.btn-secondary {
  width: 100%;
  padding: 16px;
  background: transparent;
  color: var(--brand-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Segmented Control */
.segmented-control {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.segment {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  border-radius: calc(var(--radius-md) - 4px);
  cursor: pointer;
}

.segment.active {
  background: white;
  box-shadow: var(--card-shadow);
  color: var(--brand-accent);
}

/* Placeholder for Icon */
.placeholder-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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