/**
 * @file
 * Biodiversity Dashboard styles.
 */

/* Global Styles */
.biodiversity-dashboard {
  font-family: 'Segoe UI', 'Nirmala UI', Roboto, 'Noto Sans', system-ui, -apple-system, sans-serif;
  background: #f0f6ec;
  color: #1e3a2f;
  min-height: 100vh;
}

/* Header */
.dashboard-header {
  background: linear-gradient(135deg, #0c4e2e, #1a6d4c);
  border-bottom: 4px solid #ffb347;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  /*position: sticky;*/
  top: 0;
}

.logo-area h1 {
  /*font-size: 1.6rem;*/
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.5px;
  color: #fff;
}

.logo-area p {
 /*font-size: 0.7rem;*/
  opacity: 0.9;
  margin-top: 0.2rem;
}
#map-container{
padding-top: 10px;
}
.reset-btn {
  background: rgba(255, 255, 240, 0.2);
  border: 1px solid #ffdfaa;
  padding: 0.5rem 1.3rem;
  border-radius: 40px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.reset-btn:hover {
  background: #ffb347;
  color: #1e3a2f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Main Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 1.5rem;
  padding: 1.8rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* Map Panel */
.map-panel {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #d0e2c0;
  transition: transform 0.3s ease;
}

.map-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.map-title {
  background: #eef3e9;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid #bddbae;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.map-title i {
  color: #2b7a4b;
  /* font-size: 1.2rem; */
}

.map-hint {
  /*font-size: 0.7rem;*/
  font-weight: normal;
  color: #2d6a4f;
  background: rgba(45, 106, 79, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

#map-container {
  height: 520px;
  width: 100%;
  background: #eef7e8;
  cursor: grab;
  position: relative;
}

#map-container:active {
  cursor: grabbing;
}

#map-container svg {
  background: #eef7e8;
}

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem 2rem;
  border-radius: 40px;
  font-weight: 500;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #1f543f;
}

.map-note {
  /*font-size: 0.7rem;*/
  text-align: center;
  padding: 8px;
  background: #fafef5;
  color: #2d6a4f;
  border-top: 1px solid #cde2cd;
}

/* Data Panel */
.data-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* State Header */
.state-header {
  background: white;
  border-radius: 24px;
  padding: 0.9rem 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  border-left: 8px solid #ffb347;
  transition: all 0.3s ease;
}

.state-header h3 {
  margin: 0;
  /* font-size: 1.2rem; */
  color: #1f543f;
}

.state-badge {
  background: #e9f3e6;
  padding: 0.3rem 1rem;
  border-radius: 40px;
  font-weight: 500;
  /* font-size: 0.85rem; */
  color: #2b7a4b;
}

/* Stats Cards */
.stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-card {
  background: white;
  flex: 1;
  min-width: 120px;
  border-radius: 20px;
  padding: 1rem;
  text-align: center;
  border: 1px solid #e2efda;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #2b7a4b;
}

.loading-card {
  color: #888;
  text-align: center;
  padding: 1.5rem;
  background: #f9f9f9;
}

.stat-icon {
  font-size: 2rem;
  color: #2b7a4b;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0.3rem 0;
  color: #1f543f;
}

.stat-label {
  /*font-size: 0.8rem;*/
  color: #527a5e;
  font-weight: 500;
}

