:root {
  --wbee-amber-50: #fffbeb;
  --wbee-amber-100: #fef3c7;
  --wbee-amber-200: #fde68a;
  --wbee-amber-500: #f59e0b;
  --wbee-amber-600: #d97706;
  --wbee-amber-700: #b45309;
  --wbee-green-500: #10b981;
  --wbee-green-600: #059669;
  --wbee-slate-900: #0f172a;
  --wbee-slate-800: #1e293b;
  --wbee-slate-700: #334155;
  --wbee-slate-100: #f1f5f9;
  --wbee-slate-50: #f8fafc;
  --sidebar-width: 270px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
}

/* Sidebar Styling */
#sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  transition: all 0.3s ease;
  z-index: 1040;
}

#sidebar .brand-box {
  padding: 1.25rem 1.5rem;
  background-color: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: #94a3b8;
  padding: 1rem 1.5rem 0.35rem 1.5rem;
}

#sidebar .nav-link {
  color: #cbd5e1;
  padding: 0.65rem 1.25rem;
  margin: 0.15rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

#sidebar .nav-link i {
  font-size: 1.15rem;
  margin-right: 0.75rem;
  color: #94a3b8;
  transition: color 0.2s;
}

#sidebar .nav-link:hover {
  color: #ffffff;
  background-color: rgba(245, 158, 11, 0.15);
}

#sidebar .nav-link:hover i {
  color: #f59e0b;
}

#sidebar .nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

#sidebar .nav-link.active i {
  color: #ffffff;
}

/* Main Content Area */
#main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.top-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.85rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Modern Card Styling */
.card-wbee {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-wbee:hover {
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}

.card-stat {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.card-stat .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.bg-amber-soft {
  background-color: #fef3c7;
  color: #b45309;
}

.bg-green-soft {
  background-color: #d1fae5;
  color: #065f46;
}

.bg-blue-soft {
  background-color: #dbeafe;
  color: #1e40af;
}

.bg-purple-soft {
  background-color: #f3e8ff;
  color: #6b21a8;
}

.bg-rose-soft {
  background-color: #ffe4e6;
  color: #9f1239;
}

.btn-wbee {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
  transition: all 0.2s;
}

.btn-wbee:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

/* Map Containers */
.geo-map-container {
  width: 100%;
  height: 580px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  position: relative;
}

.ol-popup {
  position: absolute;
  background-color: white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #cccccc;
  bottom: 12px;
  left: -50px;
  min-width: 280px;
}
.ol-popup:after, .ol-popup:before {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}
.ol-popup:after {
  border-top-color: white;
  border-width: 10px;
  left: 48px;
  margin-left: -10px;
}
.ol-popup:before {
  border-top-color: #cccccc;
  border-width: 11px;
  left: 48px;
  margin-left: -11px;
}
.ol-popup-closer {
  text-decoration: none;
  position: absolute;
  top: 6px;
  right: 8px;
  color: #94a3b8;
  font-size: 1.1rem;
}

/* Table styling */
.table-wbee th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.table-wbee td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

/* Badges */
.badge-honey {
  background-color: #fef3c7;
  color: #92400e;
  font-weight: 600;
  border: 1px solid #fde68a;
}

.badge-forest {
  background-color: #d1fae5;
  color: #065f46;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

/* ==========================================================================
   Responsividade Mobile Avançada (WBee Mobile Ready)
   ========================================================================== */
#sidebarBackdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1035;
  transition: opacity 0.25s ease;
}

#sidebarBackdrop.show {
  display: block;
}

@media (max-width: 991.98px) {
  #sidebar {
    position: fixed !important;
    top: 0;
    left: -290px;
    bottom: 0;
    height: 100vh;
    z-index: 1045 !important;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
  }

  #sidebar.show {
    left: 0 !important;
  }

  #main-wrapper {
    width: 100% !important;
    min-width: 0 !important;
  }

  .top-navbar {
    padding: 0.6rem 0.85rem !important;
  }

  #headerWeatherContainer .badge {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Ajuste de tabelas e cartões em telas compactas */
  .card-wbee {
    padding: 1.15rem !important;
  }

  .display-6, .display-5 {
    font-size: 1.8rem !important;
  }
}
