:root {
    --sidebar-bg: #064617;
    --sidebar-text: #ffffff;
    --sidebar-active: #016200;
    --main-bg: #e9ecef;
    --card-bg: #ffffff;
    --accent-green: #016200;
    --text-dark: #343a40;
    --text-light: #6c757d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-color: #dee2e6;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--main-bg);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
    height: 100vh;
}
.wrapper {
    display: flex;
    width: 100%;
}
.sidebar {
    width: 300px; 
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: margin-left 0.3s ease-in-out;
}
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}
.sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}
.sidebar-branding {
    text-align: center;
}
.sidebar-logo-img {
    border-radius: 8px;
}
.sidebar-branding-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0;
}
.sidebar .nav-section-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-left: 10px;
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.sidebar .nav-link i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}
.sidebar .nav-link .crop-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 15px;
    object-fit: cover;
}
.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text);
}
.sidebar .nav-link.active {
    background-color: var(--sidebar-active);
    color: var(--sidebar-text);
    font-weight: 600;
}
.sidebar .nav-link .bi-chevron-down { 
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}
.sidebar .nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}
.sidebar .collapse .nav-link { 
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 0.95rem; 
}

.main-content {
    flex-grow: 1;
    padding: 15px 30px;
    background-color: var(--main-bg);
    overflow-y: auto;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 15px;
    z-index: 1000;
}

.page-header h3 {
    font-weight: 600;
    margin: 0;
    font-size: 1.5rem;
}
.page-header  {
    height: 83px !important;
}
.mobile-toggle {
    display: none;
    background: var(--sidebar-bg);
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
    border: none;
}
.sidebar-close-external {
    display: none;
}
.card {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
#leading-crop-filter{
        position: absolute;
        top: 12px;
        right: 10px;
        padding: 10px 15px !important;
    }
#filter-container{
        position:absolute;
        right: 10px;
        top: 16px;
    }
@media (max-width: 1192px) {
    #filter-container{
        position:absolute;
        right: 10px;
        top: 15px;
    }
    #leading-crop-filter{
        position: absolute;
        top: 95px;
        right: 0px;
    }
    #map-container{
        margin-top: 90px;
    }
}
@media (max-width: 992px) {
    #map-container{
        margin-top: 70px;
    }
    #leading-crop-filter{
        top: 95px;
    }
    .wrapper {
        flex-direction: column;
    }
      .main-content {
        padding: 15px;
    }
      .page-header {
        top: 0px;
        height: 83px !important;
      }
    .sidebar {
        position: fixed;
        left: -300px;
        z-index: 1020;
        transition: left 0.3s ease-in-out;
    }
    .sidebar.active {
        left: 0;
    }
    
    .mobile-toggle {
        display: inline-flex;
        position: absolute;
        z-index: 1019;
        top: 38px;
        left: 30px;
    }
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1010;
        display: none;
    }
    .overlay.active {
        display: block;
    }

    .sidebar-close-external {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 15px;
        left: 310px;
        z-index: 1030;
        background: var(--card-bg);
        color: var(--text-dark);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        border: none;
        box-shadow: var(--shadow);
        font-size: 1.5rem;
        opacity: 0;
        transform: scale(0.5) rotate(-90deg);
        transition: opacity 0.3s ease, transform 0.3s ease;
        pointer-events: none;
    }

    .sidebar-close-external.active {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        pointer-events: auto;
    }
    #overview{
        margin-top: -1rem !important;
    }
}

@media (max-width: 768px) {
    #map-container{
        margin-top: 80px;
    }
}
@media (max-width: 620px) {
    #filter-container{
        position:absolute;
        right: 2px;
        top: 95px;
    }
    
    #overview{
        margin-top: 4.65rem !important;
    }
}
.badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
  color: #fff;
  background-color: #6c757d;
}
.badge.primary {
  background-color: #ab2dff;
}
.badge.secondary {
  background-color: #079b0b;
}
.sidebar-toggler {
  position: fixed;
  right: 20px;
  top: 20px;
}
.social-links a {
  margin: 0 10px;
  color: #3f4750;
}
