:root {
  /* Modern eco-friendly color palette */
  --eco-primary: #2c8d5f; /* Forest green */
  --eco-secondary: #60a561; /* Leaf green */
  --eco-accent: #4a918e; /* Teal */
  --eco-light: #e8f5e9; /* Light mint */
  --eco-dark: #1b4d3e; /* Deep forest */

  /* Complementary colors */
  --eco-earth: #b0935e; /* Natural earth tone */
  --eco-water: #5a96bb; /* Fresh water blue */
  --eco-stone: #808782; /* Natural stone */

  /* Utility colors */
  --eco-success: #43a047; /* Success green */
  --eco-warning: #e6c74c; /* Warm yellow */
  --eco-danger: #d76050; /* Earthy red */
  --eco-info: #51a9c1; /* Sky blue */

  /* Text and background */
  --eco-text: #2c3e50; /* Dark slate for text */
  --eco-text-light: #576d7e; /* Lighter text */
  --eco-bg: #f9fbf7; /* Off-white background */
  --eco-card-bg: #ffffff; /* Card background */

  /* Border and shadow */
  --eco-border: #d8e4d9; /* Light border color */
  --eco-shadow: rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

/* Base styles */
body {
  background-color: var(--eco-bg);
  color: var(--eco-text);
  font-family: "Nunito", "Segoe UI", -apple-system, BlinkMacSystemFont,
    sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--eco-dark);
  font-weight: 600;
}

a {
  color: var(--eco-accent);
  transition: none;
}

a:hover {
  color: var(--eco-primary);
  text-decoration: none;
}

/* Layout */
.container,
.container-fluid {
  padding: 2rem 1.5rem;
}

.row {
  margin-bottom: 2rem;
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--eco-shadow);
  transition: none;
  overflow: hidden;
  background-color: var(--eco-card-bg);
  margin-bottom: 1.5rem;
  position: relative;
}

.card:hover {
  transform: none;
  box-shadow: 0 4px 12px var(--eco-shadow);
}

.card::after {
  display: none;
}

.card:hover::after {
  opacity: 0;
}

.card-header {
  background-color: var(--eco-light);
  border-bottom: 1px solid var(--eco-border);
  padding: 1rem 1.25rem;
}

.card-header .card-title {
  margin-bottom: 0;
  font-size: 1.1rem;
  color: var(--eco-dark);
}

.card-body {
  padding: 1.5rem;
}

/* Stat cards */
.card.text-white {
  border: none;
}

.card.bg-primary {
  background: linear-gradient(
    135deg,
    var(--eco-primary),
    var(--eco-accent)
  ) !important;
}

.card.bg-success {
  background: linear-gradient(
    135deg,
    var(--eco-success),
    var(--eco-secondary)
  ) !important;
}

.card.bg-info {
  background: linear-gradient(
    135deg,
    var(--eco-info),
    var(--eco-water)
  ) !important;
}

.card.bg-warning {
  background: linear-gradient(
    135deg,
    var(--eco-warning),
    var(--eco-earth)
  ) !important;
}

/* Tables */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table th {
  font-weight: 600;
  color: var(--eco-dark);
  border-top: none;
  border-bottom: 2px solid var(--eco-border);
  padding: 1rem;
}

.table td {
  padding: 1rem;
  border-top: 1px solid var(--eco-border);
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(232, 245, 233, 0.3);
}

.table-hover tbody tr {
  transition: none;
}

.table-hover tbody tr:hover {
  transform: none;
  background-color: rgba(44, 141, 95, 0.05);
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 30px;
  transition: none;
}

.badge:hover {
  transform: none;
}

.bg-success {
  background-color: var(--eco-success) !important;
}

.bg-info {
  background-color: var(--eco-info) !important;
}

.bg-warning {
  background-color: var(--eco-warning) !important;
}

.bg-danger {
  background-color: var(--eco-danger) !important;
}

