/* Global styles */
body,
html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  overflow-x: hidden;
}

/* Enhanced Header Navbar */
#header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 10px 10px;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.3em;
  color: #2c5aa0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-brand .globe-icon {
  margin-right: 10px;
  font-size: 1.5em;
  animation: rotate 20s linear infinite;
}

.nav-brand .tagline {
  font-size: 0.7em;
  /* Adjust size as needed */
  color: #ccc;
  /* Adjust color as needed */
  margin-left: 10px;
  /* Adjust spacing as needed */
  font-style: italic;
  display: block;
  /* Or inline-block if you want it next to the logo */
  margin-top: -5px;
  /* Adjust vertical alignment */
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

#map-energy {
  padding-top: 2rem;
  margin-top: 2rem;
  height: 300px;
  width: 100%;
  min-width: 240px;
  border-radius: 12px;
  background: #f9f9f9;
  position: static !important;
}
.card-title {
            color: #203269;
            font-weight: bold;
            font-size: 1rem;
            text-align: center;
        }

#header-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.leaflet-tooltip.state-tooltip {
  color: rgb(0, 0, 0);
  background: none;
  border: none;
  box-shadow: none;
  font-weight: bold;  
  pointer-events: none;
  white-space: nowrap;
  font-size: 0.6rem;
}

.stats-card {
  background: #fff;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 20px;
  height: 100%;
  .stats-value{
    font-size: larger;
    font-weight: bold;
    padding: 10px 0px;
  }
}

.state-card{
    background: #fff;
  border-radius: 12px;
  text-align: center;
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
  padding: 20px;
  height: 100%;
  .stats-value{
    font-size: larger;
    font-weight: bold;
    padding: 10px 0px;
  }
}

#state-card{
  display: none;
}
#header-nav ul li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95em;
  transition: all 0.3s ease;
  padding: 10px 16px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#header-nav ul li a:hover {
  background: linear-gradient(135deg, rgba(44, 90, 160, 0.1), rgba(33, 150, 243, 0.1));
  color: #2c5aa0;
  transform: translateY(-1px);
}

.user-info {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.user-badge {
  background: linear-gradient(135deg, #e3f2fd, #e1f5fe);
  color: #1976d2;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  border: 1px solid rgba(25, 118, 210, 0.2);
}

.admin-badge {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2) !important;
  color: #f57c00 !important;
  padding: 8px 14px !important;
  border-radius: 20px !important;
  font-size: 0.85em !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: 1px solid rgba(245, 124, 0, 0.2) !important;
  transition: all 0.3s ease !important;
}

.admin-badge:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3) !important;
}

.logout-btn {
  background: linear-gradient(135deg, #ffebee, #ffcdd2) !important;
  color: #d32f2f !important;
  border: 1px solid rgba(211, 47, 47, 0.2) !important;
  padding: 8px 14px !important;
  border-radius: 20px !important;
  font-size: 0.85em !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.logout-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3) !important;
}

/* Hero Section */
.hero-section {
  margin-top: 65px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 10px 10px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a"><stop offset="20%" stop-color="%23fff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><circle fill="url(%23a)" cx="10" cy="10" r="10"/></svg>') repeat;
  opacity: 0.1;
}

.hero-section h1 {
  font-size: 2.5em;
  margin: 0 0 10px 0;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.hero-section p {
  font-size: 1.2em;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Main Dashboard Layout */
#main-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 24px;
  padding: 24px;
  margin-bottom: 80px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #fafbfc, #f8faff);
}

.card-header h2 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 600;
  color: #2c5aa0;
}

.menu-toggle {
  color: #666;
  cursor: pointer;
  font-size: 1.2em;
}

.card-content {
  padding: 0;
}

/* Domain Items */
.domain-item {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  gap: 16px;
}

.domain-item:last-child {
  border-bottom: none;
}

.domain-item:hover {
  background: #f8faff;
  transform: translateX(4px);
}

.domain-item.active {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border-left: 4px solid #2196f3;
}

.domain-icon {
  font-size: 2em;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.domain-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
}

.domain-info p {
  margin: 0 0 8px 0;
  color: #666;
  font-size: 0.9em;
}

.domain-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.module-count {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
}

.status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
}

.status.real-time {
  background: #e8f5e8;
  color: #2e7d32;
}

.status.multi-scenario {
  background: #fff3e0;
  color: #f57c00;
}

.status.iot-enabled {
  background: #e0f2f1;
  color: #00695c;
}

.status.satellite-powered {
  background: #f3e5f5;
  color: #7b1fa2;
}

