body, html {
            height: 100%;
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
        }
        .top {
            height: 50%;
            background-color: #f0f0f0;
        }
        .bottom {
            height: 40%;
            background-color: #fff;
            overflow-y: scroll;
            padding: 0px;
        }
        #map {
            width: 100%;
            height: 100%;
        }
        table {
            width: 100%;
            border-collapse: collapse;
        }
        th, td {
            padding: 5px;
            border: 1px solid #D70040;
            text-align: center;
        }
        .selected {
            background-color: #ddd;
        }
        
        thead {
            font-size: 14px;
            background-color: #D70040;
            color: #fff
        }
        tbody {
            font-size: 13px;
            color: #D70040;
        }                      
        
        /* Side Panel Styles */
        .side-panel {
            position: fixed;
            top: 0;
            right: -300px;
            width: 300px;
            height: 100%;
            background-color: white;
            box-shadow: -2px 0 5px rgba(0,0,0,0.2);
            transition: right 0.3s ease;
            z-index: 1001;
            padding: 20px;
            box-sizing: border-box;
            overflow-y: auto;
        }
        .side-panel.active {
            right: 0;
        }
        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }
        .close-panel {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #D70040;
        }
        .panel-content a {
            display: block;
            padding: 10px;
            margin: 5px 0;
            background-color: #f5f5f5;
            color: #333;
            text-decoration: none;
            border-radius: 4px;
            transition: background-color 0.2s;
        }
        .panel-content a:hover {
            background-color: #e0e0e0;
        }
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            z-index: 1000;
            display: none;
        }
        
        /* تعديلات لعناصر Leaflet */
        .leaflet-top, .leaflet-bottom {
            z-index: 999 !important;
        }
        .leaflet-control-attribution {
            background-color: rgba(255,255,255,0.9) !important;
            padding: 2px 5px !important;
            font-size: 11px !important;
        }
.marker-cluster div {
    border-radius: 50%;
    text-align: center;
    border: 2px solid #fff;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تلوين خانات التاريخ وMagnitude فقط */
.Mag-green { color: #00A000; }
.Mag-blue  { color: #0064FF; }
.Mag-red   { color: #D70000; }

/* إبقاء خلفية الصفوف بيضاء */
#locationsTable tbody tr { background-color: #fff; }

/* تمييز الصف المختار عند الضغط على Zoom */
#locationsTable tr.selected {
    background-color: #f0f8ff; /* لون أزرق فاتح */
    transition: background-color 0.2s ease;
}
/* ================= GLOBAL FIX ================= */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ================= HEADER ================= */

header {
    height: 70px;
    background-color: #D70040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    z-index: 1100;
}

/* ================= PAGE LAYOUT ================= */

.page-wrapper {
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ================= MAP ================= */

.top {
    flex: 1 1 auto;
    min-height: 300px;
}

#map {
    width: 100%;
    height: 100%;
}

/* ================= TABLE ================= */

.bottom {
    flex: 0 0 35%;
    max-height: 35%;
    overflow-y: auto;
    background: #fff;
    border-top: 2px solid #D70040;
}

/* ================= TABLE STYLING ================= */

#locationsTable {
    width: 100%;
    border-collapse: collapse;
}

    #locationsTable th,
    #locationsTable td {
        padding: 5px;
        border: 1px solid #D70040;
        text-align: center;
    }

    #locationsTable thead {
        background-color: #D70040;
        color: #fff;
        font-size: 14px;
    }

    #locationsTable tbody {
        font-size: 13px;
        color: #D70040;
    }

    #locationsTable tr.selected {
        background-color: #f0f8ff;
    }

/* ================= LEAFLET FIXES ================= */

.leaflet-container {
    height: 100% !important;
}

.leaflet-top,
.leaflet-bottom {
    z-index: 900 !important;
}
