/* ==========================================================================
   BAU Smart Agri LMS (AgriLearn) - Master Stylesheet
   ========================================================================== */

:root {
  /* Surface & Base Colors */
  --color-surface: #f8f9fa;
  --color-surface-dim: #d9dadb;
  --color-surface-bright: #f8f9fa;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #f3f4f5;
  --color-surface-container: #edeeef;
  --color-surface-container-high: #e7e8e9;
  --color-surface-container-highest: #e1e3e4;
  --color-on-surface: #191c1d;
  --color-on-surface-variant: #414844;
  --color-outline: #717973;
  --color-outline-variant: #c1c8c2;

  /* Brand Primary & Containers */
  --color-primary: #012d1d;
  --color-on-primary: #ffffff;
  --color-primary-container: #1b4332;
  --color-on-primary-container: #86af99;
  --color-primary-fixed: #c1ecd4;
  --color-primary-fixed-dim: #a5d0b9;

  /* Secondary (Earthy Gold / Harvest) */
  --color-secondary: #7d562d;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #ffca98;
  --color-on-secondary-container: #7a532a;
  --color-secondary-fixed: #ffdcbd;
  --color-secondary-fixed-dim: #f0bd8b;

  /* Tertiary (Deep Agri Emerald) */
  --color-tertiary: #002d1c;
  --color-on-tertiary: #ffffff;
  --color-tertiary-container: #00452e;
  --color-on-tertiary-container: #75b393;
  --color-tertiary-fixed: #b1f0ce;
  --color-tertiary-fixed-dim: #95d4b3;

  /* Alert / Error / Success */
  --color-error: #ba1a1a;
  --color-on-error: #ffffff;
  --color-error-container: #ffdad6;
  --color-on-error-container: #93000a;
  --color-success: #2d6a4f;
  --color-success-container: #d8f3dc;

  /* Ambient Custom Shadows */
  --custom-shadow: 0px 4px 20px rgba(27, 67, 50, 0.08);
  --custom-shadow-hover: 0px 8px 30px rgba(27, 67, 50, 0.14);
  --custom-shadow-lg: 0px 14px 40px rgba(27, 67, 50, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
}

.dark {
  --color-surface: #121614;
  --color-surface-dim: #0d100f;
  --color-surface-bright: #1c221f;
  --color-surface-container-lowest: #161c19;
  --color-surface-container-low: #1b231f;
  --color-surface-container: #212925;
  --color-surface-container-high: #29332e;
  --color-surface-container-highest: #323d38;
  --color-on-surface: #e1e4e2;
  --color-on-surface-variant: #a3aca6;
  --color-outline: #89938c;
  --color-outline-variant: #3a453f;

  --color-primary: #a5d0b9;
  --color-on-primary: #003823;
  --color-primary-container: #1b4332;
  --color-on-primary-container: #c1ecd4;

  --color-secondary: #f0bd8b;
  --color-on-secondary: #482904;
  --color-secondary-container: #633f18;
  --color-on-secondary-container: #ffdcbd;

  --color-tertiary: #95d4b3;
  --color-on-tertiary: #003823;
  --color-tertiary-container: #00452e;
  --color-on-tertiary-container: #b1f0ce;

  --custom-shadow: 0px 4px 20px rgba(0, 0, 0, 0.45);
  --custom-shadow-hover: 0px 8px 30px rgba(0, 0, 0, 0.65);
  --glass-bg: rgba(22, 28, 25, 0.88);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Base Body Styles */
body {
  font-family: 'Inter', 'Hind Siliguri', system-ui, -apple-system, sans-serif;
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Custom Utilities */
.custom-shadow {
  box-shadow: var(--custom-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.custom-shadow:hover {
  box-shadow: var(--custom-shadow-hover);
}

.border-accent-gold {
  border-left: 4px solid #7d562d;
}

.border-accent-green {
  border-left: 4px solid #1b4332;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(113, 121, 115, 0.3);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(113, 121, 115, 0.6);
}

/* Active Nav Indicator */
.nav-item-active {
  background: rgba(27, 67, 50, 0.12);
  color: #012d1d !important;
  font-weight: 700;
  border-left: 4px solid #012d1d;
}

.dark .nav-item-active {
  background: rgba(165, 208, 185, 0.15);
  color: #a5d0b9 !important;
  border-left: 4px solid #a5d0b9;
}

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

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(27, 67, 50, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(27, 67, 50, 0);
  }
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

/* Typing indicator dots */
@keyframes typingBounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
}

.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

/* Progress bar fill transition */
.progress-fill {
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bengali font tweaks */
.lang-bn {
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
  line-height: 1.6 !important;
}

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(1, 45, 29, 0.45);
  backdrop-filter: blur(4px);
}
