/* ==========================================================
   HALAMAN PETA
========================================================== */

.map-page{
    width:100%;
    padding:20px;
    background:#f4f6f9;
    min-height:100vh;
}

/* ==========================================================
   HEADER
========================================================== */

.map-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    flex-wrap:wrap;
    gap:20px;
}

.map-header h2{
    margin:0;
    font-size:28px;
    font-weight:700;
    color:#212529;
}

.map-header p{
    margin-top:5px;
    color:#6c757d;
}

.header-info{
    display:flex;
    gap:15px;
}

.info-box{
    background:#ffffff;
    border-radius:15px;
    padding:15px 25px;
    min-width:140px;
    text-align:center;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.info-box small{
    color:#888;
    display:block;
}

.info-box h3{
    margin:6px 0 0;
    color:#dc3545;
    font-size:28px;
    font-weight:700;
}

/* ==========================================================
   BODY
========================================================== */

.map-body{
    display:flex;
    gap:20px;
}

/* ==========================================================
   SIDEBAR
========================================================== */

.map-sidebar{
    width:330px;
    flex-shrink:0;
}

.sidebar-card{
    background:#ffffff;
    border-radius:18px;
    padding:18px;
    margin-bottom:20px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

.card-title{
    font-size:18px;
    font-weight:700;
    margin-bottom:15px;
    color:#212529;
}

.sidebar-card label{
    font-weight:600;
    margin-bottom:8px;
}

/* ==========================================================
   LEGENDA
========================================================== */

.legend-item{
    display:flex;
    align-items:center;
    margin-bottom:12px;
}

.legend-color{
    width:18px;
    height:18px;
    border-radius:50%;
    margin-right:10px;
    border:2px solid #ffffff;
    box-shadow:0 0 4px rgba(0,0,0,.3);
}

.legend-text{
    flex:1;
    font-size:14px;
}

.legend-badge{
    background:#e9ecef;
    border-radius:50px;
    padding:4px 10px;
    font-size:12px;
    font-weight:700;
}

/* ==========================================================
   STATISTIK
========================================================== */

.statistik-card{
    text-align:center;
}

.statistik-icon{
    width:70px;
    height:70px;
    margin:auto;
    border-radius:50%;
    background:#dc3545;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    margin-bottom:15px;
}

.statistik-card h1{
    font-size:50px;
    margin-bottom:5px;
    color:#dc3545;
    font-weight:700;
}

.statistik-card p{
    margin-bottom:10px;
}

.statistik-card span{
    display:inline-block;
    background:#dc3545;
    color:#fff;
    padding:6px 18px;
    border-radius:50px;
}

/* ==========================================================
   INFO
========================================================== */

.map-info{
    padding-left:18px;
    margin:0;
}

.map-info li{
    margin-bottom:8px;
    font-size:14px;
}

/* ==========================================================
   MAP
========================================================== */

.map-content{
    flex:1;
}

.map-toolbar{
    background:#ffffff;
    border-radius:18px 18px 0 0;
    padding:15px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.toolbar-left{
    font-size:18px;
    font-weight:700;
}

.map-container{
    background:#ffffff;
    border-radius:0 0 18px 18px;
    overflow:hidden;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

#map{
    width:100%;
    height:820px;
}

/* ==========================================================
   POPUP
========================================================== */

.popup-bencana{
    width:320px;
}

.popup-image img{
    width:100%;
    height:180px;
    object-fit:cover;
    border-radius:10px;
}

.popup-header{
    margin:12px 0;
}

.popup-header h5{
    font-size:18px;
    margin-bottom:8px;
    font-weight:700;
}

.popup-header .badge{
    color:#fff;
    padding:6px 10px;
}

.popup-table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

.popup-table th{
    width:40%;
    padding:6px;
    background:#f8f9fa;
}

.popup-table td{
    padding:6px;
}

.popup-table th,
.popup-table td{
    border:1px solid #dee2e6;
}

.popup-deskripsi{
    margin-top:12px;
    font-size:13px;
    line-height:1.7;
}

/* ==========================================================
   LABEL KECAMATAN
========================================================== */

.label-kecamatan{
    background:rgba(255,255,255,.9);
    border:none;
    color:#000;
    font-size:12px;
    font-weight:700;
    padding:3px 8px;
    border-radius:20px;
    box-shadow:0 2px 8px rgba(0,0,0,.25);
}

/* ==========================================================
   LEAFLET
========================================================== */

.leaflet-popup-content-wrapper{
    border-radius:15px;
}

.leaflet-control-zoom{
    border:none !important;
    box-shadow:0 4px 15px rgba(0,0,0,.25);
}

.leaflet-bar a{
    width:36px;
    height:36px;
    line-height:36px;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:1200px){

    .map-body{
        flex-direction:column;
    }

    .map-sidebar{
        width:100%;
    }

    #map{
        height:650px;
    }

}

@media(max-width:768px){

    .map-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .header-info{
        width:100%;
    }

    .info-box{
        flex:1;
    }

    #map{
        height:550px;
    }

}

/* ===============================
   POPUP KECAMATAN
================================ */

.popup-kecamatan{

    width:320px;

}

.popup-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:15px;

}

