.sng-cek-resi-container {
    max-width: 700px;
    margin: auto;
    font-family: Arial, sans-serif;
}

#sng_cek_resi_form {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
    border: 1px solid #eee;

    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sng-cek-resi-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sng-cek-resi-label {
    font-size: 13px;
    font-weight: bold;
    color: #374151;
}

#sng_cek_resi_form input {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    transition: .2s;
    box-sizing: border-box;
}

#sng_cek_resi_form input:focus {
    border-color: #0256b9;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

#sng_cek_resi_form input::placeholder {
    color: #9ca3af;
}

#sng_cek_resi_form_submitBtn {
    position: relative;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: #0256b9;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: .2s;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#sng_cek_resi_form_submitBtn:hover {
    background: #0256b9;
}

#sng_cek_resi_form_submitBtn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.sng-cek-resi-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: sng-cek-resi-spin .7s linear infinite;
}

#sng_cek_resi_form_submitBtn.loading .sng-cek-resi-btn-spinner {
    display: inline-block;
}

@keyframes sng-cek-resi-spin {
    to {
        transform: rotate(360deg);
    }
}

#sng_cek_resi_alert {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

#sng_cek_resi_result {
    display: block;
    margin-top: 18px;
}


.sng-cek-resi-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top: 2px solid #fff;
    border-radius: 50%;
    display: none;
    animation: sng-cek-resi-sng-spin 0.7s linear infinite;

    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
}

.sng-cek-resi-loading .sng-cek-resi-btn-text {
    visibility: hidden;
}

.sng-cek-resi-loading .sng-cek-resi-btn-spinner {
    display: block;
}

@keyframes sng-cek-resi-sng-spin {
    100% {
        transform: rotate(360deg);
    }
}

.sng-cek-resi-card {
    font-family: Arial, sans-serif;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
    border: 1px solid #eee;
}

.sng-cek-resi-table {
    width: 100%;
    border-collapse: collapse;
}

.sng-cek-resi-table th {
    background: #0256b9;
    color: #fff;
    text-align: left;
    padding: 14px 16px;
    font-size: 16px;
}

.sng-cek-resi-table td {
    padding: 2px 10px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
    vertical-align: top;
}

.sng-cek-resi-label {
    white-space: nowrap;
    color: #6b7280;
    width: 1%;
}

.sng-cek-resi-value {
    color: #111827;
    font-weight: 500;
}

.sng-cek-resi-status-badge {
    display: inline-block;
    background: #dbeafe;
    color: #0256b9;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.sng-cek-resi-history {
    margin-top: 18px;
}

.sng-cek-resi-history-row td {
    padding: 2px 10px;
    border-bottom: 1px solid #eee;
}

.sng-cek-resi-pickup {
    font-size: 15px;
    color: #111827;
    margin-bottom: 4px;
}

.sng-cek-resi-location {
    color: #6b7280;
    font-size: 12px;
}

.sng-cek-resi-date {
    font-size: 14px;
    color: #111827;
    text-align: right;
}

.sng-cek-resi-history-status {
    font-size: 12px;
    color: #0256b9;
    text-align: right;
}

/* history row layout: left = pickup+location, right = date+status */
.sng-cek-resi-history-row-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.sng-cek-resi-left {
    flex: 1 1 auto;
}

.sng-cek-resi-right {
    flex: 0 0 160px;
    text-align: right;
}

@media(max-width:600px) {
    .sng-cek-resi-history-row-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .sng-cek-resi-right {
        text-align: left;
        margin-top: 0px;
        flex: none;
    }
}


.sng-cek-resi-image-wrap {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 8px;
    gap: 8px;
}

.sng-cek-resi-image {
    width: 80px;
    height: 80px;
    margin: 1px 0;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.sng-cek-resi-image-popup {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .85);
    z-index: 99999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;
}

.sng-cek-resi-image-popup.active {
    display: flex !important;
}

.sng-cek-resi-image-popup-content {
    position: relative;

    width: fit-content;
    height: fit-content;

    max-width: 95vw;
    max-height: 90vh;
}

.sng-cek-resi-image-popup-img {
    display: block;

    width: auto;
    height: auto;

    max-width: 95vw;
    max-height: 90vh;

    object-fit: contain;
    border-radius: 10px;
    margin: auto;
}

.sng-cek-resi-image-popup-close {
    position: fixed;
    top: 20px;
    right: 20px;

    width: 40px;
    height: 40px;

    background: #fff;
    color: #000;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
    cursor: pointer;
    z-index: 100000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    transition: all .2s;
}

.sng-cek-resi-image-popup-close:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}



@media(max-width:600px) {
    #sng_cek_resi_form {
        padding: 16px;
    }

    .sng-cek-resi-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .sng-cek-resi-history-row td {
        display: block;
        width: 100%;
    }

    .sng-cek-resi-date,
    .sng-cek-resi-history-status {
        text-align: left;
    }

    .sng-cek-resi-image-popup-img {
        max-width: 100%;
        max-height: 75vh;
    }

}