.status.renewable-focus {
  background: #e0f2f1;
  color: #00695c;
}

.domain-desc {
  font-size: 0.85em;
  color: #666;
  line-height: 1.4;
  margin-bottom: 12px;
}

.explore-btn {
  background: none;
  border: 1px solid #2196f3;
  color: #2196f3;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.explore-btn:hover {
  background: #2196f3;
  color: white;
}

/* Module Items */
.module-item {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 16px;
  align-items: center;
  cursor: pointer;
}

.module-item:last-child {
  border-bottom: none;
}

.module-item.selected {
  background-color: #ecf6fe;
  border-color: #b7daff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.module-icon {
  font-size: 1.5em;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 10px;
}

.module-info {
  flex: 1;
}

.module-info h3 {
  margin: 0 0 4px 0;
  font-size: 1em;
  font-weight: 600;
}

.module-info p {
  margin: 0;
  font-size: 0.85em;
  color: #666;
}

.module-link {
  text-decoration: none;
  color: #2c5aa0;
  /* Or your theme's link color */
}

.module-link:hover {
  text-decoration: underline;
}

.module-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* Aligns items to the right */
  gap: 8px;
  /* Space between status badge and button */
  margin-left: auto;
  /* Pushes actions to the right of module-info */
  text-align: right;
}

.module-item {
  display: flex;
  /* To align icon, info, and actions in a row */
  align-items: center;
  /* Vertically align items in the center */
}

.module-info {
  flex-grow: 1;
  /* Allows module-info to take available space */
}


.module-explore-btn {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
  background: #1e90ff;
  color: #fefffe;
  text-decoration: none;
}

.module-explore-btn:hover {
  background-color: #1976d2;
  /* Darker shade on hover */
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
}

.status-badge.active {
  background: #e8f5e8;
  color: #2e7d32;
}

.status-badge.beta {
  background: #fff3e0;
  color: #f57c00;
}

/* Map Card */
.map-card {
  /* grid-row: span 2; */
  position: relative;
}

.map-card .card-content {
  position: relative;
  /* height: 500px; */
  height: 100%;
  padding: 0;
}

#map {
  height: 100%;
  width: 100%;
  border-radius: 0 0 16px 16px;
  z-index: 1;
}

iframe {
  height: 100%;
  width: 100%;
  /* border-radius: 0 0 16px 16px; */
  z-index: 1;
}


/* Ensure Leaflet map renders properly */
.leaflet-container {
  height: 100% !important;
  width: 100% !important;
  border-radius: 0 0 16px 16px;
  background: #f8faff;
}

.leaflet-control-container {
  z-index: 100;
}

.map-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 280px;
  z-index: 1000;
  pointer-events: none;
}

.location-info {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.location-info[style*="block"] {
  opacity: 1;
  transform: translateY(0);
}

.location-info h3 {
  margin: 0 0 16px 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e3f2fd;
  padding-bottom: 8px;
}

.weather-details {
  margin-bottom: 16px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.9em;
  padding: 4px 0;
}

.detail-item .label {
  color: #666;
  font-weight: 500;
}

.detail-item .value {
  font-weight: 600;
  color: #333;
  background: #f8faff;
  padding: 2px 8px;
  border-radius: 6px;
  min-width: 60px;
  text-align: center;
}

.detailed-analysis-btn {
  width: 100%;
  background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.detailed-analysis-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* Map loading states */
.leaflet-popup-content {
  margin: 8px 12px !important;
  max-width: 200px !important;
}

.leaflet-popup-content h4 {
  margin: 0 0 8px 0 !important;
  color: #2c5aa0;
}

/* Responsive map adjustments */
@media (max-width: 1200px) {
  .map-overlay {
    position: static;
    width: auto;
    margin: 16px;
  }

  .map-card .card-content {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .map-card .card-content {
    height: 300px;
  }

  .location-info {
    padding: 16px;
    margin: 12px;
  }

  .location-info h3 {
    font-size: 1em;
  }

  .detail-item {
    font-size: 0.85em;
  }
}

/* Enhanced Bottom Navigation with Domain Integration */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 2px solid rgba(102, 126, 234, 0.1);
}

#bottom-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}

#bottom-nav ul li {
  flex: 1;
  text-align: center;
}

#bottom-nav ul li a {
  color: #666;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85em;
  padding: 12px 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

#bottom-nav ul li a:hover {
  background: linear-gradient(135deg, #e3f2fd, #e1f5fe);
  color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

#bottom-nav ul li a.active {
  background: linear-gradient(135deg, #2196f3, #21cbf3);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.domain-icon-bottom {
  font-size: 1.2em;
  margin-bottom: 2px;
}

.domain-name-bottom {
  font-size: 0.75em;
  font-weight: 600;
}

.module-count-bottom {
  position: absolute;
  top: -2px;
  right: 8px;
  background: #ff6b6b;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.6em;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

/* Active domain indicator in bottom nav */
#bottom-nav ul li a[data-domain].active::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #2196f3;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }

  50% {
    transform: translateX(-50%) scale(1.2);
    opacity: 0.7;
  }
}

/* Responsive bottom nav */
@media (max-width: 768px) {
  #bottom-nav ul li a {
    padding: 8px 4px;
    font-size: 0.75em;
  }

  .domain-icon-bottom {
    font-size: 1em;
  }

  .domain-name-bottom {
    font-size: 0.65em;
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  #main-dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .map-card {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  #main-dashboard {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .map-card {
    grid-column: span 1;
  }

  .map-overlay {
    position: static;
    width: auto;
    margin-top: 16px;
  }

  #header-nav {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .hero-section {
    padding: 30px 16px;
  }

  .hero-section h1 {
    font-size: 2em;
  }
}

