/*
=========================================
CHECK IN PAGE
=========================================
*/

body{

    font-family:'Poppins',sans-serif;

    background:#F5F7FB;

    min-height:100vh;

}   
/*
=========================================
CHECK IN PAGE
=========================================
*/

.checkin-page{

    padding:60px 0 70px;

}

.back-button{

    display:inline-flex;

    align-items:center;

    gap:10px;

    text-decoration:none;

    color:var(--primary);

    font-weight:600;

    margin-top:6px;

    margin-bottom:20px;

}

.page-header{

    margin-bottom:24px;

}

.page-header h1{

    font-size:42px;

    font-weight:700;

    margin-bottom:10px;

}

.page-header p{

    color:var(--gray);

    font-size:17px;

}

.checkin-card{

    background:#fff;

    border-radius:20px;

    padding:40px;

    box-shadow:0 10px 30px rgba(0,0,0,.08);

}

.form-label{

    font-weight:600;

}

.form-control{

    height:56px;

    border-radius:12px;

}

.form-control:focus{

    box-shadow:none;

    border-color:var(--primary);

}
.form-select{

    height:56px;

    border-radius:12px;

}

.form-select:focus{

    box-shadow:none;

    border-color:var(--primary);

}
.photo-preview {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #0f172a;

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

.photo-preview i{

    font-size:70px;

    margin-bottom:15px;

}

.photo-preview p{

    margin:0;

    font-weight:500;

}

.alert{

    border-radius:14px;

}

#previousDataAlert{

    display:flex;

}

.previous-photo-hint{

    display:flex;

    align-items:center;

    gap:10px;

    margin-top:12px;

    padding:8px 12px;

    background:var(--bg-surface-2);

    border:1px solid var(--border-color);

    border-radius:12px;

    font-size:13px;

    color:var(--text-muted);

}

.previous-photo-hint img{

    width:36px;

    height:36px;

    object-fit:cover;

    border-radius:8px;

    flex-shrink:0;

}

.btn-primary{

    height:56px;

    border-radius:14px;

    font-weight:600;

}

.btn-outline-primary{

    border-radius:12px;

}
.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: 14px;
}
.photo-preview{

    overflow:hidden;

}

.btn-primary:disabled{

    opacity:.6;

    cursor:not-allowed;

}
/* ===========================
   MODAL
=========================== */

.modal-content{

    border-radius:20px;

    border:none;

}

.modal-title{

    font-weight:600;

}

.modal-body{

    font-size:16px;

}

.modal-footer{

    border-top:none;

}
#cameraStream,
#loginCameraStream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scaleX(-1);
}
#previewImage,
#loginPreviewImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
/* ==========================
   CAMERA RESPONSIVE
========================== */

@media (max-width: 576px) {

    .photo-preview {
        width: 100%;
        max-width: 360px;
        aspect-ratio: 3 / 4;
    }

    .preview-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

}
.photo-preview {
    position: relative;
}

#photoPlaceholder,
#loginPhotoPlaceholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#photoPlaceholder i,
#loginPhotoPlaceholder i {
    font-size: 70px;
    margin-bottom: 15px;
    line-height: 1;
}

#photoPlaceholder p,
#loginPhotoPlaceholder p {
    margin: 0;
}
/*
==========================================
RESPONSIVE
==========================================
*/

@media (max-width:991px){

    .checkin-card{

        padding:30px;

    }

}

@media (max-width:768px){

    .checkin-page{

        padding:80px 0 50px;

    }

    .page-header{

        text-align:center;

    }

    .page-header h1{

        font-size:34px;

    }

    .page-header p{

        font-size:16px;

    }

    .checkin-card{

        padding:25px;

    }

}

@media (max-width:576px){

    .checkin-page{

        padding:70px 0 40px;

    }

    .page-header h1{

        font-size:28px;

    }

    .checkin-card{

        padding:18px;

        border-radius:16px;

    }

    .previous-photo-hint{

        font-size:12px;

    }

}

/*
==========================================
COMPACT SPACING (Register & Login)
Biar form lebih rapat, user cuma scroll buat ke bagian foto
==========================================
*/

.checkin-page{

    padding:40px 0 40px;

}

.back-button{

    margin-top:0;

    margin-bottom:10px;

}

.page-header{

    margin-bottom:16px;

}

.page-header h1{

    font-size:34px;

    margin-bottom:4px;

}

.page-header p{

    font-size:15px;

    margin-bottom:0;

}

