/* NetZero Aqua - Dashboard Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-green: #3BD304;
  --primary-hover: #5ba512;
  --text-dark: #10243b;
  --text-gray: #475569;
  --bg-light: #f3f8f6;
  --border-color: #d6e5d3;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --sidebar-width: 450px;
  /* Default Width */
  --sidebar-expanded-width: 60vw;
  /* Expanded Width */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #fff;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

#app {
  display: flex;
  width: 100%;
  height: 100%;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  /* Default width */
  height: 100%;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 24px;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 1000;
  transition: width 0.3s ease-in-out;
  /* Smooth transition */
}

/* Expanded state for Sidebar (Report View) */
.sidebar.expanded {
  width: var(--sidebar-expanded-width);
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #e5e7eb;
  border-radius: 4px;
}

.sidebar-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.sidebar-header p {
  font-size: 14px;
  color: var(--text-gray);
  font-weight: 500;
}

/* Controls Section */
.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.input-group {
  background: #f3f4f6;
  /* Light gray bg for inputs */
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gray);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.date-input-wrapper {
  display: flex;
  align-items: center;
}

input[type="date"] {
  width: 100%;
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  outline: none;
  cursor: pointer;
}

.analyze-btn {
  width: 100%;
  background-color: var(--text-dark);
  /* Black button like typical dashboards */
  color: white;
  font-weight: 600;
  padding: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analyze-btn:hover:not(:disabled) {
  background-color: black;
}

.analyze-btn:disabled {
  background-color: #d1d5db;
  cursor: not-allowed;
}

/* --- Results Section --- */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
  animation: fadeIn 0.5s ease;
}

.hidden {
  display: none !important;
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.metric-card {
  text-align: center;
  padding: 30px 20px;
}

.metric-card h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.metric-card .value {
  font-size: 42px;
  font-weight: 700;
  color: var(--primary-green);
  letter-spacing: -1px;
}

/* Charts */
.chart-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.chart-wrapper {
  height: 250px;
  /* Reduced height for better grid fit */
  width: 100%;
}

/* Map */
#map {
  flex-grow: 1;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Pond Label on Map */
.pond-label {
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 4px #000;
}

/* --- Leaflet Customization for Dashboard Look --- */
.leaflet-control-zoom,
.leaflet-control-layers,
.leaflet-bar {
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
}

.leaflet-bar a {
  color: #374151 !important;
  background-color: white !important;
  border-bottom: 1px solid #f3f4f6 !important;
}

.leaflet-bar a:hover {
  background-color: #f9fafb !important;
  color: var(--primary-green) !important;
}

.leaflet-control-geocoder-form input {
  font-family: 'Inter', sans-serif !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  padding: 8px 12px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.leaflet-control-geocoder-icon {
  border-radius: 8px !important;
  background-color: white !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Table Styling Override */
.table-container-custom {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}