/* Reset */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

#map {
    width: 100%;
    height: 100vh;
}

/* Hover Grid Label */
.grid-label {
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: #1b5e20;
    border: 1px solid rgba(0,0,0,0.2);
}

/* Back Button */
.back-home-btn {
    position: absolute;
    top: 10px;
    left: 60px;
    z-index: 1000;
    background: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2e4e2e;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.back-home-btn:hover {
    background: #1b5e20;
    color: white;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-content input {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.modal-content button {
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

#confirmPayBtn {
    background: #1b5e20;
    color: white;
}

.cancel-btn {
    background: #ccc;
}

.grid-card{
    text-align:center;
    padding:10px;
}

.grid-photo{
    width:100px;
    height:100px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid #2E7D32;
}

.badge-allotted{
    background:#2E7D32;
    color:white;
    padding:5px 12px;
    border-radius:20px;
}

/* ===========================
   Plantation Popup Card
=========================== */

.plantation-popup .leaflet-popup-content{
    margin:0;
}

.plantation-popup .leaflet-popup-content-wrapper{
    padding:0;
    border-radius:18px;
    overflow:hidden;
}

.plantation-popup .leaflet-popup-tip{
    background:#fff;
}

.plantation-card{
    width:280px;
    background:#fff;
    border-radius:18px;
    overflow:hidden;
}

.plantation-image{
    width:100%;
    height:140px;
    overflow:hidden;
}

.plantation-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.plantation-body{
    padding:14px;
}

.plantation-body h3{
    margin:0;
    color:#1B5E20;
    font-size:18px;
    font-weight:700;
}

.plantation-badge{
    display:inline-block;
    margin-top:8px;
    padding:4px 10px;
    border-radius:18px;
    background:#E8F5E9;
    color:#2E7D32;
    font-size:12px;
    font-weight:600;
}

.plantation-table{
    width:100%;
    margin-top:18px;
    border-collapse:collapse;
}

.plantation-table td{
    padding:6px 0;
    border-bottom:1px solid #EEEEEE;
    font-size:13px;
}


/* =======================================
   GRID ENQUIRY POPUP
======================================= */

.grid-enquiry-popup{
    width:280px;
    padding:16px;
    font-family:inherit;
}

.grid-enquiry-popup h3{
    margin:0 0 12px;
    text-align:center;
    font-size:18px;
    color:#1B5E20;
}

.grid-number{
    text-align:center;
    margin-bottom:14px;
    font-size:15px;
    font-weight:700;
    color:#444;
}

.grid-input{

    width:100%;

    padding:11px 12px;

    margin-bottom:10px;

    border:1px solid #dcdcdc;

    border-radius:8px;

    outline:none;

    font-size:14px;

    transition:.3s;
}

.grid-input:focus{

    border-color:#2E7D32;

    box-shadow:0 0 0 3px rgba(46,125,50,.15);

}

.grid-submit-btn{

    width:100%;

    background:#2E7D32;

    color:#fff;

    border:none;

    padding:12px;

    border-radius:8px;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.3s;
}

.grid-submit-btn:hover{

    background:#1B5E20;

}

.grid-submit-btn:disabled{

    opacity:.7;

    cursor:not-allowed;

}

.leaflet-popup-content-wrapper{

    border-radius:16px;

}

/* ===========================
   TOAST MESSAGE
=========================== */

#toast{
    position: fixed;
    top: 25px;
    right: 25px;
    background: #2E7D32;
    color: #fff;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-20px);

    transition: all .35s ease;

    z-index: 99999;

    max-width: 360px;
    line-height: 1.5;
}

#toast.show{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#toast.error{
    background:#d32f2f;
}