/* -----------------------------------------------------------------------------
   Sugarcane Production Monitoring System – Modern White Theme
   Clean, Professional, Modern Design
   ---------------------------------------------------------------------------- */

:root {
  /* Modern White Theme Colors */
  --white: #FFFFFF;
  --gray-50: #F5F7FA;
  --gray-100: #F5F7FA;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Accent Colors (subtle, professional) - New Palette */
  --primary-green: #0B3D2E;
  --primary-green-dark: #0B3D2E;
  --primary-green-light: #4CAF50;
  --accent-green: #4CAF50;
  --accent-blue: #4CAF50;
  --accent-blue-light: #4CAF50;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  
  /* Shadows - Soft and subtle */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.18);
  
  /* Border Radius - Rounded, modern */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  
  /* Typography */
  --text-dark: #2E2E2E;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  
  /* Transitions */
  --transition-base: 0.25s ease;
  --transition-fast: 0.15s ease;
  --transition-slow: 0.35s ease;
}

html, body {
  min-height: 100%;
  font-family: 'Poppins', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary-green-dark);
}

/* -----------------------------------------------------------------------------
   Layout Shell (Sidebar + Topbar)
   ---------------------------------------------------------------------------- */

.sidebar {
  background: linear-gradient(185deg, rgba(11, 61, 46, 0.96) 0%, rgba(9, 46, 34, 0.92) 100%);
  color: rgba(255, 255, 255, 0.9);
  min-height: 100vh;
  width: 260px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 2rem 1.5rem 2.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
  z-index: 1050;
}

.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .logo img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
}

.sidebar .logo span {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.sidebar .nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-base);
}

.sidebar .nav-link i {
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
  color: #fff !important;
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #fff !important;
}

.main-content {
  margin-left: 260px;
  padding: 2.4rem 2.5rem 3rem;
  min-height: 100vh;
  background: var(--gray-50);
}

.navbar {
  background: var(--white);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1rem 1.6rem;
  color: var(--text-dark);
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.navbar .nav-link,
.navbar .dropdown-item {
  font-weight: 500;
  color: var(--text-dark) !important;
  transition: color 0.3s ease;
}

.navbar .dropdown-menu {
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: var(--white);
}

.profile-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}

.user-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--primary-green) !important;
}

/* Mobile Responsive Styles */
@media (max-width: 991.98px) {
  .sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    box-shadow: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.5rem 1.25rem;
  }

  .main-content {
    margin-left: 0;
    padding: 1.5rem 1rem 2rem;
  }
  
  .navbar {
    padding: 0.75rem 1rem;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .card-header {
    padding: 1rem 1.25rem;
  }
  
  .stats-card {
    padding: 1.5rem;
  }
  
  .stats-card h3 {
    font-size: 1.75rem;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .table thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .table tbody td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 1rem 0.75rem 1.5rem;
  }
  
  .sidebar {
    padding: 1rem 0.75rem;
  }
  
  .sidebar .logo {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }
  
  .sidebar .logo span {
    font-size: 0.8rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .stats-card {
    padding: 1.25rem;
  }
  
  .stats-card h3 {
    font-size: 1.5rem;
  }
  
  .stats-card i {
    font-size: 1.5rem;
    padding: 0.5rem;
  }
  
  .btn-primary,
  .btn-warning,
  .btn-success {
    padding: 0.5rem 1.2rem;
    font-size: 0.875rem;
  }
  
  .form-control,
  .form-select {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }
  
  .table {
    font-size: 0.8rem;
  }
  
  .table thead th {
    padding: 0.5rem 0.375rem;
    font-size: 0.65rem;
  }
  
  .table tbody td {
    padding: 0.5rem 0.375rem;
  }
  
  .badge {
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
  }
}

/* -----------------------------------------------------------------------------
   Cards, Panels & Widgets - Modern White Theme
   ---------------------------------------------------------------------------- */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: 1.4rem 1.6rem;
  font-weight: 600;
  color: var(--text-dark);
}

.card-body {
  padding: 1.7rem;
  background: var(--white);
}

/* Dashboard Stats Cards - White Theme */
.stats-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.65rem;
  height: 100%;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border-radius: 0 var(--radius-lg) 0 100%;
  opacity: 0.5;
}

.stats-card i {
  font-size: 1.8rem;
  color: var(--accent-green);
  background: var(--gray-50);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}