/* Leaflet map enhancements */
.leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 0 20px 20px 0;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

/* Enhanced domain card scrolling */
.domains-card .card-content {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.domains-card .card-content::-webkit-scrollbar {
  width: 6px;
}

.domains-card .card-content::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 3px;
}

/* Authentication Pages Styling */
.auth-body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a"><stop offset="20%" stop-color="%23fff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><circle fill="url(%23a)" cx="10" cy="10" r="10"/></svg>') repeat;
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

.auth-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 30px;
  grid-column: span 2;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.auth-globe-icon {
  font-size: 3em;
  animation: rotate 20s linear infinite;
}

.auth-header h1 {
  color: white;
  font-size: 2.5em;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2em;
  margin: 0;
  font-weight: 300;
}

/* Auth Card */
.auth-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-card-header h2 {
  color: #2c5aa0;
  font-size: 1.8em;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.auth-card-header p {
  color: #666;
  margin: 0;
  font-size: 1em;
}

/* Flash Messages */
.flash-messages {
  margin-bottom: 25px;
}

.flash-message {
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.flash-error {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: #d32f2f;
  border: 1px solid #ffcdd2;
}

.flash-info {
  background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.flash-icon {
  font-size: 1.2em;
}

/* Auth Form */
.auth-form {
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1em;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  font-size: 1em;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
  background: white;
}

.form-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
  color: #666;
  font-style: italic;
}

/* Checkbox Styling */
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500 !important;
}

.checkbox-label input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
}

.checkmark {
  font-size: 1.2em;
}

