/* =====================================================================
   CORE DESIGN SYSTEM: KELOMPOK TANI GEBER TABUR RW 012
   ===================================================================== */

:root {
  --primary-color: #2e7d32;      /* Medium Agriculture Green */
  --primary-dark: #1b5e20;       /* Dark Forest Green */
  --primary-light: #e8f5e9;      /* Pastel Green Background */
  --accent-color: #4caf50;       /* Vibrant Leaf Green */
  --accent-orange: #ff9800;      /* Harvest Orange */
  --bg-light: #f4f7f6;           /* Soft Grey-Green background */
  --text-dark: #212529;          /* Deep Slate */
  --text-muted: #6c757d;         /* Neutral Muted */
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(46, 125, 50, 0.08);
  --shadow-lg: 0 10px 30px rgba(46, 125, 50, 0.15);
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
}

/* Base Reset & Typography */
body {
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Premium Gradients */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.gradient-hero {
  background: linear-gradient(135deg, rgba(27, 94, 32, 0.95), rgba(76, 175, 80, 0.85));
}

.gradient-accent {
  background: linear-gradient(135deg, var(--accent-color), #81c784);
}

.gradient-orange {
  background: linear-gradient(135deg, #f57c00, var(--accent-orange));
}

/* Micro-Animations & Hover Effects */
.hover-lift {
  transition: var(--transition-normal);
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg) !important;
}

.hover-scale {
  transition: var(--transition-fast);
}
.hover-scale:hover {
  transform: scale(1.03);
}

/* Navbar Customization */
.navbar-custom {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}
.navbar-custom .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}
.navbar-custom .nav-link:hover, 
.navbar-custom .nav-link.active {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

/* Public Hero Section */
.hero-section {
  color: var(--white);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg-light);
  clip-path: ellipse(60% 40px at 50% 40px);
}

/* Premium Buttons */
.btn-primary-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  transition: var(--transition-normal);
  box-shadow: 0 4px 6px rgba(46, 125, 50, 0.2);
}
.btn-primary-custom:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(27, 94, 32, 0.3);
}

.btn-outline-primary-custom {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  transition: var(--transition-normal);
}
.btn-outline-primary-custom:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

/* Cards Design */
.card-custom {
  background: var(--white);
  border: none;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-normal);
}

.card-header-green {
  background-color: var(--primary-light);
  border-bottom: 2px solid rgba(46,125,50,0.1);
  padding: 1.25rem 1.5rem;
}

/* Stats Card Dashboard */
.stat-card {
  border-left: 5px solid var(--primary-color);
  border-radius: var(--border-radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}
.stat-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
.stat-card.orange {
  border-left-color: var(--accent-orange);
}
.stat-card.blue {
  border-left-color: #0288d1;
}
.stat-card.red {
  border-left-color: #d32f2f;
}

/* Glassmorphism Classes */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Responsive Admin Sidebar */
#wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

#sidebar {
  min-width: 260px;
  max-width: 260px;
  background-color: #123e15; /* Extremely dark premium green for admin */
  color: var(--white);
  transition: var(--transition-normal);
}

#sidebar .sidebar-header {
  padding: 20px;
  background-color: #0b260d;
}

#sidebar ul.components {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar ul li a {
  padding: 12px 20px;
  font-size: 0.95rem;
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

#sidebar ul li a:hover,
#sidebar ul li.active > a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent-color);
}

#sidebar ul li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

#content {
  width: 100%;
  padding: 30px;
  min-height: 100vh;
  transition: var(--transition-normal);
}

/* Sticky Announcments */
.sticky-announcement {
  border-left: 6px solid var(--accent-orange);
  background-color: #fff9c4;
}

/* Table Design */
.table-responsive-custom {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-responsive-custom thead {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Footer styling */
.footer-custom {
  background-color: #0d260e;
  color: #a5d6a7;
  padding: 50px 0 20px;
  margin-top: auto;
}
.footer-custom h5 {
  color: var(--white);
  font-weight: 600;
}
.footer-custom a {
  color: #a5d6a7;
  text-decoration: none;
  transition: var(--transition-fast);
}
.footer-custom a:hover {
  color: var(--white);
  padding-left: 4px;
}

/* PWA Splash Screen and Install Alert */
#pwa-install-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
  max-width: 350px;
  display: none;
}

/* Dark mode utility */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}
body.dark-mode .card-custom,
body.dark-mode .stat-card,
body.dark-mode .navbar-custom {
  background-color: #1e1e1e;
  color: #e0e0e0;
}
body.dark-mode .text-dark {
  color: #e0e0e0 !important;
}
body.dark-mode .navbar-custom .nav-link {
  color: #e0e0e0;
}
body.dark-mode .navbar-custom .nav-link:hover,
body.dark-mode .navbar-custom .nav-link.active {
  background-color: #2e7d32;
  color: #ffffff;
}

/* custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