.stats-card h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
  position: relative;
  z-index: 1;
}

.stats-card p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* Dashboard Stats - Alternative Style */
.dashboard-stats {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

/* -----------------------------------------------------------------------------
   Buttons - Modern White Theme
   ---------------------------------------------------------------------------- */

.btn-primary {
  background: var(--primary-green);
  border-color: var(--primary-green);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all var(--transition-base);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-green-dark);
  border-color: var(--primary-green-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-outline-light {
  border-radius: var(--radius-pill);
  border: 1px solid var(--gray-300);
  color: var(--text-dark);
  background: var(--white);
  transition: all var(--transition-base);
}

.btn-outline-light:hover {
  background: var(--gray-100);
  color: var(--text-dark);
  border-color: var(--gray-400);
}

.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--text-dark);
  border-radius: var(--radius-pill);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
  background: #e0ac00;
  border-color: #e0ac00;
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-light-soft {
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--gray-200);
  color: var(--text-dark);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-light-soft:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
  border-radius: var(--radius-pill);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background: #218838;
  border-color: #218838;
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* -----------------------------------------------------------------------------
   Forms - Modern White Theme
   ---------------------------------------------------------------------------- */

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-control,
.form-select {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-green);
  background: var(--white);
  box-shadow: 0 0 0 0.2rem rgba(11, 61, 46, 0.15);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* -----------------------------------------------------------------------------
   Tables & Badges - Modern White Theme
   ---------------------------------------------------------------------------- */

.table {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.table thead th {
  background: var(--primary-green);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  padding: 1rem;
  white-space: nowrap;
}

.table tbody td {
  vertical-align: middle;
  padding: 1rem;
  border-color: var(--gray-200);
  color: var(--text-dark);
}

.table tbody tr {
  background: var(--white);
  transition: background-color var(--transition-base);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

.badge {
  border-radius: var(--radius-pill);
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.badge.bg-success {
  background: rgba(40, 167, 69, 0.15) !important;
  color: #28a745;
}

.badge.bg-warning {
  background: rgba(255, 193, 7, 0.2) !important;
  color: #856404;
}

.badge.bg-info {
  background: rgba(23, 162, 184, 0.15) !important;
  color: #0c5460;
}

.badge.bg-danger {
  background: rgba(220, 53, 69, 0.15) !important;
  color: #721c24;
}

.badge.bg-primary {
  background: rgba(11, 61, 46, 0.15) !important;
  color: var(--primary-green-dark);
}

/* -----------------------------------------------------------------------------
   Alerts & Toasts - Modern White Theme
   ---------------------------------------------------------------------------- */

.alert {
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  color: var(--text-dark);
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.3);
  color: #155724;
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
  color: #856404;
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: rgba(23, 162, 184, 0.1);
  border-color: rgba(23, 162, 184, 0.3);
  color: #0c5460;
  border-left: 4px solid var(--info);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.3);
  color: #721c24;
  border-left: 4px solid var(--danger);
}

/* -----------------------------------------------------------------------------
   Activity Panels - Modern White Theme
   ---------------------------------------------------------------------------- */

.activity-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.activity-panel h5 {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.activity-item {
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-green);
  margin-bottom: 0.75rem;
  transition: all var(--transition-base);
  cursor: pointer;
}

.activity-item:hover {
  background: var(--gray-100);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.activity-item:last-child {
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Empty States - Modern White Theme
   ---------------------------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
  color: var(--gray-400);
}

.empty-state p {
  font-size: 1rem;
  margin: 0;
  color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   Utility Helpers
   ---------------------------------------------------------------------------- */

.shadow-soft {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-medium {
  box-shadow: var(--shadow-md) !important;
}

.shadow-strong {
  box-shadow: var(--shadow-lg) !important;
}

.rounded-md {
  border-radius: var(--radius-md) !important;
}

.rounded-lg {
  border-radius: var(--radius-lg) !important;
}

.text-muted-2 {
  color: var(--text-muted) !important;
}

.bg-white {
  background: var(--white) !important;
}

.border-light {
  border-color: var(--gray-200) !important;
}

/* -----------------------------------------------------------------------------
   Print Overrides
   ---------------------------------------------------------------------------- */

@media print {
  body {
    background: #fff !important;
    color: #000;
  }

  .sidebar,
  .navbar {
    display: none !important;
  }

  .main-content {
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .table {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
