body.tracker-layout {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    font-family: Arial, sans-serif;
    color: #333;
    overflow: hidden;
}

/* --- Top Filter Bar --- */
#top-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.filter-input,
.custom-dropdown {
    border: 2px solid #66b2a0;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #444;
    background: white;
    cursor: pointer;
    width: auto;
}

#filter-country {
    min-width: 220px;
    width: auto;
}

.filter-input:focus {
    outline: none;
    border-color: #3b8273;
}

#btn-reset {
    background-color: #66b2a0;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    width: auto;
    margin: 0;
}

#btn-reset:hover {
    background-color: #3b8273;
}

/* Custom Checkbox Dropdowns */
.custom-dropdown {
    position: relative;
    padding: 0;
    width: 220px;
    user-select: none;
}

.dropdown-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: -2px;
    right: -2px;
    background: white;
    border: 2px solid #66b2a0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 2000;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-list label {
    display: block;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: normal;
}

.dropdown-list label:hover {
    background-color: #f0f7f5;
}

.dropdown-list input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #66b2a0;
}

/* --- Main Layout --- */
#main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#map-container {
    width: 50%;
    height: 100%;
    border-right: 4px solid #000;
}

#map {
    width: 100%;
    height: 100%;
    background-color: #e0eaf5;
}

#info-panel {
    width: 50%;
    height: 100%;
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto;
    background-color: #fff;
}

.hidden {
    display: none !important;
}

/* Scoped to info-panel so it doesn't break the portal's Top Nav layout */
#info-panel h1 {
    margin-top: 0;
    font-size: 28px;
}

#info-panel h2 {
    color: #555;
    font-weight: normal;
}

#subsidy-status-summary {
    font-size: 18px;
    margin-bottom: 30px;
}

#action-buttons {
    margin-top: 30px;
    text-align: center;
}

/* Scoped button so the 'Sign Out' button in Top Nav doesn't become 100% wide! */
#info-panel button {
    background-color: #333;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 10px;
}

#info-panel button:hover {
    background-color: #000;
}

.subsidy-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    border-left: 5px solid #66b2a0;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subsidy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.subsidy-card h3 {
    margin-top: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    font-size: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.subsidy-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f0f7f5;
    color: #66b2a0;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #66b2a0;
    margin-top: 15px;
    transition: all 0.2s;
}

.btn-link:hover {
    background-color: #66b2a0;
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}

th,
td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: #5ab1bb;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

.col-yes {
    background-color: #8bc34a;
    color: white;
    text-align: center;
    font-weight: bold;
}

.city-pin {
    background-color: #4caf50;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.city-pin:hover {
    transform: scale(1.7);
    cursor: pointer;
}

.city-pin.active {
    background-color: #0ffff3;
    border-color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    transform: scale(2);
    z-index: 1000 !important;
}

.city-pin.past {
    background-color: #ffeb3b !important;
    border-color: #999 !important;
}

.info.legend {
    pointer-events: none !important;
    transition: opacity 0.3s ease;
    opacity: 1;
}

@media (max-width: 800px) {
    body.tracker-layout {
        height: auto;
        overflow-y: auto;
    }

    #top-bar {
        flex-wrap: wrap;
        padding: 10px;
    }

    .filter-input,
    .custom-dropdown,
    #btn-reset {
        flex: 1 1 45%;
        width: auto;
    }

    #btn-reset {
        flex: 1 1 100%;
    }

    #main-content {
        flex-direction: column;
        overflow: visible;
        height: auto;
    }

    #map-container {
        width: 100%;
        height: 400px;
        min-height: 400px;
        border-right: none;
        border-bottom: 4px solid #000;
    }

    #info-panel {
        width: 100%;
        height: auto;
        overflow-y: visible;
        padding: 20px;
    }

    .subsidy-card {
        padding: 15px;
    }

    .subsidy-card h3 {
        font-size: 18px;
    }

    table th,
    table td {
        padding: 8px;
        font-size: 13px;
    }
}