.popup-header h5{

    margin:0;

    font-size:18px;

    font-weight:700;

}

.popup-total{

    width:70px;

    height:70px;

    border-radius:50%;

    background:#dc3545;

    color:#fff;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    font-weight:bold;

    font-size:20px;

}

.popup-total span{

    font-size:11px;

    font-weight:normal;

}

.popup-body{

    background:#fafafa;

    border-radius:10px;

    padding:10px;

}

.popup-body table{

    margin:0;

}

.popup-body th{

    font-size:13px;

    border-bottom:2px solid #dee2e6;

}

.popup-body td{

    vertical-align:middle;

    font-size:13px;

}

.popup-body .badge{

    min-width:35px;

}

.leaflet-popup-content{

    margin:18px !important;

    min-width:320px;

}

.leaflet-popup-content-wrapper{

    border-radius:16px;

    padding:5px;

}

.leaflet-popup-tip{

    background:#fff;

}

#printLayout{

    display:none;

}

.map-print{

    width:100%;

    border:1px solid #ddd;

}

.print-title{

    display:none;

}

.print-subtitle{

    color:#666;

    font-size:14px;

}

.legend-box{

    border:1px solid #ddd;

    padding:10px;

    border-radius:8px;

}

.info-box{

    border:1px solid #ddd;

    padding:10px;

    border-radius:8px;

}

.logo-print{

    width:70px;

}

.north-arrow{

    width:45px;

}

@media print{

.card-header{

    display:none !important;

}

.print-title{

    display:block;

    text-align:center;

    margin-bottom:15px;

}

}

/* ==========================================================
   PRINT LAYOUT
========================================================== */

@page{

    size:A4 landscape;

    margin:10mm;

}

.print-title{

    display:none;

}

@media print{

    html,
    body{

        width:100%;
        height:100%;
        background:#ffffff !important;

    }

    body{

        margin:0;
        padding:0;

    }

    .no-print{

        display:none !important;

    }

    .card-header{

        display:none !important;

    }

    .print-title{

        display:block;

        text-align:center;

        margin-bottom:15px;

        border-bottom:2px solid #000;

        padding-bottom:10px;

    }

    .print-title h2{

        margin:0;

        font-size:24px;

        font-weight:bold;

    }

    .print-title h4{

        margin-top:5px;

        font-size:16px;

        font-weight:500;

    }

    #printArea{

        width:100%;

        margin:0;

        padding:0;

        background:#fff;

    }

    .map-body{

        display:flex;

        align-items:flex-start;

        gap:15px;

    }

}

.map-sidebar{

    display:block !important;

    width:260px;

    min-width:260px;

    margin:0;

    padding:0;

}

.map-content{

    width:calc(100% - 260px);

}

#map{

    width:100% !important;

    height:650px !important;

    border:2px solid #000;

}


.sidebar-card{

    border:1px solid #000 !important;

    box-shadow:none !important;

    margin-bottom:10px;

    break-inside:avoid;

}

.map-container{

    border:none;

    box-shadow:none;

}

.footer-print{

    display:flex;

    justify-content:space-between;

    text-align:center;

    margin-top:10px;

}

.footer-print div{

    width:33%;

    font-size:12px;

}