/* Navigation */
.navbar {
  background-color: var(--eco-card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 0.8rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: none;
}

.navbar.scrolled {
  padding: 0.5rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  color: var(--eco-primary);
  font-size: 1.4rem;
  transition: none;
}

.navbar-brand:hover {
  transform: none;
}

.navbar-brand i {
  transition: none;
}

.navbar-brand:hover i {
  transform: none;
}

.navbar-nav .nav-link {
  color: var(--eco-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: none;
  position: relative;
}

.navbar-nav .nav-link::after {
  display: none;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--eco-primary);
}

.navbar-nav .nav-item {
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  background-color: var(--eco-card-bg);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  min-height: calc(100vh - 56px - 56px); /* Subtract navbar and footer height */
  padding: 0;
  transition: none;
  position: relative;
  z-index: 1;
}

.sidebar-sticky {
  position: sticky;
  top: 0;
  height: calc(100vh - 56px);
  padding-top: 1.5rem;
  overflow-x: hidden;
  overflow-y: auto; /* Scrollable if content is too long */
  scrollbar-width: thin;
  scrollbar-color: var(--eco-border) transparent;
}

.sidebar-sticky::-webkit-scrollbar {
  width: 6px;
}

.sidebar-sticky::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
  background-color: var(--eco-border);
  border-radius: 10px;
}

.sidebar-link {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--eco-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: none;
}

.sidebar-link:hover,
.sidebar-link:focus {
  color: var(--eco-primary);
  background-color: rgba(232, 245, 233, 0.5);
}

.sidebar-link.active {
  color: var(--eco-primary);
  background-color: var(--eco-light);
  border-left-color: var(--eco-primary);
}

.sidebar-link i {
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
}

/* Make space for sidebar on larger screens */
@media (min-width: 768px) {
  .content-area {
    padding-left: 2rem;
  }
}

/* On smaller screens, sidebar becomes top navigation */
@media (max-width: 767.98px) {
  .sidebar {
    min-height: auto;
  }

  .sidebar-sticky {
    height: auto;
    padding-top: 0.5rem;
  }

  .sidebar .nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .sidebar .nav-item {
    width: auto;
  }

  .sidebar-link {
    padding: 0.5rem 1rem;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .sidebar-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--eco-primary);
  }
}

/* Buttons */
.btn {
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: none;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  display: none;
}

.btn:hover::after {
  animation: none;
}

@keyframes ripple {
  0% {
    transform: none;
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 0;
  }
}

.btn-primary {
  background-color: var(--eco-primary);
  box-shadow: 0 4px 10px rgba(44, 141, 95, 0.2);
  transition: none;
}

.btn-primary:hover {
  background-color: var(--eco-dark);
  box-shadow: 0 4px 10px rgba(44, 141, 95, 0.2);
}

.btn-secondary {
  background-color: var(--eco-accent);
  box-shadow: 0 4px 10px rgba(74, 145, 142, 0.2);
  transition: none;
}

.btn-secondary:hover {
  background-color: var(--eco-water);
  box-shadow: 0 4px 10px rgba(74, 145, 142, 0.2);
}

/* Forms */
.form-control {
  border: 1px solid var(--eco-border);
  border-radius: 6px;
  padding: 0.6rem 1rem;
}

.form-control:focus {
  border-color: var(--eco-accent);
  box-shadow: 0 0 0 0.2rem rgba(74, 145, 142, 0.25);
}

/* Charts customization */
.plotly-graph-div path {
  stroke-width: 2px !important;
}

/* Chat content specific styles */
.chat-content {
  max-height: 400px;
  overflow-y: auto;
  word-break: break-word;
  padding: 1rem;
  background-color: rgba(232, 245, 233, 0.3);
  border-radius: 8px;
}

.question-cell {
  border-left: 4px solid var(--eco-success);
  white-space: pre-wrap;
}

.answer-cell {
  border-left: 4px solid var(--eco-info);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card-deck {
    margin-right: 0;
    margin-left: 0;
    flex-direction: column;
  }

  .card-deck .card {
    margin-right: 0;
    margin-left: 0;
  }
}

/* Quick Statistics styling */
.sidebar-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--eco-text-light);
  padding: 0.75rem 1.25rem 0.5rem;
  margin-bottom: 0.5rem;
  transition: none;
}

.sidebar-section {
  margin-bottom: 1.5rem;
  transition: none;
}

.quick-stats {
  padding: 0 0.75rem;
}

.stat-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.5rem;
  margin-bottom: 0.5rem;
  background-color: var(--eco-light);
  border-radius: 8px;
  transition: none;
}

