/* PAGE LAYOUT */
.scannerPage{
padding:20px;
background:#f5f6fa;
margin-left:240px;
margin-top:50px;
}

.scannerPage h2{
margin:0;
font-size:22px;
}

.subtitle{
font-size:13px;
color:#6b7280;
margin-bottom:15px;
}


/* ================= SELECT EVENT CARD ================= */
.selectCard{
background:white;
border:1px solid #e5e7eb;
border-radius:12px;
padding:18px;
margin-bottom:15px;
}

.selectCard label{
font-weight:600;
font-size:14px;
}

.sub{
font-size:12px;
color:#6b7280;
margin:4px 0 10px 0;
}

.eventSelect{
width:100%;
padding:10px;
border:1px solid #e5e7eb;
border-radius:8px;
background:#f9fafb;
font-size:13px;
}


/* ================= GRID LAYOUT ================= */
.scannerGrid{
display:grid;
grid-template-columns:1fr 1fr;
gap:15px;
align-items:stretch;
}


/* ================= CARD BASE ================= */
.scannerCard,
.resultCard{
background:white;
border:1px solid #e5e7eb;
border-radius:12px;
padding:18px;
display:flex;
flex-direction:column;
min-height:420px;
}

.scannerCard h4,
.resultCard h4{
margin:0;
font-size:15px;
}
/* ================= CAMERA BOX ================= */
.cameraBox{
    margin-top:15px;
    height:300px;
    border:2px dashed #d1d5db;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    background:#f9fafb;
    overflow:hidden;
    padding:10px;
    gap:10px;
    position:relative;
}


/* ================= READER WRAPPER ================= */
#reader{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    overflow:hidden;
}


/* ================= CAMERA VIDEO ================= */
#reader video{
    width:100% !important;
    height:100% !important;
    object-fit:cover;
    border-radius:8px;
    display:block;
}


/* ================= QR CANVAS (SCAN OVERLAY) ================= */
#reader canvas{
    position:absolute;
    inset:0;
    width:100% !important;
    height:100% !important;
    object-fit:contain;
    border-radius:8px;
}


/* ================= UPLOADED IMAGE ================= */
#reader img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    display:block;
    margin:auto;
    border-radius:8px;
}


/* ================= EMPTY / RESET STATE ================= */
.cameraBox.empty #reader{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#9ca3af;
    font-size:13px;
}

/* ================= SCAN BUTTON ================= */
.scanBtn{
width:100%;
background:#4b2e83;
color:white;
border:none;
padding:10px;
border-radius:8px;
cursor:pointer;
font-size:13px;
margin-top:10px;
}

.scanBtn:hover{
background:#3b2468;
}


/* ================= BROWSE IMAGE ================= */
.uploadBox{
width:100%;
margin-top:8px;
}

.uploadBox input{
width:100%;
padding:8px;
border:1px solid #e5e7eb;
border-radius:8px;
background:white;
}


/* ================= MANUAL INPUT ================= */
.manualBox{
margin-top:15px;
border-top:1px solid #eee;
padding-top:15px;
}

.manualRow{
display:flex;
gap:8px;
}

.manualRow input{
flex:1;
padding:9px;
border-radius:8px;
border:1px solid #e5e7eb;
font-size:13px;
}

.manualRow button{
background:#111827;
color:white;
border:none;
padding:9px 14px;
border-radius:8px;
cursor:pointer;
font-size:13px;
}


/* ================= RESULT CARD ================= */
#scanResult{
flex:1;
display:flex;
align-items:flex-start;   /* remove big white space center */
justify-content:flex-start;
width:100%;
}


/* EMPTY RESULT */
.emptyResult{
width:100%;
height:100%;
display:flex;
align-items:center;
justify-content:center;
color:#9ca3af;
font-size:13px;
}


/* ================= SUCCESS ================= */
.scanSuccess{
width:100%;
background:#f0fdf4;
border:1px solid #bbf7d0;
border-radius:12px;
padding:14px;
animation:flashGreen .3s ease;
box-shadow:0 0 0 3px rgba(34,197,94,0.08);
}


/* ================= ERROR ================= */
.scanError{
width:100%;
background:#fff1f2;
border:1px solid #fecaca;
border-radius:12px;
padding:14px;
animation:flashRed .3s ease;
box-shadow:0 0 0 3px rgba(239,68,68,0.08);
}


/* ================= STATUS BADGE ================= */
.status{
display:flex;
align-items:center;
gap:8px;
font-weight:700;
font-size:14px;
margin-bottom:12px;
}

.status.success{
color:#16a34a;
}

.status.invalid{
color:#dc2626;
}


/* ================= RESULT INFO GRID ================= */
.infoGrid{
display:flex;
flex-direction:column;
gap:6px;
}


/* each row */
.userRow{
display:flex;
justify-content:space-between;
align-items:center;
font-size:13px;
padding:6px 0;
border-bottom:1px dashed #eee;
}

.userRow:last-child{
border-bottom:none;
}

.userRow span{
color:#6b7280;
}

.userRow b{
color:#111827;
}


/* ================= NAME BIG ================= */
.userRow.name{
font-size:16px;
font-weight:600;
border-bottom:1px solid #eee;
padding-bottom:8px;
}


/* ================= ERROR MESSAGE ================= */
.errorMsg{
margin-top:8px;
font-size:13px;
font-weight:600;
color:#dc2626;
}


/* ================= ANIMATION ================= */
@keyframes flashGreen{
0%{transform:scale(.96);opacity:.6}
100%{transform:scale(1);opacity:1}
}

@keyframes flashRed{
0%{transform:scale(.96);opacity:.6}
100%{transform:scale(1);opacity:1}
}