/* ============================================
   GLOBAL TYPOGRAPHY & SPACING SYSTEM
   ============================================ */

/* Base Font Size */
html {
  font-size: 14px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a202c;
  margin: 0;
  padding: 0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better button hover effects */
.btn:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* Improved shadows */
.shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Gradient Modern Navbar - Matching Hero Section */
.gradient-navbar {
  background: linear-gradient(135deg, #1A522A 0%, #14401F 100%) !important;
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(26, 82, 42, 0.2);
}

.gradient-brand {
  display: flex;
  align-items: center;
  color: white !important;
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.gradient-brand:hover {
  color: white !important;
  transform: translateY(-2px);
}

.gradient-icon-wrapper {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.gradient-brand:hover .gradient-icon-wrapper {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.gradient-nav-link {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  padding: 0.6rem 1.2rem !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 0.3rem;
}

.gradient-nav-link:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.gradient-nav-link i {
  transition: transform 0.3s ease;
}

.gradient-nav-link:hover i {
  transform: translateX(3px);
}

.gradient-signup {
  background: white !important;
  color: #1A522A !important;
  border: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gradient-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: #14401F !important;
}

.gradient-toggler {
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
}

.gradient-toggler .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, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Gradient Footer - Matching Header */
.gradient-footer {
  background: linear-gradient(135deg, #1A522A 0%, #14401F 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0 !important;
}

html, body {
  margin: 0;
  padding: 0;
}

.gradient-footer-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-footer-icon i {
  font-size: 1.5rem;
  color: white;
}

/* ============================================
   DASHBOARD DESIGN SYSTEM
   ============================================ */

/* Typography for Dashboard Pages */
.dashboard-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.dashboard-page-subtitle {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Card Styles - Consistent across all pages */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, #1A522A 0%, #14401F 100%);
  color: white;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  border: none;
}

.card-body {
  padding: 1.5rem;
}

/* Statistics Cards */
.stats-card {
  background: white;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  border: none;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.stats-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.stats-label {
  color: #6c757d;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.stats-change {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Table Styles */
.table-container {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.table-header {
  background: linear-gradient(135deg, #1A522A 0%, #14401F 100%);
  color: white;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.table th {
  background: #f8f9fa;
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #495057;
}

.table td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9375rem;
}

.table tbody tr:hover {
  background: #f8f9fa;
  transition: all 0.2s ease;
}

/* Badge Styles */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
}

/* Button Styles - Enhanced */
.btn {
  border-radius: 12px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary {
  background-color: rgb(26 82 42 / 0.9);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: rgb(26 82 42 / 1);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Form Styles */
.form-label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #1A522A;
  box-shadow: 0 0 0 0.2rem rgba(26, 82, 42, 0.25);
}

.form-control-lg {
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
}

/* Empty State */
.empty-state {
  padding: 3rem;
  text-align: center;
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 3rem;
  color: #adb5bd;
}

/* Spacing Utilities for Dashboard */
.dashboard-spacing-top {
  margin-top: 2rem;
}

.dashboard-spacing-bottom {
  margin-bottom: 2rem;
}

.dashboard-spacing-xl {
  padding: 2rem;
}

/* Page Hero Sections */
.page-hero {
  background: linear-gradient(135deg, #1A522A 0%, #14401F 100%);
  color: white;
  padding: 3.75rem 0;
  border-radius: 20px;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 40px rgba(26, 82, 42, 0.3);
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin: 0;
}

/* Feature Cards */
.feature-card {
  background: white;
  border: none;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(26, 82, 42, 0.2);
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Responsive Typography */
@media (max-width: 992px) {
  .dashboard-page-title {
    font-size: 1.75rem;
  }
  
  .dashboard-page-subtitle {
    font-size: 0.9375rem;
  }
  
  .page-hero h1 {
    font-size: 2rem;
  }
  
  .page-hero p {
    font-size: 1.125rem;
  }
  
  .page-hero {
    padding: 3rem 0;
  }
}

@media (max-width: 768px) {
  .dashboard-page-title {
    font-size: 1.5rem;
  }
  
  .dashboard-page-subtitle {
    font-size: 0.875rem;
  }
  
  .page-hero h1 {
    font-size: 1.75rem;
  }
  
  .page-hero p {
    font-size: 1rem;
  }
  
  .page-hero {
    padding: 2rem 0;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .stats-card {
    padding: 1.5rem;
  }
  
  .stats-value {
    font-size: 1.75rem;
  }
}

/* Section Titles */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.25rem;
  }
}

/* Progress Bars */
.progress {
  border-radius: 8px;
  height: 8px;
  background: #e9ecef;
}

.progress-bar {
  border-radius: 8px;
}

/* Info Cards */
.info-card {
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
}

.info-card-header {
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-bottom: 1px solid #dee2e6;
  font-weight: 700;
  font-size: 1.125rem;
}

.info-label {
  color: #6c757d;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  color: #212529;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Activity Feed */
.activity-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1rem;
}

/* Recent Orders */
.recent-orders {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.order-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.order-item:last-child {
  border-bottom: none;
}

.order-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: white;
}

/* ============================================
   GLOBAL DARK THEME COLORS (QRave palette)
   Applied site-wide
   ============================================ */

/* Base dark background and text */
body {
  background-color: rgb(26 26 26 / var(--tw-bg-opacity, 1)); /* #1A1A1A */
  --tw-bg-opacity: 1;
  color: rgb(235 235 235 / var(--tw-text-opacity, 1));
  --tw-text-opacity: 1;
}

/* Button styles to match primary brand color */
button,
.btn,
.btn-primary {
  background-color: rgb(26 82 42 / 0.9); /* #1A522A @ 90% */
  color: #ffffff;
}

.btn-primary:hover,
.btn:hover,
button:hover {
  background-color: rgb(26 82 42 / 1);
}

/* Tailwind-like utility to match landing page yellow */
.text-yellow-500 {
  --tw-text-opacity: 1;
  color: rgb(234 179 8 / var(--tw-text-opacity, 1)); /* #EAB308 */
}

/* Support for dark text utility used on landing page */
.dark .text-text-dark {
  --tw-text-opacity: 1;
  color: rgb(235 235 235 / var(--tw-text-opacity, 1));
}

/* Literal support for the escaped Tailwind selector present in landing page */
.dark\:text-text-dark:is(.dark *) {
  --tw-text-opacity: 1;
  color: rgb(235 235 235 / var(--tw-text-opacity, 1));
}

/* Optional: ensure Bootstrap primary maps to brand for other components */
:root {
  --bs-primary: #1A522A;
  --bs-primary-rgb: 26, 82, 42;
}

.btn-outline-primary {
  color: #1A522A;
  border-color: #1A522A;
}

.btn-outline-primary:hover {
  background-color: rgba(26, 82, 42, 0.1);
  border-color: #1A522A;
  color: #1A522A;
}

/* Active navigation item uses brand green with white text */
.nav-item.active,
.nav-link.active,
.gradient-nav-link.active {
  background-color: rgb(26 82 42 / 0.9);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(26, 82, 42, 0.35);
  transform: translateX(0);
  border-radius: 8px;
}