.stat-item:hover {
  background-color: rgba(44, 141, 95, 0.1);
  transform: none;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--eco-primary);
  color: white;
  border-radius: 6px;
  margin-right: 0.75rem;
}

.stat-data {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--eco-text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--eco-dark);
}

/* Sidebar stats styling */
.sidebar-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 0.3rem;
  background-color: var(--eco-light);
  transition: none;
}

.sidebar-stat:hover {
  background-color: rgba(44, 141, 95, 0.15);
  transform: none;
}

.stat-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--eco-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-count {
  background-color: var(--eco-primary);
  color: white;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  min-width: 24px;
  text-align: center;
}

/* Activity styles */
.sidebar-activity {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  margin-bottom: 0.3rem;
  transition: none;
}

.sidebar-activity:hover {
  background-color: rgba(232, 245, 233, 0.5);
}

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--eco-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: var(--eco-primary);
}

.activity-info {
  display: flex;
  flex-direction: column;
}

.activity-user {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--eco-text);
}

.activity-time {
  font-size: 0.7rem;
  color: var(--eco-text-light);
}

/* Animation and transition styles */
@keyframes floatUp {
  0% {
    transform: none;
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: none;
  }
  50% {
    transform: none;
  }
  100% {
    transform: none;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Stat card specific styles */
.stat-card {
  overflow: hidden;
  position: relative;
}

.stat-card::before {
  display: none;
}

.stat-card:hover::before {
  opacity: 0;
  transform: none;
}

/* Chart cards with subtle animations */
.chart-card {
  transition: none;
}

.chart-card:hover {
  box-shadow: 0 4px 12px var(--eco-shadow);
}

.chart-container {
  transition: none;
  min-height: 300px;
}

/* Animate content area */
.content-area {
  transition: none;
}

/* Loading animations */
.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(44, 141, 95, 0.3);
  border-radius: 50%;
  border-top-color: var(--eco-primary);
  animation: none;
}

@keyframes spin {
  0% {
    transform: none;
  }
  100% {
    transform: none;
  }
}

/* Counter animations */
.counter-value {
  display: inline-block;
  transition: none;
}

/* Table row hover animation */
.table-hover tbody tr {
  transition: none;
}

.table-hover tbody tr:hover {
  transform: none;
  background-color: rgba(44, 141, 95, 0.05);
}

/* Enhanced badges with animation */
.badge:hover {
  transform: none;
}

/* Floating action button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--eco-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(44, 141, 95, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 1;
  transform: none;
  transition: none;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  transform: none;
}

.scroll-to-top-btn:hover {
  background: var(--eco-dark);
  box-shadow: 0 4px 12px rgba(44, 141, 95, 0.3);
  transform: none;
}

.scroll-to-top-btn i {
  font-size: 1.2rem;
  transition: none;
}

.scroll-to-top-btn:hover i {
  transform: none;
}

/* Progress indicator for scroll */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1000;
}

.progress-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--eco-primary), var(--eco-accent));
  width: 0%;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 2px 5px rgba(44, 141, 95, 0.2);
}

/* Page transitions */
.page-transition-overlay {
  display: none;
}

.page-transition-overlay.active {
  transform: none;
}

/* Additional hover effects for all buttons */
button::after,
.btn::after,
a.btn::after {
  display: none;
}

button:hover::after,
.btn:hover::after,
a.btn:hover::after {
  animation: none;
}

/* Content fade-in animation */
.content-fade-in {
  opacity: 1;
  transform: none;
  transition: none;
}

.content-fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Enhanced navbar - shrink on scroll */
.navbar.shrink {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Vertical scroll progress indicator */
.scroll-progress-indicator {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 3px;
  height: 100px;
  background-color: rgba(44, 141, 95, 0.1);
  border-radius: 3px;
  z-index: 99;
}

.scroll-progress-indicator::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: var(--eco-primary);
  border-radius: 3px;
  transition: height 0.2s ease;
}

/* Custom focus styles */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 141, 95, 0.3);
  transition: box-shadow 0.3s ease;
}

/* Loader animation */
.eco-loader {
  display: inline-block;
  position: relative;
  width: 50px;
  height: 50px;
}

.eco-loader:after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--eco-primary);
  border-color: var(--eco-primary) transparent var(--eco-primary) transparent;
  animation: none;
}