/* Guidelines Bar */
.guidelines-bar {
  background: white;
  border-radius: 20px;
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4faf0;
  padding: 0.4rem 1rem;
  border-radius: 32px;
  /*font-size: 0.8rem;*/
  flex: 1;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.guide-item:hover {
  background: #e8f3e2;
  transform: translateX(2px);
}

.guide-item i {
  color: #e74c3c;
  font-size: 1rem;
}

.guide-item span {
  color: #2c3e2b;
  font-weight: 500;
}

.pdf-btn {
  border: none;
  background: #2b6e46;
  color: white;
  padding: 0.25rem 0.8rem;
  border-radius: 30px;
  cursor: pointer;
  /*font-size: 0.7rem;*/
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pdf-btn:hover {
  background: #1f543f;
  transform: scale(1.02);
}

/* Finance Panel */
.finance-panel {
  background: linear-gradient(135deg, #ffffff 0%, #fef9ef 100%);
  border-radius: 20px;
  padding: 1rem 1.2rem;
  border-bottom: 4px solid #ffb347;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.finance-title {
  font-weight: 700;
  margin-bottom: 0.8rem;
  /* font-size: 0.95rem; */
  color: #1f543f;
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-title i {
  color: #ffb347;
  font-size: 1.1rem;
}

.finance-stats {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.finance-item {
    text-align: center;
    flex: 1;
    padding: 0.5rem;
    background: rgb(31 110 72 / 8%);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.finance-item:hover {
  background: rgba(255, 179, 71, 0.2);
  transform: scale(1.02);
}

.finance-num {
  font-weight: 800;
  font-size: 1.6rem;
  color: #1f543f;
}

.finance-label {
  /*font-size: 0.7rem;*/
  color: #6b8c73;
  margin-top: 4px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.6rem;
  background: white;
  border-radius: 48px;
  padding: 0.3rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 0.6rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  /* font-size: 0.85rem; */
  color: #527a5e;
}

.tab-btn i {
  margin-right: 6px;
}

.tab-btn.active {
  background: #1f6e48;
  color: white;
  box-shadow: 0 2px 8px rgba(31, 110, 72, 0.3);
}

.tab-btn:hover:not(.active) {
  background: #e9f3e6;
  color: #1f543f;
}

/* Tab Content */
.tab-content {
  display: none;
  background: white;
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.tab-content.active-tab {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.loading-table {
  text-align: center;
  padding: 2rem;
  color: #888;
}

.loading-table i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* Search & Sort Bar */
.search-sort-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 2;
  padding: 0.6rem 1rem;
  border-radius: 48px;
  border: 1px solid #caddc2;
  background: #fefef7;
  /* font-size: 0.85rem; */
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #2b7a4b;
  box-shadow: 0 0 0 3px rgba(43, 122, 75, 0.1);
}

.sort-btn {
  background: #e7f0e2;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 32px;
  cursor: pointer;
  transition: all 0.2s ease;
  /*font-size: 0.8rem;*/
  color: #1f543f;
}

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

/* Table Styles */
.table-container {
  overflow-x: auto;
  max-height: 450px;
  overflow-y: auto;
  border-radius: 16px;
}

.elegant-table {
  width: 100%;
  border-collapse: collapse;
  /* font-size: 0.85rem; */
  min-width: 600px;
}

.elegant-table th {
  text-align: left;
  padding: 0.7rem 0.5rem;
  background: #eef5e9;
  cursor: pointer;
  border-bottom: 2px solid #c0dcaf;
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
  color: #1f543f;
  transition: background 0.2s ease;
}

.elegant-table th:hover {
  background: #e0ecda;
}

.elegant-table th i {
  margin-right: 4px;
  /*font-size: 0.7rem;*/
}

.elegant-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #e3efdb;
  color: #2c3e2b;
}

.elegant-table tr:hover td {
  background: #f8fbf6;
}

.badge-status {
  background: #cbe5cf;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  /*font-size: 0.7rem;*/
  font-weight: 600;
  display: inline-block;
  color: #1f543f;
}

.empty-table-msg {
  text-align: center;
  padding: 2rem;
  color: #7e9e70;
  font-style: italic;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.2rem;
  /*font-size: 0.7rem;*/
  color: #436b50;
  border-top: 1px solid #cde0c3;
  margin-top: 1rem;
  background: #fafef5;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  #map-container {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
    padding: 1rem;
  }
  
  .logo-area h1 {
    /* font-size: 1.2rem; */
  }
  
  .logo-area p {
/*/*font-size: 0.7rem;*/*/
  }
  
  .state-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .state-header h3 {
    font-size: 1rem;
  }
  
  .stats-row {
    flex-direction: column;
  }
  
  .stat-card {
    min-width: auto;
  }
  
  .guidelines-bar {
    flex-direction: column;
  }
  
  .guide-item {
    width: 100%;
  }
  
  .finance-stats {
    flex-direction: column;
  }
  
  .tabs {
    flex-wrap: wrap;
  }
  
  .tab-btn {
/*/*font-size: 0.7rem;*/*/
    padding: 0.4rem;
  }
  
  .search-sort-bar {
    flex-direction: column;
  }
  
  .search-input {
    width: 100%;
  }
  
  .table-container {
    max-height: 350px;
  }
  
  .elegant-table {
/*/*font-size: 0.7rem;*/*/
  }
}

@media (max-width: 480px) {
  .map-title {
    /*font-size: 0.8rem;*/
  }
  
  .map-hint {
    display: none;
  }
  
  #map-container {
    height: 300px;
  }
  
  .stat-number {
    font-size: 1.4rem;
  }
  
  .finance-num {
    font-size: 1rem;
  }
}

/* Print Styles */
@media print {
  .dashboard-header,
  .reset-btn,
  .guidelines-bar,
  .pdf-btn,
  .search-sort-bar,
  .tabs,
  footer {
    display: none;
  }
  
  .tab-content {
    display: block !important;
  }
  
  .main-grid {
    display: block;
  }
  
  #map-container {
    height: 300px;
    page-break-inside: avoid;
  }
}

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

::-webkit-scrollbar-track {
  background: #eef3e9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #2b7a4b;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1f543f;
}
.official-card.chairman-card, .official-card.secretary-card {
    min-height: 219px;
    margin: 10px;
    width: 47%;
    background: #fff;
    float: left;
    padding: 14px;
    border-radius: 15px;
}
.official-title h3 {
    margin: 0px;
}