:root {
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --secondary-color: #64748b;
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  --transition: all 0.3s ease;
}

/* Base Styles */
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  background-color: #000000;
  color: var(--light-color);
}

/* Navbar Styles */
.navbar {
  padding: 1rem;
  background: rgba(33, 37, 41, 0.98) !important;
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
  transition: color 0.3s ease;
}

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

/* Cards Styling - Dark Theme */
.stats-card,
.dashboard-card,
.search-card {
  background: #111827;
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.stats-card:hover,
.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-card .card-body {
  padding: 0;
}

.stats-card h6 {
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stats-card h2 {
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

/* Text Colors */
.text-primary {
  color: var(--primary-light) !important;
}

.text-muted {
  color: #94a3b8 !important;
}

/* Badge Styling */
.badge {
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

/* Map Container */
#map {
  height: 500px;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Safety Locations */
.safety-location {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #1f2937;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.safety-location h6 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
}

.safety-location p {
  color: #94a3b8;
  font-size: 0.875rem;
}

.safety-location i {
  margin-right: 0.5rem;
  color: var(--primary-light);
}

/* Table Styles */
.table {
  color: var(--light-color);
}

.table-dark {
  background-color: #1f2937;
}

.table th {
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Search Input */
.input-group {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.5);
}

.input-group .form-control {
  border-radius: 0.5rem 0 0 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.625rem 1rem;
  background: #1f2937;
  color: white;
}

.input-group .form-control::placeholder {
  color: #94a3b8;
}

.input-group .btn {
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.625rem 1.25rem;
}

/* Chat Section */
.chat-section {
  background: #111827;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#chatResponse {
  background: #1f2937;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 100px;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container-fluid {
    padding-top: 60px;
  }

  .stats-card,
  .dashboard-card,
  .search-card {
    padding: 1rem;
  }

  #map {
    height: 300px;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.5s ease-in;
}

.animate-slide-up {
  animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  color: var(--bs-modal-color);
  pointer-events: auto;
  background-color: #06377e;
  background-clip: padding-box;
  border: var(--bs-modal-border-width) solid var(--bs-modal-border-color);
  border-radius: var(--bs-modal-border-radius);
  outline: 0;
}
#addPersonBtn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999; /* Ensure it is on top of other content */
}
/* Weather Cards Container */
.row-cols-1.row-cols-md-3.g-4 {
  margin: 0;
  padding-top: 70px; /* Reduced from 90px */
}

/* Weather Card Base Styles */
.card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem; /* Slightly reduced from 1rem */
  transition: var(--transition);
}

/* Card Body Padding */
.stats-card {
  padding: 1rem; /* Reduced from 1.5rem */
  height: 100%;
}

/* Card Title */
.card-title {
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 0.5rem; /* Reduced from 1rem */
  font-size: 0.875rem; /* Reduced from 1rem */
}

/* Card Values */
.stats-card h2 {
  font-size: 1.5rem; /* Reduced from 2rem */
  font-weight: 700;
  margin-bottom: 0.5rem; /* Reduced from 1rem */
  line-height: 1.2;
}

/* Card Text */
.card-text {
  color: #6fc7ff;
  font-size: 0.813rem; /* Slightly reduced */
  margin-bottom: 0.5rem; /* Reduced from 1rem */
  line-height: 1.4;
}

/* Last Updated Text */
.text-body-secondary {
  color: #64748b !important;
  font-size: 0.688rem; /* Reduced from 0.75rem */
  margin-top: 0.25rem;
}

/* Reduce card spacing */
.g-4 {
  --bs-gutter-x: 1rem; /* Reduced from default */
  --bs-gutter-y: 1rem; /* Reduced from default */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .row-cols-1.row-cols-md-3.g-4 {
    padding-top: 50px; /* Reduced from 60px */
  }

  .stats-card {
    padding: 0.75rem; /* Further reduced for mobile */
  }

  .stats-card h2 {
    font-size: 1.25rem; /* Further reduced for mobile */
  }
}
/* chatbot */
.chat-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background: #1f2937;
  border-radius: 10px 10px 0 0;
}

.message {
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  max-width: 80%;
}

.message-user {
  background: var(--primary-color);
  color: var(--light-color);
  margin-left: auto;
}

.message-bot {
  background: #374151;
  color: var(--light-color);
}

.chat-input-container {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #111827;
  border-radius: 0 0 10px 10px;
}

.image-preview {
  max-width: 200px;
  max-height: 200px;
  margin: 0.5rem 0;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom scrollbar for chat messages */
.chat-messages::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #1f2937;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}