.checkin-card{

    padding:24px 28px;

}

.field-group{

    margin-bottom:14px;

}

.checkin-card .form-label{

    font-size:14px;

    margin-bottom:5px;

}

.form-control,
.form-select{

    height:46px;

    font-size:15px;

}

.checkin-card small.text-muted{

    font-size:12px;

    margin-top:4px !important;

}

.checkin-card .alert{

    padding:10px 14px;

    font-size:13.5px;

    margin-bottom:14px;

}

.btn-primary{

    height:48px;

}

.photo-preview{

    max-width:380px;

}

@media (max-width:768px){

    .checkin-page{

        padding:56px 0 30px;

    }

    .page-header h1{

        font-size:28px;

    }

    .checkin-card{

        padding:18px 16px;

    }

}

/*
==========================================
BACKGROUND (Check In: pilihan, Register, Login)
Gradasi mengikuti tema, sama seperti hero halaman utama
==========================================
*/

.checkin-page{

    min-height:100vh;

    background:linear-gradient(135deg, var(--bg-body), var(--bg-surface-2));

}

.checkin-page .page-header h1{

    color:var(--text-main);

}

.checkin-page .page-header p{

    color:var(--text-muted);

}

/*
==========================================
VISITOR LOGIN - 2 LANGKAH + ID VISITOR
==========================================
*/

.login-alert{

    display:flex;

    align-items:flex-start;

}

/* ---------- Indikator langkah ---------- */

.login-stepper{

    display:flex;

    align-items:center;

    gap:12px;

    list-style:none;

    margin:0 0 20px;

    padding:0;

}

.login-stepper-item{

    display:flex;

    align-items:center;

    gap:8px;

    color:var(--text-muted);

    font-size:13.5px;

    font-weight:500;

    white-space:nowrap;

    transition:color var(--ui-base, .24s) ease;

}

.login-stepper-dot{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    width:28px;

    height:28px;

    border-radius:50%;

    border:2px solid var(--border-color);

    background:var(--bg-surface);

    font-size:13px;

    font-weight:600;

    line-height:1;

    transition:
        background-color var(--ui-base, .24s) ease,
        border-color var(--ui-base, .24s) ease,
        color var(--ui-base, .24s) ease;

}

.login-stepper-dot .dot-check{

    display:none;

    font-size:14px;

}

.login-stepper-item.is-active{

    color:var(--text-main);

}

.login-stepper-item.is-active .login-stepper-dot{

    border-color:var(--secondary);

    color:var(--secondary);

}

.login-stepper-item.is-done{

    color:var(--text-main);

}

.login-stepper-item.is-done .login-stepper-dot{

    background:var(--secondary);

    border-color:var(--secondary);

    color:#FFFFFF;

}

.login-stepper-item.is-done .dot-num{

    display:none;

}

.login-stepper-item.is-done .dot-check{

    display:inline;

}

.login-stepper-line{

    position:relative;

    flex:1;

    height:2px;

    border-radius:2px;

    background:var(--border-color);

    overflow:hidden;

}

.login-stepper-line::after{

    content:"";

    position:absolute;

    inset:0;

    background:var(--secondary);

    transform:scaleX(0);

    transform-origin:left;

    transition:transform var(--ui-slow, .36s) var(--ui-ease, ease);

}

.login-stepper-line.is-complete::after{

    transform:scaleX(1);

}

/* ---------- Input ID Visitor (5 digit) ---------- */

.visitor-id-input{

    font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    font-size:22px;

    font-weight:600;

    letter-spacing:.5em;

    text-align:center;

    padding-left:calc(.75rem + .5em);

}

.visitor-id-input::placeholder{

    font-weight:400;

    opacity:.45;

}

.id-meter{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:12px;

    margin-top:4px;

}

.id-meter small{

    font-size:12px;

}

.id-count{

    flex-shrink:0;

    font-variant-numeric:tabular-nums;

    font-weight:600;

    color:var(--text-muted);

    transition:color var(--ui-fast, .16s) ease;

}

.id-count.is-complete{

    color:#16A34A;

}

/* field ditandai merah tanpa teks bantuan
   (pesan ditampilkan di alert di atas) */
.form-control.is-invalid.field-flag ~ .invalid-feedback{

    display:none;

}

@media (max-width:576px){

    .login-stepper{

        gap:8px;

    }

    .login-stepper-item{

        font-size:12.5px;

    }

    .visitor-id-input{

        font-size:20px;

        letter-spacing:.4em;

    }

}
