#loader 
{
    position: fixed;
    inset: 0;             
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;

    background: #fafafa;
    z-index: 9999;                  
    transition: opacity 0.5s ease, 
                visibility 0.5s ease;
}
    
#loader.hidden 
{
    opacity: 0;
    visibility: hidden;
}

.spinner 
{
    width: 60px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 6px solid transparent;  
    border-top-color: #0077ff; 
    border-bottom-color: #0077ff;     
    animation: spin 1.5s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.modal 
{
    position: fixed;
    display: block;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-pack: center;
    justify-content: center;
    margin: 0 auto;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow-x: hidden;
    background-color: rgba(31,32,41,.75);
    pointer-events: none;
    opacity: 0;
    transition: opacity 250ms 700ms ease;
}
    
/* Tampilkan ketika menjadi target */
.modal:target 
{
    z-index: 100;
    pointer-events: auto;
    opacity: 1;
    transition: all 300ms ease-in-out;
}

/* Kotak konten modal */
.modal-content {
        position: relative;
        display: block;
        width: 50%;
        margin: 0 auto;
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 12px;
        overflow: hidden;
        padding: 20px;
        background-color: #fff;
        -ms-flex-item-align: center;
        align-self: center;
        box-shadow: 0 12px 25px 0 rgba(199,175,189,.25);
        opacity: 0;
        transform: scale(0.6);
        transition: opacity 250ms 250ms ease, transform 300ms 250ms ease;
}

/* Efek animasi zoom-in */
.modal:target .modal-content {
    opacity: 1;
    transform: scale(1);
    transition: opacity 250ms 500ms ease, transform 350ms 500ms ease;
}

/* Tombol tutup (×) */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: #333333;
    text-decoration: none;
}

.modal-close:hover {
    color: #102770;
}

/* Responsif untuk layar kecil */
@media (max-width: 500px) {
    .modal-content {
        padding: 15px;
        width: calc(100% - 40px);
    }
}

.notif {
    display: none;
    margin-top: 10px;
    color: #d8000c;
}

input.error, select.error, textarea.error {
    border-color: #d8000c;
    background-color: #fff2f2;
}