@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    font-family:Segoe UI,sans-serif;
    background:#f4f6f9;
    margin:0;
    display:grid;
    place-items:center;
    min-height:100vh;
    padding:20px;
}

@media (max-width:768px){

    body{
        padding:15px;
    }

    .container{
        padding:20px;
    }

    .chart-box{
        width:100%;
        max-width:500px;
        height:350px;
        margin:auto;
    }

    h1{
        font-size:24px;
        margin-bottom:20px;
    }

}

.container{
    width:100%;
    max-width:700px;
    background:#fff;
    padding:30px;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,0,0,.1);
}

.login-card{
    background:#fff;
    padding:40px;
    border-radius:20px;
    box-shadow:0 20px 40px rgba(0,0,0,.15);
}

.logo{
    width:70px;
    height:70px;
    background:#2563eb;
    color:#fff;
    border-radius:16px;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:30px;
    margin:0 auto 20px;
}

.login-card h1{
    text-align:center;
    color:#0f172a;
    font-size:22px;
    margin-bottom:8px;
}

.login-card p{
    text-align:center;
    color:#64748b;
    margin-bottom:30px;
    font-size:14px;
}

.input-group{
    margin-bottom:15px;
}

.input-group label{
    display:block;
    margin-bottom:8px;
    color:#334155;
    font-size:14px;
    font-weight:500;
}

.input-group input{
    width:100%;
    padding:14px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    outline:none;
    transition:.3s;
}

.input-group input:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,.15);
}

.btn-login{
    width:100%;
    padding:14px;
    border:none;
    border-radius:12px;
    background:#2563eb;
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.btn-login:hover{
    background:#1d4ed8;
}

/* DASHBOARD/SUBMIT */

.container-dashboard,
.container-submit{
    width:90%;
    max-width:1300px;
    margin:auto;
    padding:20px 0;
}

.header{
    text-align:center;
    margin-bottom:50px;
}

.header h1{
    color:#2563eb;
    font-size:42px;
    margin-bottom:10px;
}

.header p{
    color:#a4abb4;
    font-size:15px;
}

.candidate-wrapper{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:30px;
}

.candidate-card{
    width:320px;
    background:#ffffff;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.15);
    transition:.3s;
    position:relative;
}

.candidate-card:hover{
    transform:translateY(-8px);
}

.number{
    position:absolute;
    top:15px;
    left:15px;
    width:55px;
    height:55px;
    border-radius:50%;
    background:#2563eb;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    font-weight:700;
}

.candidate-card img{
    width:100%;
    height:350px;
    object-fit:cover;
}

.candidate-card h3{
    text-align:center;
    padding:10px;
    color:#111827;
}

.visi-btn{
    width:90%;
    margin:0 auto 25px;
    display:block;
    border:none;
    border-radius:12px;
    background:#2563eb;
    color:#fff;
    padding:14px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:.3s;
}

.visi-btn:hover{
    background:#1c51c4;
}


/* NEXT/BACK BUTTON */

.next-page,
.back-page{
    position:fixed;
    bottom:30px;
    padding:15px 25px;
    background:#0f172a;
    color:#fff;
    text-decoration:none;
    border-radius:12px;
    font-weight:600;
    transition:.3s;
}

.next-page{
    right:30px;
}

.back-page{
    left:30px;
}

.next-page:hover{
    background:#334155;
}

.back-page:hover{
    background:#334155;
}


/* POPUP */

.popup-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.65);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
    padding:20px;
}

.popup-card{
    width:100%;
    max-width:650px;
    background:#fff;
    border-radius:25px;
    padding:35px;
    position:relative;
    animation:popupShow .3s ease;
}

@keyframes popupShow{

    from{
        opacity:0;
        transform:scale(.8);
    }

    to{
        opacity:1;
        transform:scale(1);
    }

}

.close-btn{
    position:absolute;
    top:15px;
    right:15px;
    width:38px;
    height:38px;
    border:none;
    border-radius:50%;
    background:#f1f5f9;
    cursor:pointer;
    font-size:18px;
    transition:.3s;
}

.close-btn:hover{
    background:#ef4444;
    color:#fff;
}

.popup-card h2{
    text-align:center;
    color:#111827;
    margin-bottom:20px;
}

.popup-section{
    margin-top:20px;
}

.popup-section h3{
    color:#2563eb;
    margin-bottom:10px;
}

