* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body, html { height: 100%; width: 100%; overflow: hidden; background-color: #0f172a; }

/* --- MAIN MAP PAGE LAYOUT --- */
.dashboard-container { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

.sidebar { 
    width: 320px; 
    min-width: 320px; 
    background: #ffffff; 
    display: flex; 
    flex-direction: column; 
    z-index: 1000; 
    border-right: 1px solid #e2e8f0; 
    height: 100vh;
}
.map-container { flex-grow: 1; height: 100vh; position: relative; }

.header-main { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #0f172a; color: #ffffff; }
.header-main h2 { font-size: 20px; font-weight: 700; }
.header-main p { font-size: 13px; color: #94a3b8; margin-top: 4px; }



.control-group, .legend-card { padding: 12px 20px; border-bottom: 1px solid #f1f5f9; background: #f8fafc;}
.control-group label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; color: #64748b; margin-bottom: 8px; }
#district-select { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 14px; outline: none; }


.legend-item { display: flex; align-items: center; margin-bottom: 4px; font-size: 12px; font-weight: 500; }
.badge { width: 14px; height: 14px; border-radius: 50%; margin-right: 10px; }
.badge-esic { background-color: #2563eb; border: 2px solid #ffffff; box-shadow: 0 0 0 1px #2563eb; }
.badge-nhm { background-color: #10b981; border: 2px solid #ffffff; box-shadow: 0 0 0 1px #10b981; }

.facility-panel { flex: 1; overflow-y: auto; padding: 12px 20px; background: #ffffff;}
.facility-list { list-style: none; }
.facility-item { padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.facility-item h4 { font-size: 14px; color: #1e293b; margin-bottom: 4px; }
.facility-item p { font-size: 12px; color: #64748b; }
.type-tag { display: inline-block; padding: 2px 6px; font-size: 10px; font-weight: 700; border-radius: 4px; margin-top: 8px; }
.tag-esic { background: #dbeafe; color: #1e40af; }
.tag-nhm { background: #d1fae5; color: #065f46; }

.custom-popup .leaflet-popup-content-wrapper { border-radius: 12px; }
.custom-popup h3 { font-weight: 700; font-size: 14px; margin-bottom: 4px;}
.custom-popup p { font-size: 12px; margin-bottom: 4px;}

/* --- NEW SETTINGS PAGE LAYOUT --- */
.admin-body { background-color: #f1f5f9; overflow-y: auto; }
.admin-header { background: #0f172a; padding: 20px 0; color: white; }
.admin-header-content { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px;}
.back-btn { color: white; text-decoration: none; font-weight: 500; background: #334155; padding: 8px 16px; border-radius: 6px;}

.admin-container { max-width: 1000px; margin: 30px auto; padding: 0 20px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.admin-card { background: white; padding: 24px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.admin-card.full-width { grid-column: span 2; }
.admin-card h3 { font-size: 16px; margin-bottom: 20px; color: #1e293b; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px;}

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-box { background: #f8fafc; padding: 20px; border-radius: 8px; text-align: center; border: 1px solid #e2e8f0; }
.stat-num { display: block; font-size: 32px; font-weight: 700; color: #2563eb; }
.stat-label { font-size: 13px; color: #64748b; font-weight: 500;}

.table-wrapper { max-height: 250px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f8fafc; padding: 12px; text-align: left; position: sticky; top: 0; }
.data-table td { padding: 12px; border-bottom: 1px solid #f1f5f9; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: span 2; }
.form-group label { font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; }

.primary-btn { margin-top: 20px; background: #2563eb; color: white; border: none; padding: 12px; border-radius: 6px; font-weight: 600; cursor: pointer; width: 100%; transition: background 0.2s;}
.primary-btn:hover { background: #1d4ed8; }
.secondary-btn { background: white; border: 1px solid #cbd5e1; padding: 10px; border-radius: 6px; font-weight: 500; cursor: pointer;}
.file-input { display: none; }
.file-input-label { display: inline-block; background: #0f172a; color: white; padding: 10px; border-radius: 6px; cursor: pointer; font-weight: 500;}


/* --- UPDATED ADMIN PANEL V2 STYLES --- */
.admin-container { 
    max-width: 1400px; /* Expanded Width */
    margin: 20px auto; 
    padding: 0 20px; 
}

.admin-header-content {
    max-width: 1400px;
}

.actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-action-btn {
    background: #1e293b;
    color: white;
    border: 1px solid #475569;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-action-btn:hover { background: #334155; }
.nav-action-btn.primary-action { background: #2563eb; border-color: #1d4ed8; }
.nav-action-btn.primary-action:hover { background: #1d4ed8; }

.hidden-file-input { display: none; }

.stats-card { margin-bottom: 24px; padding: 20px; }

/* Tab Menu System */
.tab-menu {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover { color: #1e293b; background: #f8fafc; border-radius: 8px 8px 0 0;}
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; }

.tab-content.hidden { display: none; }

.card-header { margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; padding-bottom: 12px; }
.card-header.flex-between { display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { margin: 0; font-size: 16px; color: #1e293b; }

.submit-btn { max-width: 300px; margin-top: 24px; }

/* Expanded Tables for Data View */
.table-wrapper.large-table { max-height: 600px; }
.data-table th, .data-table td { padding: 14px; }
.data-table td { font-size: 13px; line-height: 1.4; vertical-align: top; }
.text-muted { color: #64748b; font-size: 12px; }

/* Delete Buttons */
.danger-btn { background: #ef4444; color: white; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 500; cursor: pointer; font-size: 13px; }
.danger-btn:hover { background: #dc2626; }
.icon-delete-btn { background: #fee2e2; color: #ef4444; border: 1px solid #fca5a5; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 12px;}
.icon-delete-btn:hover { background: #fca5a5; color: white; }
/* --- CUSTOM MAP ICON MARKERS & BADGES --- */
.custom-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.badge-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 11px;
    margin-right: 8px;
}

.marker-esic, .badge-esic { background-color: #2563eb; }
.marker-nhm, .badge-nhm { background-color: #10b981; }

/* Corner Tags for Facility List */
.facility-item {
    position: relative; /* Allows child absolute positioning */
    padding: 16px;
}

.facility-item h4 {
    padding-right: 45px; /* Prevents long names from going under the tag */
}

.facility-item .type-tag {
    position: absolute;
    top: 10px;
    right: 12px;
    margin-top: 0;
}

/* Edit Button Styling */
.icon-edit-btn { background: #e0f2fe; color: #0284c7; border: 1px solid #7dd3fc; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.icon-edit-btn:hover { background: #7dd3fc; color: #0369a1; }
/* --- FACILITY ID BADGES --- */
.id-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

.id-badge.esic { 
    background: #dbeafe; 
    color: #1e40af; 
    border: 1px solid #bfdbfe; 
}

.id-badge.nhm { 
    background: #d1fae5; 
    color: #065f46; 
    border: 1px solid #a7f3d0; 
}
/* --- SIDEBAR TOGGLE & ANIMATIONS --- */
.sidebar.collapsed {
    margin-left: -320px; 
}

/* When this class is added, the sidebar pulls itself completely off the left side of the screen */
.sidebar.collapsed {
    margin-left: -380px; 
}

/* Header Actions Grouping */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Close "X" Button */
.close-sidebar-btn {
    background: transparent;
    color: #94a3b8;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.close-sidebar-btn:hover {
    color: #ef4444; /* Turns red on hover */
}

/* Hamburger Menu Button (Sits on top of the map) */
.hamburger-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2000; /* Keeps it above the map tiles */
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hamburger-btn:hover {
    background: #334155;
}

.hamburger-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
/* --- ESIC SPLIT THEME --- */
/* For Hospitals */
.marker-esic-blue { background-color: #3b82f6; }
.id-badge.esic-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag-esic-blue { background: #eff6ff; color: #1d4ed8; }

/* For Dispensaries / Other Facilities */
.marker-esic-red { background-color: #ef4444; }
.id-badge.esic-red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.tag-esic-red { background: #fee2e2; color: #b91c1c; }



/* ==========================================
   MODERN CUSTOM ALERTS & CONFIRMS 
========================================== */
.custom-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 99999;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal-overlay.show {
    opacity: 1; visibility: visible;
}

.custom-modal-box {
    background: white;
    border-radius: 16px;
    width: 90%; max-width: 380px;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    text-align: center;
}

.custom-modal-overlay.show .custom-modal-box {
    transform: translateY(0);
}

.custom-modal-icon { font-size: 36px; margin-bottom: 12px; }
.custom-modal-title { font-size: 18px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.custom-modal-message { font-size: 14px; color: #64748b; margin-bottom: 24px; line-height: 1.5; }
.custom-modal-actions { display: flex; gap: 12px; justify-content: center; }

.custom-modal-btn {
    padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 14px; 
    cursor: pointer; border: none; flex: 1; transition: background 0.2s;
}

.custom-modal-btn.primary { background: #2563eb; color: white; }
.custom-modal-btn.primary:hover { background: #1d4ed8; }
.custom-modal-btn.danger { background: #ef4444; color: white; }
.custom-modal-btn.danger:hover { background: #dc2626; }
.custom-modal-btn.secondary { background: #f1f5f9; color: #475569; }
.custom-modal-btn.secondary:hover { background: #e2e8f0; }
/* --- SEARCH AUTOCOMPLETE SUGGESTIONS --- */
.search-suggestions {
    position: absolute;
    top: 100%; /* Pushes it right below the search bar */
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    margin-top: 10px;
    list-style: none;
    padding: 8px 0;
    max-height: 250px;
    overflow-y: auto;
    z-index: 2001;
}

.search-suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 12px 20px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    text-transform: capitalize;
}

.suggestion-item:hover {
    background: #f1f5f9;
    color: #2563eb;
}

/* Highlights the letters you are currently typing */
.suggestion-item strong {
    color: #2563eb;
    font-weight: 800;
}
/* --- CLEAR SEARCH BUTTON --- */
.clear-search-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    padding: 0 8px;
    transition: color 0.2s;
}

.clear-search-btn:hover {
    color: #ef4444; /* Turns red when hovered */
}

.clear-search-btn.hidden {
    display: none;
}


/* --- INTEGRATED SEARCH & RADIUS BAR --- */
.search-divider {
    height: 24px;
    width: 1px;
    background-color: #cbd5e1;
    margin: 0 12px;
}

/* --- BEAUTIFUL RADIUS DROPDOWN --- */
.search-radius-trigger {
    border: none;
    outline: none;
    background: transparent;
    font-size: 11px;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    padding-right: 5px;
    white-space: nowrap; 
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.search-radius-trigger:hover,
.search-radius-trigger:hover svg {
    color: #2563eb;
    stroke: #2563eb;
}

#radius-dropdown-wrapper .dropdown-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

#radius-dropdown-wrapper.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* --- SMART ZOOM LABELS (Clean, Flat Text) --- */
.facility-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important; /* Forces no background box */
    padding: 0;
    border: none !important;
    font-weight: 800; /* Made slightly thicker so it stands out without a shadow */
    font-size: 11px; 
    
    text-shadow: none !important; /* Completely removes the white halo/shadow */
    
    white-space: nowrap;
    pointer-events: none; 
    cursor: pointer; 
    opacity: 0; 
    transition: opacity 0.3s ease, font-size 0.2s ease, left 0.2s ease;
}

/* Fade in the labels */
.leaflet-container.show-marker-labels .facility-label {
    opacity: 1;
    pointer-events: auto;
}

/* 1. MATCH LABEL COLORS TO THEIR MARKERS */
.marker-chc .facility-label { color: #10b981; }        /* CHC Green */
.marker-sdh .facility-label { color: #1f2937; }        /* SDH Black */
.marker-dh .facility-label { color: #a855f7; }         /* DH Purple */
.marker-esic-red .facility-label { color: #ef4444; }   /* ESIC Dispensary Red */
.marker-esic-blue .facility-label { color: #3b82f6; }  /* ESIC Hospital Blue */
.marker-esic-yellow .facility-label { color: #e19b03; } /* ESIC Tie-Up Dark Yellow */
.marker-phc, .badge-phc { background-color: #38bdf8; }
.marker-phc .facility-label { color: #0284c7; } /* slightly darker blue for label readability */

/* 2. DYNAMIC RESIZING BASED ON ZOOM LEVEL */
.leaflet-container[data-zoom="11"] .facility-label { font-size: 10px; left: 16px; }
.leaflet-container[data-zoom="12"] .facility-label { font-size: 12px; left: 18px; }
.leaflet-container[data-zoom="13"] .facility-label { font-size: 13px; left: 20px; }
.leaflet-container[data-zoom="14"] .facility-label { font-size: 14px; left: 22px; }
.leaflet-container[data-zoom="15"] .facility-label,
.leaflet-container[data-zoom="16"] .facility-label,
.leaflet-container[data-zoom="17"] .facility-label,
.leaflet-container[data-zoom="18"] .facility-label,
.leaflet-container[data-zoom="19"] .facility-label { font-size: 16px; left: 26px; }

/* When the map zooms in, this class triggers the fade & slide-in effect! */
.leaflet-container.show-marker-labels .facility-label {
    opacity: 1;
    transform: translateY(-50%) translateX(6px); 
    pointer-events: auto; /* ALLOWS CLICKS ONLY WHEN VISIBLE */
}

/* --- PERMANENT DISTRICT LABELS (Responsive & Centered) --- */
.district-label-tooltip {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 800;
    color: #334155; 
    /* Thicker, cleaner text outline for readability against map tiles */
    text-shadow: 
        1.5px 1.5px 0 #ffffff, 
        -1.5px -1.5px 0 #ffffff, 
        1.5px -1.5px 0 #ffffff, 
        -1.5px 1.5px 0 #ffffff,
        0 0 5px rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    text-align: center;
    pointer-events: none; /* Prevents labels from blocking clicks on the map */
    transition: font-size 0.2s ease, opacity 0.3s ease; 
}

/* Hide the little triangle pointer that Leaflet adds by default */
.district-label-tooltip::before,
.district-label-tooltip::after {
    display: none !important;
}

/* --- DYNAMIC SCALING BASED ON ZOOM LEVEL --- */
/* Zoomed out (Whole State View) */
.leaflet-container[data-zoom="7"] .district-label-tooltip { font-size: 7px !important; letter-spacing: 0px; opacity: 0.8;}
.leaflet-container[data-zoom="8"] .district-label-tooltip { font-size: 10px !important; }

/* Mid Zoom (Focusing on a region) */
.leaflet-container[data-zoom="9"] .district-label-tooltip { font-size: 14px !important; }
.leaflet-container[data-zoom="10"] .district-label-tooltip { font-size: 18px !important; }

/* Deep Zoom (Focusing on specific facilities) -> Fades into a background watermark */
.leaflet-container[data-zoom="11"] .district-label-tooltip { font-size: 24px !important; opacity: 0.4; }
.leaflet-container[data-zoom="12"] .district-label-tooltip,
.leaflet-container[data-zoom="13"] .district-label-tooltip { font-size: 32px !important; opacity: 0.2; }
.leaflet-container[data-zoom="14"] .district-label-tooltip,
.leaflet-container[data-zoom="15"] .district-label-tooltip,
.leaflet-container[data-zoom="16"] .district-label-tooltip { font-size: 42px !important; opacity: 0.1; }


/* --- LEAFLET ZOOM CONTROLS POSITIONING (DESKTOP) --- */
.leaflet-bottom.leaflet-right {
    bottom: 140px !important; 
    right: 35px !important; 
    margin: 0 !important; 
    z-index: 1000 !important; 
    transition: bottom 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

/* --- PRINT MODAL --- */
.print-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.print-modal-overlay.hidden {
    display: none;
}

.print-modal-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ==========================================
   TRUE VECTOR PRINT ENGINE
   ========================================== */
@media print {
    /* Force colors to print (Crucial for markers) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide everything except the map */
    body * {
        visibility: hidden;
    }

    #map, #map * {
        visibility: visible;
    }

    /* Stretch map to fill the paper */
    #map {
        position: absolute;
        left: 0;
        top: 0;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide UI buttons */
    .leaflet-control-container,
    #floating-print-btn,
    #print-map-modal {
        display: none !important;
    }

    @page {
        size: landscape;
        margin: 0mm;
    }
}

/* ==========================================
   ADMIN FOOTER (Coloured Box)
   ========================================== */
.admin-footer {
    background-color: #e0f2fe; /* Soft blue background */
    border: 1px solid #bae6fd; /* Slightly darker blue border */
    border-radius: 12px; /* Rounded corners to match other cards */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    text-align: center;
    padding: 20px;
    margin: 40px auto 20px auto; /* Centers the box with spacing */
    max-width: 1400px; /* Keeps it aligned perfectly with your admin container */
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
}

.admin-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.admin-footer a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* --- NHM SUB-TYPE THEMES --- */

.id-badge.phc { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.tag-phc { background: #e0f2fe; color: #0369a1; }
/* CHC (Green) */
.marker-chc, .badge-chc { background-color: #10b981; }
.id-badge.chc { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.tag-chc { background: #d1fae5; color: #065f46; }

/* SDH (Black) */
.marker-sdh { background-color: #1f2937; } /* Black/Dark Gray */
.id-badge.sdh { background: #e5e7eb; color: #111827; border: 1px solid #d1d5db; }
.tag-sdh { background: #e5e7eb; color: #111827; }

/* DH (Purple) */
.marker-dh, .badge-dh { background-color: #a855f7; }
.id-badge.dh { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.tag-dh { background: #f3e8ff; color: #7e22ce; }

/* ESIC Tie-Up Hospital (Dark Yellow) */
.marker-esic-yellow { background-color: #e19b03; } 
.id-badge.esic-yellow { background: #fef08a; color: #e19b03; border: 1px solid #fde047; }
.tag-esic-yellow { background: #fef08a; color: #e19b03; }

/* ==========================================
   TOP TOOLBAR (Groups Search, Pin, and Pills)
   ========================================== */
.top-toolbar {
    position: fixed;
    top: 20px;
    left: 340px; /* Starts right after the sidebar */
    right: 60px; /* Protects the zoom buttons and leaves room for the 9-dots menu */
    z-index: 2000;
    display: flex;
    gap: 8px; /* Tighter gap for smaller screens */
    transition: left 0.3s ease-in-out;
    pointer-events: none; /* Allows you to click the map through the empty space */
}

/* Slides the entire toolbar left when menu closes */
.top-toolbar.shifted {
    left: 80px;
}

/* --- FLOATING MAP SEARCH BAR --- */
.floating-search-container {
    position: relative;
    
    /* THE FIX: Set a firm minimum width so it refuses to shrink below 240px */
    flex: 1 0 240px; 
    min-width: 240px;
    max-width: 440px; 
    
    height: 36px;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 30px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0 16px;
    pointer-events: auto;
}

.floating-search-container:focus-within {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.search-icon { font-size: 14px; margin-right: 8px; color: #64748b; }

#search-input {
    border: none; outline: none; width: 100%; min-width: 0; 
    font-size: 12px; background: transparent; color: #1e293b; font-family: 'Inter', sans-serif;
}
#search-input::placeholder { color: #94a3b8; }

.search-radius-select {
    border: none; outline: none; background: transparent; font-size: 11px;
    color: #475569; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
    padding-right: 5px; white-space: nowrap; 
}

/* ==========================================
   DISTRICT SELECT PILL
   ========================================== */
.district-pill-container {
    position: relative;
    height: 36px; 
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    padding: 0 10px; /* Tighter padding */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    pointer-events: auto;
}

.district-pill-container:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.district-pill-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    
    font-size: 11px; 
    /* THE FIX: Changed from 700 (bold) to 400 (regular text) */
    font-weight: 400; 
    color: #334155;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    
    /* Default width for smaller laptop screens */
    width: 85px; 
    max-width: 85px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    
    padding: 0 16px 0 0 !important; 
    line-height: 32px; 
    
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 12px;
    height: 100%;
    margin: 0;
    transition: width 0.3s ease, max-width 0.3s ease; /* Smooth animation when resizing */
}

/* THE FIX: Responsive design for larger desktop monitors */
@media (min-width: 1200px) {
    .district-pill-select {
        /* Gives the pill much more room to show long district names on big screens */
        width: 140px; 
        max-width: 140px;
    }
}

.district-pill-select:focus {
    outline: none !important; box-shadow: none !important; border: none !important; background-color: transparent !important;
}
.district-pill-select option { font-weight: 500; color: #1e293b; background: #ffffff; }

/* ==========================================
   CUSTOM MULTI-SELECT FILTER PILL
   ========================================== */
.custom-dropdown-container {
    position: relative;
    height: 36px; 
    pointer-events: auto;
}

.filter-pill-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    padding: 0 12px;
    height: 100%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    
    /* THE FIX: Added smooth transition for resizing */
    transition: width 0.3s ease, all 0.2s ease; 
    
    /* Default size for smaller screens */
    width: 115px; 
    white-space: nowrap;
    
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    user-select: none;
}

/* Ensures the text neatly cuts off with "..." on small screens */
#facility-filter-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* THE FIX: Responsive design for large desktop monitors */
@media (min-width: 1200px) {
    .filter-pill-trigger {
        /* Expands the pill so "All Facilities" fully shows on big screens */
        width: 140px; 
    }
}

.filter-pill-trigger:hover { background: #f8fafc; border-color: #cbd5e1; }
.dropdown-arrow { width: 14px; height: 14px; transition: transform 0.2s ease; }
.custom-dropdown-container.open .dropdown-arrow { transform: rotate(180deg); }

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
    width: 220px;
    z-index: 3000;
    border: 1px solid #e2e8f0;
}

.custom-dropdown-menu.hidden { display: none; }
.dropdown-item {
    display: flex; align-items: center; padding: 8px 16px;
    cursor: pointer; font-size: 13px; color: #475569; font-weight: 600; transition: background 0.2s;
}
.dropdown-item:hover { background: #f1f5f9; }
.dropdown-item input[type="checkbox"] { margin-right: 12px; width: 15px; height: 15px; accent-color: #2563eb; cursor: pointer; }
.dropdown-item svg { margin-right: 10px; }

/* ==========================================
   INTERACTIVE DROP PIN BUTTON
   ========================================== */
.drop-pin-btn {
    position: relative;
    height: 36px; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 14px;
    background: #ffffff;
    color: #334155;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    pointer-events: auto;
    
    /* THE FIX: Prevents the text from ever stacking into two lines */
    white-space: nowrap; 
}

.drop-pin-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.drop-pin-btn.active { background: #ef4444; color: white; border-color: #dc2626; animation: pinPulse 1.5s infinite; }

/* ==========================================
   CUSTOM MAP LAYER PILLS
   ========================================== */
.map-layer-pills {
    position: relative;
    height: 36px; /* COMPACT HEIGHT */
    display: flex;
    align-items: center;
    padding: 3px;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: auto;
}

.map-layer-pills input[type="radio"] { display: none; }

.map-layer-pills label {
    font-size: 11px; font-weight: 600; color: #475569; cursor: pointer;
    border-radius: 20px; transition: all 0.2s ease; user-select: none;
    display: flex; align-items: center; height: 100%; padding: 0 12px; margin: 0;
}

.map-layer-pills label:hover { background: #f1f5f9; }
.map-layer-pills input[type="radio"]:checked + label { background: #2563eb; color: #ffffff; }
.map-layer-pills input[type="radio"]:checked + label:hover { background: #1d4ed8; }

@keyframes pinPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Turns the mouse into a target crosshair */
.map-crosshair {
    cursor: crosshair !important;
}

/* --- MOVE ZOOM BUTTONS (MOBILE FIX) --- */
@media (max-width: 768px) {
    .leaflet-bottom.leaflet-right {
        bottom: calc(40vh + 15px) !important; /* Uses exact positioning instead of margins */
        right: 10px !important;
        margin: 0 !important;
        z-index: 2000 !important; /* Forces it above all map UI */
        transition: bottom 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    }

    /* Drop zoom buttons down when sheet is Collapsed */
    body:has(.sidebar.sheet-collapsed) .leaflet-bottom.leaflet-right {
        bottom: 95px !important; 
    }
}

/* 9-Dots Trigger */
.apps-menu-wrapper { position: fixed; top: 20px; right: 20px; z-index: 3000; }
.apps-menu-btn { 
    background: transparent; border: none; cursor: pointer; 
    padding: 8px; border-radius: 50%; display: flex; transition: background 0.2s;
}
.apps-menu-btn:hover { background: rgba(255,255,255,0.1); }

/* The Panel */
.apps-menu-panel {
    position: absolute; top: 45px; right: 0; width: 260px;
    background: #ffffff; border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 16px; border: 1px solid #e2e8f0;
}
.apps-menu-panel.hidden { display: none; }

.apps-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
}

.app-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start; /* Ensures everything starts from the top evenly */
    text-align: center;
    text-decoration: none; 
    color: #334155; 
    font-size: 12px; 
    font-weight: 600;
    padding: 12px 8px; 
    border-radius: 8px; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-item:hover { 
    background: #f1f5f9; 
    transform: translateY(-2px); /* Adds a modern tiny hover lift effect */
}

/* Forces all icons (Emoji, SVG, PNG) into a perfect 32x32 square */
.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    font-size: 28px;
    line-height: 1;
    object-fit: contain;
}

.app-label {
    line-height: 1.2;
}

/* --- CUSTOM MODERN SCROLLBARS FOR MENUS --- */
.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.custom-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
    margin: 8px 0;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Restores the horizontal line for the pills on desktop */
.mobile-swipable-pills {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hide mobile layer dropdown on desktop */
.mobile-layer-dropdown {
    display: none !important;
}

/* ==========================================
   MOBILE RESPONSIVENESS (Max Width: 768px)
   ========================================== */
@media (max-width: 768px) {
    /* 1. Hide Hamburger Menu & Sidebar entirely */
    #hamburger-btn {
        display: none !important;
    }
    .sidebar {
        display: none !important;
    }

    /* 2. Reposition the Top Toolbar */
    .top-toolbar {
        left: 10px !important; /* Overrides the desktop 340px offset */
        right: 10px !important;
        top: 10px !important;
        flex-direction: column; /* Stacks Search Bar above the pills */
        gap: 10px;
        pointer-events: none; /* Allows clicking the map through the gaps */
        transition: none !important; /* Stops weird sliding animations on mobile */
    }

    /* 3. Search Bar Layout (Top Row) */
    .floating-search-container {
        /* Leaves exactly 45px of space on the right for the 9-dots menu */
        width: calc(100% - 45px) !important; 
        max-width: 100% !important;
        flex: none !important; 
        pointer-events: auto;
    }

    /* 4. 9-Dots Menu Layout (Top Row Right) */
    .apps-menu-wrapper {
        top: 10px !important;
        right: 10px !important;
    }

    /* 5. Swipable Pills Layout (Bottom Row) */
    .mobile-swipable-pills {
        display: flex;
        flex-direction: row;
        justify-content: flex-start !important; 
        gap: 5px !important; /* <-- EXTREMELY TIGHT GAP */
        overflow-x: auto; 
        overflow-y: hidden;
        width: 100%;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-bottom: 5px; 
        pointer-events: auto; 
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; 
    }

    .mobile-swipable-pills::-webkit-scrollbar {
        display: none; 
    }

    /* 3. Make the pills noticeably smaller and more compact */
    .mobile-swipable-pills .custom-dropdown-container {
        padding: 0 !important; 
        margin: 0 !important;
        border: none !important;
        height: 28px !important;
    }
    .mobile-swipable-pills .filter-pill-trigger,
    .mobile-swipable-pills .drop-pin-btn,
    .mobile-swipable-pills .map-layer-pills,
    .mobile-swipable-pills .search-radius-trigger {
        height: 28px !important; 
        font-size: 10.5px !important; 
        padding: 0 8px !important; /* Adjusted slightly so text isn't cramped */
        margin: 0 !important; 
        white-space: nowrap !important;
    }

    .mobile-swipable-pills .filter-pill-trigger {
        width: auto !important; 
        min-width: 0px !important;
    }

    #mobile-layer-trigger {
        padding: 0 6px !important;
    }

    /* Shrink the little SVG dropdown arrows slightly */
    .mobile-swipable-pills .dropdown-arrow {
        width: 12px !important;
        height: 12px !important;
    }

    /* Hide the wide desktop layer pills */
    .desktop-layer-pills {
        display: none !important;
    }
    
    /* Show the compact mobile dropdown */
    .mobile-layer-dropdown {
        display: block !important;
    }
    /* --- FIX: PREVENT DROPDOWNS FROM GETTING CUT OFF IN THE SWIPE ROW --- */
    .mobile-swipable-pills .custom-dropdown-menu {
        position: fixed !important; /* Breaks it out of the scrolling box */
        top: 110px !important; /* Puts it safely below the search bar */
        left: 50% !important;
        transform: translateX(-50%) !important; /* Centers it perfectly */
        width: 90% !important;
        max-width: 320px !important;
        z-index: 9999 !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.4) !important;
    }
    /* 1. Hide the old sidebar layout */
  .sidebar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 40vh !important; 
    z-index: 2500 !important;
    border-right: none !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15) !important;
    background: #ffffff !important;
    
    /* NEW: Snappier iOS-style spring curve and hardware acceleration */
    transition: height 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important; 
    will-change: height;
}

/* NEW: Prevents the browser from accidentally triggering a page pull-to-refresh when dragging the handle */
.sidebar-header {
    touch-action: none !important;
}

    /* --- NEW BOTTOM SHEET STATES --- */
    .sidebar.sheet-full {
        height: 85vh !important; /* Expands to near the top of the screen */
    }

   /* 1. Increase collapsed height just enough to keep the title visible */
    .sidebar.sheet-collapsed {
        height: 80px !important; /* Increased from 60px */
        overflow: hidden !important;
    }

    /* 2. Squeeze the empty space around the grey swipe handle */
    .sidebar-header {
        padding: 8px 10px 0px 10px !important; 
        cursor: pointer !important;
    }

    /* Move the grey swipe line closer to the text */
    .sidebar-header::before {
        margin: 0 auto 8px auto !important; 
    }

    /* Hide unnecessary UI elements inside the tray */
    .sidebar .header-main { display: none !important; }
    .sidebar .close-sidebar-btn { display: none !important; }

    /* 2. Style the tray header to be a "handle" for swiping */
    .sidebar-header {
        cursor: grab;
        padding: 10px !important;
        text-align: center;
    }
    
    /* Optional: Add a little swipe indicator bar */
    .sidebar-header::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
        margin: 0 auto 10px auto;
    }

   

    /* 3. Pull the "Available Facilities" title closer to the top */
    .facility-panel {
        padding-top: 2px !important; 
    }

    /* 4. Reduce the gap between the title and the first facility card */
    .facility-panel > div:first-child {
        margin-bottom: 10px !important; 
    }
    /* --- MOBILE FACILITY CARDS UPGRADE --- */
.facility-item {
    background: #ffffff !important;
    padding: 14px 16px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03) !important;
    position: relative !important;
}

/* Give the title more breathing room and prevent tag overlap */
.facility-item h4 {
    font-size: 14px !important;
    line-height: 1.4 !important;
    padding-right: 55px !important; 
    margin-bottom: 6px !important;
}

/* Improve text readability */
.facility-item p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #64748b !important;
    margin-bottom: 2px !important;
}

/* Reposition the top-right tag for the new card padding */
.facility-item .type-tag {
    top: 14px !important;
    right: 14px !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
}
}

/* --- MOBILE RESPONSIVENESS FOR ADMIN PANEL --- */
@media (max-width: 768px) {
    /* 1. Header & Title Layout */
    .admin-header {
        padding: 16px 0 !important;
    }
    .admin-header-content {
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 16px !important;
    }
    .header-left h2 {
        font-size: 18px !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    /* 2. Professional 2x2 Button Grid */
    .header-right.actions-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }

    /* 3. Sleek "Pill" Styling (Matches Home Page) */
    .nav-action-btn, .back-btn {
        width: 100% !important;
        margin: 0 !important; /* Remove the left margin on the back button */
        padding: 10px 8px !important;
        font-size: 11px !important; /* Smaller, cleaner text */
        font-weight: 600 !important;
        border-radius: 30px !important; /* Pill shape */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
        border: none !important;
    }

    /* Cohesive Button Colors */
    #download-all-data-btn { background: #10b981 !important; color: white !important; }
    #download-sample-btn { background: #334155 !important; color: white !important; }
    .nav-action-btn.primary-action { background: #2563eb !important; color: white !important; }
    .back-btn { background: #ffffff !important; color: #334155 !important; border: 1px solid #cbd5e1 !important; box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important; }

    /* 4. Stats Grid Compactness */
    .stats-card {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .stat-box { padding: 12px 8px !important; }
    .stat-num { font-size: 20px !important; }
    .stat-label { font-size: 10px !important; }

    /* 5. Modern Toggle Tab Menu */
    .tab-menu {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        border: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 20px !important;
    }
    .tab-btn {
        padding: 12px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        text-align: center !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    }
    .tab-btn.active {
        background: #eff6ff !important;
        border-color: #3b82f6 !important;
        color: #1d4ed8 !important;
    }

    /* 6. Form & Table Layout */
    .form-grid {
        grid-template-columns: 1fr !important; 
    }
    .form-group.full-width { grid-column: span 1 !important; }

    .table-wrapper.large-table {
        overflow-x: auto !important;
        display: block !important;
    }
    .data-table {
        width: 700px !important; 
    }
}

/* --- DISTANCE & NEAREST BADGE STYLES --- */
.distance-wrapper {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between the distance and nearest badge */
    margin-top: 6px;
}

.distance-badge {
    display: inline-block;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #2563eb !important; 
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    padding: 3px 8px;
    border-radius: 6px;
}

.nearest-badge {
    display: inline-block;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #16a34a !important; /* Solid Green */
    background: #dcfce7 !important; /* Light Green Background */
    border: 1px solid #bbf7d0 !important;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   FLOATING FILTER WIDGET (DRAGGABLE)
   ========================================== */
.floating-filter-widget {
    position: fixed;
    top: 80px;   
    right: 30px;     
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 200px;
    padding: 16px;
    z-index: 1999;
    border: 1px solid #e2e8f0;
    
    /* Makes the whole window show the hand icon */
    cursor: grab; 
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.floating-filter-widget.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.floating-filter-widget.is-dragging {
    transition: none !important;
    cursor: grabbing !important; 
}

.ff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.ff-header:active {
    cursor: grabbing;
}

.ff-close-btn, .ff-item {
    cursor: pointer;
}

.ff-header h4 {
    margin: 0;
    font-size: 11px;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
}

/* Close Button */
.ff-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}

.ff-close-btn:hover {
    color: #ef4444; /* Turns red on hover */
}

.ff-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}
.ff-item:hover {
    color: #1e293b;
}
.ff-item:last-child { 
    margin-bottom: 0; 
}
.ff-item input[type="checkbox"] { 
    margin-right: 10px; 
    accent-color: #2563eb; 
    width: 14px; 
    height: 14px; 
    cursor: pointer;
}
.ff-item svg { 
    margin-right: 8px; 
}

/* Hide on mobile devices to prevent screen clutter */
@media (max-width: 768px) {
    .floating-filter-widget {
        display: none !important;
    }
}


/* ==========================================
   ADMIN SEARCH BAR WIDGETS
   ========================================== */
.admin-search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 0 14px;
    height: 38px;
    width: 260px;
    transition: all 0.3s ease;
}

.admin-search-container:focus-within {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.admin-search-container .search-icon {
    font-size: 14px;
    color: #64748b;
    margin-right: 8px;
}

.admin-search-input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
}

.admin-search-input::placeholder {
    color: #94a3b8;
}

/* Mobile Responsiveness for Admin Search */
@media (max-width: 768px) {
    .admin-search-container {
        width: 100%;
    }
    .card-header > div {
        width: 100%;
    }
    .danger-btn {
        width: 100%;
    }
}

/* ==========================================
   ADMIN SUB-CATEGORY FILTER & BADGES
   ========================================== */
.admin-filter-select {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 0 14px;
    height: 38px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.admin-filter-select:focus, .admin-filter-select:hover {
    border-color: #3b82f6;
    background: #ffffff;
}

.admin-count-badge {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 13px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}