/* Auth Buttons */
.auth-btn {
  width: 100%;
  padding: 15px 25px;
  border: none;
  border-radius: 12px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.auth-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.auth-btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.2em;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-footer p {
  margin: 0;
  color: #666;
}

.auth-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Features/Benefits Sections */
.auth-features,
.auth-benefits {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-features h3,
.auth-benefits h3 {
  color: white;
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 1.5em;
  font-weight: 600;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.feature-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5em;
}

.benefit-list {
  space-y: 20px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.benefit-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.benefit-icon {
  font-size: 2em;
  flex-shrink: 0;
}

.benefit-content h4 {
  color: white;
  margin: 0 0 5px 0;
  font-size: 1.1em;
  font-weight: 600;
}

.benefit-content p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Analytics Page Styles */
.analytics-header {
  margin-top: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-title h1 {
  margin: 0 0 5px 0;
  font-size: 2em;
  font-weight: 700;
}

.analytics-title p {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1em;
}

.analytics-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.control-select {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-weight: 500;
}

.control-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

#analytics-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.analytics-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.analytics-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Summary Card */
.summary-card .card-header {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-coords {
  background: rgba(33, 150, 243, 0.1);
  color: #1976d2;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-family: monospace;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8faff;
  border-radius: 12px;
}

.summary-icon {
  font-size: 2em;
  width: 50px;
  text-align: center;
}

.summary-data {
  flex: 1;
}

.summary-label {
  display: block;
  font-size: 0.85em;
  color: #666;
  margin-bottom: 4px;
}

.summary-value {
  display: block;
  font-size: 1.4em;
  font-weight: 700;
  color: #333;
}

/* Risk Assessment Card */
.risk-card .card-header {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}

.risk-level {
  display: flex;
  align-items: center;
}

.risk-indicator {
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9em;
}

.risk-indicator.low {
  background: #e8f5e8;
  color: #2e7d32;
}

.risk-indicator.moderate {
  background: #fff3e0;
  color: #f57c00;
}

.risk-indicator.high {
  background: #ffebee;
  color: #d32f2f;
}

.risk-categories {
  padding: 20px;
  space-y: 16px;
}

.risk-category {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8faff;
  border-radius: 12px;
  margin-bottom: 16px;
}

.risk-icon {
  font-size: 1.8em;
  width: 50px;
  text-align: center;
}

.risk-info {
  flex: 1;
}

.risk-info h4 {
  margin: 0 0 8px 0;
  font-size: 1.1em;
  color: #333;
}

.risk-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.risk-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.risk-fill.low {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.risk-fill.moderate {
  background: linear-gradient(90deg, #ff9800, #ffb74d);
}

.risk-fill.high {
  background: linear-gradient(90deg, #f44336, #ef5350);
}

.risk-percentage {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
}

/* Chart Card */
.chart-card {
  grid-column: span 2;
}

.chart-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: #2196f3;
  color: white;
}

.chart-card .card-content {
  padding: 20px;
  height: 300px;
}

/* Energy Assessment Card */
.energy-grid {
  padding: 20px;
  space-y: 20px;
}

.energy-source {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f8faff;
  border-radius: 12px;
  margin-bottom: 20px;
}

.energy-icon {
  font-size: 2.5em;
  width: 60px;
  text-align: center;
}

.energy-data {
  flex: 1;
}

.energy-data h4 {
  margin: 0 0 8px 0;
  font-size: 1.2em;
  color: #333;
}

.energy-potential {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.energy-value {
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
}

.energy-rating {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.8em;
  font-weight: 600;
}

.energy-rating.excellent {
  background: #e8f5e8;
  color: #2e7d32;
}

.energy-rating.good {
  background: #e3f2fd;
  color: #1976d2;
}

.energy-rating.fair {
  background: #fff3e0;
  color: #f57c00;
}

.energy-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.energy-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  border-radius: 3px;
  transition: width 0.8s ease;
}

/* Data Table Card */
.data-table-card {
  grid-column: span 2;
}

.table-export-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: #2196f3;
  color: white;
  cursor: pointer;
  font-size: 0.9em;
}

.table-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
}

#historicalDataTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

#historicalDataTable th,
#historicalDataTable td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

#historicalDataTable th {
  background: #f8faff;
  font-weight: 600;
  color: #333;
  position: sticky;
  top: 0;
}

#historicalDataTable tr:hover {
  background: #f8faff;
}

/* Satellite Card */
.satellite-card {
  grid-column: span 2;
}

.satellite-controls {
  display: flex;
  gap: 12px;
}

#satelliteMap {
  height: 300px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.satellite-analysis {
  display: flex;
  justify-content: space-around;
  padding: 16px;
  background: #f8faff;
  border-radius: 8px;
}

.analysis-metric {
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 0.9em;
  color: #666;
  margin-bottom: 4px;
}

.metric-value {
  display: block;
  font-weight: 600;
  color: #333;
}

.metric-value.good {
  color: #2e7d32;
}

/* Analytics Sidebar Styles */
.analytics-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.4s ease;
}

.analytics-sidebar.active {
  visibility: visible;
  opacity: 1;
}

.analytics-sidebar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.analytics-sidebar-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 480px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.analytics-sidebar.active .analytics-sidebar-content {
  transform: translateX(0);
}

/* Sidebar Header */
.analytics-sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-title h2 {
  margin: 0 0 4px 0;
  font-size: 1.4em;
  font-weight: 600;
}

.analytics-title p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9em;
}

.sidebar-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.2em;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Sidebar Body */
.analytics-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.analytics-sidebar-body::-webkit-scrollbar {
  width: 6px;
}

.analytics-sidebar-body::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 3px;
}

/* Analytics Sections */
.analytics-section {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.analytics-section:last-child {
  border-bottom: none;
}

.analytics-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
}

/* Location Summary */
.location-summary {
  space-y: 16px;
}

.summary-coords {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  color: #1976d2;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-family: monospace;
  text-align: center;
  margin-bottom: 16px;
}

.current-weather {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.weather-item {
  background: #f8faff;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.weather-icon {
  font-size: 1.5em;
  margin-bottom: 4px;
}

.weather-label {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 4px;
}

.weather-value {
  font-weight: 600;
  color: #333;
  font-size: 0.9em;
}

/* Risk Assessment */
.risk-overview {
  space-y: 16px;
}

.overall-risk {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8faff;
  border-radius: 8px;
  margin-bottom: 16px;
}

.risk-label {
  font-weight: 500;
  color: #333;
}

.risk-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
}

