/* =========================
   Root Variables & Typography
   ========================= */
:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --primary-light: #34d399;
  --secondary-color: #3b82f6;
  --secondary-dark: #2563eb;
  --accent-color: #f59e0b;
  --dark-bg: #1e293b;
  --darker-bg: #0f172a;
  --light-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --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-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-hero: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background-color: #f8fafc;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

main {
  flex: 1;
}

/* =========================
   Navigation
   ========================= */
.navbar {
  background: var(--darker-bg) !important;
  padding: 1.25rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: white !important;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.9;
}

.navbar-brand::before {
  content: "⚡";
  font-size: 1.75rem;
  line-height: 1;
}

.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.navbar-toggler:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 1.5rem;
  height: 1.5rem;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.625rem 1.25rem !important;
  transition: all 0.2s ease;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.9375rem;
}

.navbar-nav .nav-link:hover {
  color: white !important;
  background-color: rgba(16, 185, 129, 0.15);
}

.navbar-nav .nav-link.active {
  color: var(--primary-light) !important;
  background-color: rgba(16, 185, 129, 0.2);
  font-weight: 600;
}

.navbar .btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white !important;
  padding: 0.625rem 1.5rem;
  margin-left: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.navbar .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.dropdown-menu {
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.dropdown-item {
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.dropdown-item:hover {
  background-color: #f1f5f9;
}

.dropdown-divider {
  margin: 0.5rem 0;
  opacity: 0.15;
}

/* =========================
   Buttons
   ========================= */
.btn {
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.025em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #047857 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border: none;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
}

.btn-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.btn-link:hover {
  color: white;
  text-decoration: none;
}

/* =========================
   Cards
   ========================= */
.card {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  background-color: white;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}

.card-header h5 {
  margin-bottom: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Content sections */
section.content-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 15px;
}

/* Feature cards on homepage */
.feature-card {
  height: 100%;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  border-radius: 1rem;
}

.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.1), 0 10px 10px -5px rgba(16, 185, 129, 0.04);
  transform: translateY(-8px);
}

.feature-card .card-body {
  padding: 3rem 2rem;
}

.feature-card .card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feature-card .card-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

/* Info sections */
.info-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  height: 100%;
  border: 1px solid var(--border-color);
}

.info-card h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.info-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.info-card ul {
  list-style: none;
  padding-left: 0;
}

.info-card ul li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.8;
}

.info-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Step numbers */
.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* =========================
   Alerts
   ========================= */
.alert {
  margin-top: 1rem;
  border-radius: 0.5rem;
  border: none;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border-left: 4px solid var(--secondary-color);
}

/* =========================
   Footer
   ========================= */
.footer {
  background: var(--darker-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 2rem;
  margin-top: 6rem;
  border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.footer h5, .footer h6 {
  color: white;
  font-weight: 700;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--primary-light);
}

/* =========================
   Hero Section
   ========================= */
.hero-section {
  padding: 6rem 0;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  z-index: 0;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.display-4 {
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.15;
  font-size: 3.25rem;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.375rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.75;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

/* =========================
   Dashboard Specific
   ========================= */
.dashboard-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.dashboard-header h2 {
  margin: 0;
  font-weight: 700;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 0.75rem;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* =========================
   Login Page
   ========================= */
.login-container {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  max-width: 500px;
  margin: 0 auto;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  padding: 1.125rem 2.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  background: white;
  color: var(--text-primary);
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.google-signin-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
  transform: translateY(-3px);
  color: var(--text-primary);
  background: #fafafa;
}

.google-signin-btn:active {
  transform: translateY(-1px);
}

.google-signin-btn svg {
  flex-shrink: 0;
}

/* =========================
   Utilities
   ========================= */
.text-center {
  text-align: center;
}

.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* =========================
   Card Header Buttons
   ========================= */
.card-header .btn-group {
  gap: 0;
}

.card-header .btn-outline-primary {
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: 500;
  transition: all 0.2s ease;
}

.card-header .btn-outline-primary:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.card-header .btn-outline-primary.active {
  color: var(--primary-color);
  background-color: white;
  border-color: white;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 991px) {
  .navbar-collapse {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
  }
  
  .navbar .btn-primary {
    margin-left: 0;
    margin-top: 0.75rem;
    display: block;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .navbar-brand::before {
    font-size: 1.5rem;
  }
  
  .display-4 {
    font-size: 2.25rem;
  }
  
  .lead {
    font-size: 1.125rem;
  }
  
  .hero-section {
    padding: 4rem 0;
  }
  
  .google-signin-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .feature-card .card-body {
    padding: 2.5rem 1.75rem;
  }
  
  .footer {
    margin-top: 4rem;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1280px;
  }
  
  .display-4 {
    font-size: 3.75rem;
  }
}