.popup-section p{
    color:#4b5563;
    line-height:1.8;
    white-space:pre-line;
}


/* POPUP UNTUK KONFIRMASI */

.warning-icon{
    width:80px;
    height:80px;
    margin:0 auto 20px;
    border-radius:50%;
    background:#fef2f2;
    color:#dc2626;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:40px;
    font-weight:700;
}

.popup-title{
    text-align:center;
    color:#dc2626;
    font-size:18px;
    font-weight:700;
    margin-bottom:15px;
}

.popup-description{
    text-align:center;
    color:#6b7280;
    line-height:1.8;
    margin-bottom:25px;
}

.checkbox-container{
    display:flex;
    gap:10px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:15px;
    margin-bottom:25px;
}

.checkbox-container input{
    width:22px;
    height:22px;
    cursor:pointer;
}

.checkbox-container span{
    color:#374151;
    line-height:1.6;
}

.popup-buttons{
    display:flex;
    gap:15px;
}

.btn-cancel,
.btn-confirm{
    flex:1;
    padding:14px;
    border:none;
    border-radius:12px;
    font-weight:600;
    cursor:pointer;
}

.btn-cancel{
    background:#e5e7eb;
}

.btn-confirm{
    background:#16a34a;
    color:#fff;
}

.btn-confirm:disabled{
    background:#9ca3af;
    cursor:not-allowed;
}


/* UNTUK SUKSES VOTE */

.success-container{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
}

.success-card{
    background:#fff;
    max-width:500px;
    width:100%;
    padding:50px 40px;
    border-radius:25px;
    text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,.2);
}

.success-icon{
    width:120px;
    height:120px;
    margin:0 auto 25px;
    border-radius:50%;
    background:#22c55e;
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:60px;
    font-weight:700;
}

.success-card h1{
    color:#16a34a;
    margin-bottom:10px;
}

.success-card h3{
    color:#1f2937;
    margin-bottom:15px;
}

.success-card p{
    color:#6b7280;
    line-height:1.8;
}

.success-info{
    display:inline-block;
    margin-top:20px;

    background:#dcfce7;
    color:#15803d;

    padding:12px 25px;
    border-radius:50px;
    font-weight:600;
}


/* RESPONSIVE */

@media(max-width:768px){

    .header h1{
        font-size:30px;
    }

    .candidate-card{
        width:100%;
        max-width:350px;
    }

    .popup-buttons{
        flex-direction:column;
    }

    .next-page,
    .back-page{
        bottom:15px;
        padding:12px 18px;
    }

}

@media(max-width:480px){

    .login-card{
        padding:30px 25px;
    }

    .popup-card{
        padding:25px;
    }

    .success-card{
        padding:35px 25px;
    }

}


/* ERROR INPUT */

.error {
    border: 2px solid red !important;
}

.error-text {
    color: red;
    font-size: 13px;
    display: block;
    margin-top: 5px;
}


/* POPUP LOGIN GAGAL */

.popup1,
.popup2{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.popup1,
.popup2{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.75);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
    backdrop-filter:blur(5px);
}

.popup-card-custom{
    width:100%;
    max-width:520px;
    background:#ffffff;
    border-radius:25px;
    padding:70px 50px;
    text-align:center;
    box-shadow:
    0 25px 50px rgba(0,0,0,.25);
    animation:popupScale .35s ease;
}

@keyframes popupScale{

    0%{
        transform:scale(.7);
        opacity:0;
    }

    100%{
        transform:scale(1);
        opacity:1;
    }

}

.popup-icon{
    width:110px;
    height:110px;
    margin:0 auto 20px;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:55px;
    font-weight:700;
}

.error-icon{
    background:#fee2e2;
    color:#dc2626;
    border:5px solid #fecaca;
}

.success-icon{
    background:#dcfce7;
    color:#16a34a;
    border:5px solid #bbf7d0;
}

.popup-card-custom h2{
    color:#111827;
    margin-bottom:12px;
    font-size:28px;
}

.popup-card-custom p{
    color:#64748b;
    line-height:1.8;
    margin-bottom:25px;
}

.popup-btn{
    border:none;
    padding:14px 40px;
    border-radius:12px;
    color:#fff;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.popup-btn-error{
    background:#dc2626;
}

.popup-btn-error:hover{
    background:#b91c1c;
}

.popup-btn-success{
    background:#16a34a;
}

.popup-btn-success:hover{
    background:#15803d;
}