.risk-badge.low {
  background: #e8f5e8;
  color: #2e7d32;
}

.risk-badge.moderate {
  background: #fff3e0;
  color: #f57c00;
}

.risk-badge.high {
  background: #ffebee;
  color: #d32f2f;
}

.risk-categories-mini {
  space-y: 12px;
}

.risk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.risk-icon {
  font-size: 1.2em;
  width: 24px;
  text-align: center;
}

.risk-name {
  font-size: 0.9em;
  font-weight: 500;
  width: 60px;
}

.risk-bar-mini {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.risk-fill-mini {
  height: 100%;
  border-radius: 3px;
}

.risk-fill-mini.low {
  background: #4caf50;
}

.risk-fill-mini.moderate {
  background: #ff9800;
}

.risk-fill-mini.high {
  background: #f44336;
}

.risk-value {
  font-size: 0.8em;
  font-weight: 600;
  color: #666;
  width: 30px;
  text-align: right;
}

/* Chart Container */
.chart-container-mini {
  height: 150px;
  margin-bottom: 12px;
  background: #f8faff;
  border-radius: 8px;
  padding: 12px;
}

.chart-controls-mini {
  display: flex;
  gap: 6px;
}

.chart-btn {
  flex: 1;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: #f0f0f0;
  color: #666;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chart-btn.active {
  background: #2196f3;
  color: white;
}

/* Energy Assessment */
.energy-assessment {
  space-y: 12px;
}

.energy-item {
  background: #f8faff;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.energy-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.energy-icon {
  font-size: 1.2em;
}

.energy-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.9em;
}

.energy-rating {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.7em;
  font-weight: 600;
}

.energy-rating.excellent {
  background: #e8f5e8;
  color: #2e7d32;
}

.energy-rating.good {
  background: #e3f2fd;
  color: #1976d2;
}

.energy-rating.fair {
  background: #fff3e0;
  color: #f57c00;
}

.energy-details {
  display: flex;
  align-items: center;
  gap: 8px;
}

.energy-value {
  font-size: 0.8em;
  font-weight: 600;
  color: #333;
  width: 80px;
}

.energy-bar-mini {
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.energy-fill-mini {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  border-radius: 2px;
  transition: width 0.8s ease;
}

/* Data Preview */
.data-table-mini {
  background: #f8faff;
  border-radius: 8px;
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr 60px 60px 60px;
  gap: 8px;
  padding: 8px 12px;
  background: #e3f2fd;
  font-size: 0.8em;
  font-weight: 600;
  color: #1976d2;
}

.table-body {
  max-height: 120px;
  overflow-y: auto;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 60px 60px 60px;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.8em;
  border-bottom: 1px solid #f0f0f0;
}

.table-row:last-child {
  border-bottom: none;
}

/* Satellite Mini */
.satellite-mini {
  space-y: 12px;
}

#satelliteMapMini {
  height: 120px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #f0f0f0;
}

.satellite-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.metric {
  background: #f8faff;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-icon {
  font-size: 1.2em;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.7em;
  color: #666;
  margin-bottom: 2px;
}

.metric-value {
  font-size: 0.8em;
  font-weight: 600;
  color: #333;
}

.metric-value.good {
  color: #2e7d32;
}

/* Sidebar Footer */
.analytics-sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
  background: #f8faff;
  display: flex;
  gap: 12px;
}

.export-btn,
.refresh-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9em;
}

.export-btn {
  background: #2196f3;
  color: white;
}

.export-btn:hover {
  background: #1976d2;
  transform: translateY(-1px);
}

.refresh-btn {
  background: #f0f0f0;
  color: #666;
}

.refresh-btn:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

/* Error and No Domains Messages */
.no-domains-message,
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.message-icon {
  font-size: 4em;
  margin-bottom: 16px;
}

.no-domains-message h3,
.error-message h3 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 1.4em;
}

.no-domains-message p,
.error-message p {
  margin: 8px 0;
  line-height: 1.5;
}

.retry-btn {
  background: #2196f3;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: #1976d2;
  transform: translateY(-1px);
}


/* loading css */

.loader {
  border: 4px dotted #2679ff;
  /* dotted border */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* center perfectly */
  animation: spin 1s linear infinite;
  z-index: 10;
  /* appear above iframe/map */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}