/* ==========================================================
   OVSE OFFLINE AADHAAR VERIFICATION SYSTEM
   Professional Government Kiosk UI
   Author : ChatGPT
==========================================================*/

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{

    --primary:#0b5ed7;
    --primary-dark:#084298;

    --secondary:#198754;

    --danger:#dc3545;

    --warning:#ffc107;

    --light:#f8f9fa;

    --white:#ffffff;

    --dark:#1d3557;

    --text:#2b2b2b;

    --border:#d9d9d9;

    --shadow:0 8px 25px rgba(0,0,0,.15);

}

body{

    font-family:'Poppins',sans-serif;

    background:#edf2f7;

    color:var(--text);

    overflow-x:hidden;

}

/* ================= HEADER ================= */

.top-header{

    background:linear-gradient(90deg,#0b5ed7,#084298);

    color:#fff;

    padding:15px 30px;

    box-shadow:0 5px 15px rgba(0,0,0,.25);

}

.logo-box{

    width:70px;

    height:70px;

    border-radius:50%;

    background:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    box-shadow:0 3px 10px rgba(0,0,0,.2);

}

.logo-icon{

    font-size:40px;

    color:#0b5ed7;

}

.main-title{

    margin:0;

    font-weight:700;

    letter-spacing:1px;

    font-size:30px;

}

.sub-title{

    margin-top:5px;

    font-size:15px;

    opacity:.95;

}

#clock{

    font-size:22px;

    font-weight:600;

    background:#fff;

    color:#0b5ed7;

    padding:10px 18px;

    border-radius:8px;

    display:inline-block;

    min-width:140px;

    text-align:center;

}

/* ================= CONTAINER ================= */

.container-fluid{

    padding-left:25px;

    padding-right:25px;

}

.row{

    margin-top:5px;

}

/* ================= COMMON CARDS ================= */

.camera-card,
.status-card,
.message-card,
.result-card{

    background:#fff;

    border-radius:15px;

    overflow:hidden;

    box-shadow:var(--shadow);

    margin-bottom:20px;

}

.card-header-custom{

    background:#0b5ed7;

    color:#fff;

    padding:14px 20px;

    font-size:20px;

    font-weight:600;

}

.card-header-custom i{

    margin-right:8px;

}

.camera-body{

    padding:20px;

}

.status-body{

    padding:15px;

}

.message-body{

    padding:25px;

}

.result-body{

    padding:20px;

}


/* ==========================================================
   CAMERA SECTION
==========================================================*/

.camera-body{

    display:flex;

    justify-content:center;

    align-items:center;

    background:#f8fbff;

    min-height:650px;

}

/* Scanner Frame */

.scanner-frame{

    position:relative;

    width:100%;

    max-width:760px;

    aspect-ratio:4/3;

    border-radius:18px;

    overflow:hidden;

    background:#000;

    border:8px solid #0b5ed7;

    box-shadow:
        0 0 0 4px #ffffff,
        0 0 35px rgba(11,94,215,.35);

}

/* Live Camera */

#video{

    width:100%;

    height:100%;

    object-fit:cover;

    display:block;

    background:#111;

}

/* Hidden Canvas */

#canvas{

    display:none;

}

/* ==========================================================
   CORNER MARKERS
==========================================================*/

.scanner-frame::before,
.scanner-frame::after{

    content:"";

    position:absolute;

    width:60px;

    height:60px;

    border-color:#00ff7f;

    z-index:15;

}

.scanner-frame::before{

    top:18px;

    left:18px;

    border-top:6px solid #00ff7f;
    border-left:6px solid #00ff7f;

}

.scanner-frame::after{

    bottom:18px;

    right:18px;

    border-bottom:6px solid #00ff7f;
    border-right:6px solid #00ff7f;

}

/* Extra Corners */

.corner{

    position:absolute;

    width:60px;

    height:60px;

    border-color:#00ff7f;

    z-index:15;

}

.corner-top-right{

    top:18px;

    right:18px;

    border-top:6px solid #00ff7f;
    border-right:6px solid #00ff7f;

}

.corner-bottom-left{

    bottom:18px;

    left:18px;

    border-bottom:6px solid #00ff7f;
    border-left:6px solid #00ff7f;

}

/* ==========================================================
   SCANNING LINE
==========================================================*/

.scan-line{

    position:absolute;

    left:0;

    width:100%;

    height:5px;

    background:linear-gradient(
        90deg,
        transparent,
        #00ff00,
        #00ff00,
        transparent
    );

    box-shadow:
        0 0 12px #00ff00,
        0 0 22px #00ff00;

    animation:scanMove 2.2s linear infinite;

    z-index:20;

}

@keyframes scanMove{

    0%{

        top:8%;

    }

    50%{

        top:88%;

    }

    100%{

        top:8%;

    }

}

/* ==========================================================
   CAMERA GLOW
==========================================================*/

.scanner-frame{

    animation:cameraGlow 2.5s infinite alternate;

}

@keyframes cameraGlow{

    from{

        box-shadow:
        0 0 0 4px #ffffff,
        0 0 15px rgba(11,94,215,.20);

    }

    to{

        box-shadow:
        0 0 0 4px #ffffff,
        0 0 40px rgba(11,94,215,.55);

    }

}

/* ==========================================================
   QR TARGET AREA
==========================================================*/

.qr-target{

    position:absolute;

    width:260px;

    height:260px;

    left:50%;

    top:50%;

    transform:translate(-50%,-50%);

    border:3px dashed rgba(255,255,255,.7);

    border-radius:18px;

    z-index:12;

    animation:targetPulse 1.8s infinite;

}

@keyframes targetPulse{

    0%{

        transform:translate(-50%,-50%) scale(1);

        opacity:1;

    }

    50%{

        transform:translate(-50%,-50%) scale(1.03);

        opacity:.65;

    }

    100%{

        transform:translate(-50%,-50%) scale(1);

        opacity:1;

    }

}

/* ==========================================================
   CAMERA MESSAGE
==========================================================*/

.camera-message{

    position:absolute;

    bottom:25px;

    left:50%;

    transform:translateX(-50%);

    background:rgba(0,0,0,.65);

    color:#fff;

    padding:10px 22px;

    border-radius:30px;

    font-size:17px;

    font-weight:600;

    z-index:25;

    backdrop-filter:blur(5px);

}

/* ==========================================================
   PROCESSING EFFECT
==========================================================*/

.processing-camera{

    filter:blur(3px) brightness(.55);

    transition:.4s;

}

/* ==========================================================
   STATUS PANEL
==========================================================*/

.status-body{

    padding:20px;

}

.status-item{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:14px 0;

    border-bottom:1px solid #ececec;

    font-size:17px;

    font-weight:500;

}

.status-item:last-child{

    border-bottom:none;

}

.status-item span:first-child{

    color:#2c3e50;

}

.status-item i{

    margin-right:8px;

    color:#0b5ed7;

    font-size:18px;

}

.badge{

    font-size:14px;

    padding:8px 14px;

    border-radius:30px;

    min-width:90px;

}

/* ==========================================================
   LIVE STATUS DOT
==========================================================*/

.status-online{

    display:inline-block;

    width:10px;

    height:10px;

    background:#28a745;

    border-radius:50%;

    margin-right:6px;

    animation:statusBlink 1.2s infinite;

}

.status-offline{

    display:inline-block;

    width:10px;

    height:10px;

    background:#dc3545;

    border-radius:50%;

    margin-right:6px;

}

@keyframes statusBlink{

    0%{

        opacity:1;

    }

    50%{

        opacity:.25;

    }

    100%{

        opacity:1;

    }

}

/* ==========================================================
   MESSAGE PANEL
==========================================================*/

.message-body{

    min-height:140px;

    display:flex;

    justify-content:center;

    align-items:center;

    text-align:center;

}

#status{

    font-size:22px;

    color:#0b5ed7;

    font-weight:600;

    line-height:34px;

}

/* ==========================================================
   RESULT CARD
==========================================================*/

.result-card{

    border:3px solid #198754;

    display:none;

}

.result-card.show{

    display:block;

    animation:fadeInResult .45s ease;

}

@keyframes fadeInResult{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================================================
   RESIDENT PHOTO
==========================================================*/

.resident-photo{

    width:150px;

    height:180px;

    border-radius:12px;

    border:4px solid #198754;

    object-fit:cover;

    background:#f8f8f8;

    padding:6px;

    box-shadow:0 8px 20px rgba(0,0,0,.15);

}

/* ==========================================================
   RESULT TABLE
==========================================================*/

.result-body table{

    margin-top:25px;

    font-size:16px;

}

.result-body table th{

    width:130px;

    background:#eef5ff;

    color:#0b5ed7;

    font-weight:600;

    vertical-align:middle;

}

.result-body table td{

    vertical-align:middle;

    word-break:break-word;

}

/* ==========================================================
   VERIFIED BADGE
==========================================================*/

#residentStatus{

    font-size:15px;

    padding:8px 18px;

}

/* ==========================================================
   QR VALUE
==========================================================*/

#residentQR{

    font-family:monospace;

    color:#0b5ed7;

    font-size:14px;

}

/* ==========================================================
   COUNTDOWN
==========================================================*/

.countdown{

    margin-top:20px;

    text-align:center;

    font-size:20px;

    font-weight:600;

    color:#dc3545;

}

#countdown{

    display:inline-block;

    width:42px;

    height:42px;

    line-height:42px;

    background:#dc3545;

    color:#fff;

    border-radius:50%;

    margin-left:8px;

    margin-right:8px;

    font-size:22px;

    animation:countPulse .9s infinite;

}

@keyframes countPulse{

    0%{

        transform:scale(1);

    }

    50%{

        transform:scale(1.15);

    }

    100%{

        transform:scale(1);

    }

}

/* ==========================================================
   SUCCESS HEADER
==========================================================*/

.bg-success{

    background:#198754 !important;

}

/* ==========================================================
   VERIFIED ICON
==========================================================*/

.verify-icon{

    font-size:60px;

    color:#198754;

    animation:verifyRotate .7s ease;

}

@keyframes verifyRotate{

    from{

        transform:scale(.4) rotate(-90deg);

        opacity:0;

    }

    to{

        transform:scale(1) rotate(0deg);

        opacity:1;

    }

}

/* ==========================================================
   FULL SCREEN PROCESSING OVERLAY
==========================================================*/

.overlay{

    position:fixed;

    inset:0;

    width:100%;

    height:100%;

    background:rgba(7,22,45,.82);

    backdrop-filter:blur(8px);

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:9999;

    animation:overlayFade .35s ease;

}

.overlay.d-none{

    display:none !important;

}

@keyframes overlayFade{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

/* ==========================================================
   PROCESS BOX
==========================================================*/

.processing-box{

    width:460px;

    background:#ffffff;

    border-radius:20px;

    text-align:center;

    padding:45px;

    box-shadow:0 25px 60px rgba(0,0,0,.35);

    animation:popIn .35s ease;

}

@keyframes popIn{

    from{

        transform:scale(.85);

        opacity:0;

    }

    to{

        transform:scale(1);

        opacity:1;

    }

}

.processing-box h3{

    margin-top:25px;

    color:#0b5ed7;

    font-size:30px;

    font-weight:700;

}

.processing-box p{

    margin-top:12px;

    font-size:18px;

    color:#6c757d;

}

/* ==========================================================
   CUSTOM SPINNER
==========================================================*/

.spinner-border{

    width:85px;

    height:85px;

    border-width:8px;

    color:#0b5ed7 !important;

}

/* ==========================================================
   SUCCESS MESSAGE
==========================================================*/

.success-banner{

    background:#198754;

    color:#ffffff;

    padding:15px;

    text-align:center;

    font-size:22px;

    font-weight:700;

    border-radius:12px;

    margin-bottom:20px;

    animation:successFlash .6s ease;

}

@keyframes successFlash{

    0%{

        transform:scale(.85);

        opacity:0;

    }

    100%{

        transform:scale(1);

        opacity:1;

    }

}

/* ==========================================================
   ERROR MESSAGE
==========================================================*/

.error-banner{

    background:#dc3545;

    color:#ffffff;

    padding:15px;

    text-align:center;

    font-size:22px;

    font-weight:700;

    border-radius:12px;

    margin-bottom:20px;

    animation:errorShake .55s ease;

}

@keyframes errorShake{

    0%{

        transform:translateX(0);

    }

    20%{

        transform:translateX(-10px);

    }

    40%{

        transform:translateX(10px);

    }

    60%{

        transform:translateX(-8px);

    }

    80%{

        transform:translateX(8px);

    }

    100%{

        transform:translateX(0);

    }

}

/* ==========================================================
   SUCCESS GLOW
==========================================================*/

.success-glow{

    animation:successGlow 1.2s infinite alternate;

}

@keyframes successGlow{

    from{

        box-shadow:0 0 20px rgba(25,135,84,.25);

    }

    to{

        box-shadow:0 0 45px rgba(25,135,84,.65);

    }

}

/* ==========================================================
   ERROR GLOW
==========================================================*/

.error-glow{

    animation:errorGlow 1.2s infinite alternate;

}

@keyframes errorGlow{

    from{

        box-shadow:0 0 20px rgba(220,53,69,.20);

    }

    to{

        box-shadow:0 0 45px rgba(220,53,69,.55);

    }

}

/* ==========================================================
   VERIFICATION STATUS COLORS
==========================================================*/

.status-success{

    color:#198754;

    font-weight:700;

}

.status-failed{

    color:#dc3545;

    font-weight:700;

}

.status-processing{

    color:#0b5ed7;

    font-weight:700;

}

/* ==========================================================
   CARD TRANSITION
==========================================================*/

.fade-card{

    animation:fadeCard .35s ease;

}

@keyframes fadeCard{

    from{

        opacity:0;

        transform:translateY(20px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================================================
   FOOTER
==========================================================*/

footer{

    background:#0b5ed7;

    color:#ffffff;

    text-align:center;

    padding:12px;

    font-size:15px;

    margin-top:20px;

    font-weight:500;

    letter-spacing:.4px;

}

/* ==========================================================
   SMALL LOADING DOTS
==========================================================*/

.loading-dots{

    display:inline-flex;

    gap:8px;

    margin-top:18px;

}

.loading-dots span{

    width:10px;

    height:10px;

    border-radius:50%;

    background:#0b5ed7;

    animation:dotBounce 1.2s infinite;

}

.loading-dots span:nth-child(2){

    animation-delay:.2s;

}

.loading-dots span:nth-child(3){

    animation-delay:.4s;

}

@keyframes dotBounce{

    0%{

        transform:translateY(0);

        opacity:.4;

    }

    50%{

        transform:translateY(-8px);

        opacity:1;

    }

    100%{

        transform:translateY(0);

        opacity:.4;

    }

}

/* ==========================================================
   RESPONSIVE DESIGN
==========================================================*/

@media (max-width:1400px){

    .main-title{

        font-size:26px;

    }

    .scanner-frame{

        max-width:680px;

    }

}

@media (max-width:1200px){

    .camera-body{

        min-height:500px;

    }

    .main-title{

        font-size:24px;

    }

    .resident-photo{

        width:130px;
        height:160px;

    }

}

@media (max-width:992px){

    .camera-card{

        margin-bottom:25px;

    }

    .camera-body{

        min-height:420px;

    }

    .main-title{

        font-size:22px;

    }

    #clock{

        margin-top:15px;

        width:100%;

    }

}

@media (max-width:768px){

    .top-header{

        text-align:center;

    }

    .logo-box{

        margin:auto;
        margin-bottom:15px;

    }

    .main-title{

        font-size:20px;

    }

    .sub-title{

        font-size:14px;

    }

    .camera-body{

        padding:10px;

        min-height:auto;

    }

    .scanner-frame{

        border-width:5px;

    }

    .status-item{

        font-size:15px;

    }

    #status{

        font-size:18px;

        line-height:28px;

    }

}

@media (max-width:576px){

    .container-fluid{

        padding-left:10px;
        padding-right:10px;

    }

    .card-header-custom{

        font-size:17px;

    }

    .processing-box{

        width:92%;

        padding:25px;

    }

    .processing-box h3{

        font-size:22px;

    }

    .resident-photo{

        width:110px;

        height:140px;

    }

}

/* ==========================================================
   LIVE CLOCK
==========================================================*/

#clock{

    font-family:monospace;

    letter-spacing:1px;

    transition:.3s;

}

.clock-online{

    background:#ffffff;

    color:#198754 !important;

}

/* ==========================================================
   CARD HOVER
==========================================================*/

.camera-card,
.status-card,
.message-card,
.result-card{

    transition:.30s;

}

.camera-card:hover,
.status-card:hover,
.message-card:hover,
.result-card:hover{

    transform:translateY(-3px);

    box-shadow:0 15px 35px rgba(0,0,0,.18);

}

/* ==========================================================
   BADGE COLORS
==========================================================*/

.badge-camera{

    background:#198754;

}

.badge-server{

    background:#0b5ed7;

}

.badge-scanner{

    background:#ffc107;

    color:#000;

}

.badge-error{

    background:#dc3545;

}

/* ==========================================================
   UTILITY CLASSES
==========================================================*/

.hide{

    display:none !important;

}

.show{

    display:block !important;

}

.flex-center{

    display:flex;

    justify-content:center;

    align-items:center;

}

.text-blue{

    color:#0b5ed7;

}

.text-green{

    color:#198754;

}

.text-red{

    color:#dc3545;

}

.text-orange{

    color:#fd7e14;

}

.bg-light-blue{

    background:#eef6ff;

}

.shadow-soft{

    box-shadow:0 10px 30px rgba(0,0,0,.10);

}

.rounded-15{

    border-radius:15px;

}

/* ==========================================================
   FADE HELPERS
==========================================================*/

.fade-in{

    animation:fadeIn .4s ease;

}

.fade-out{

    animation:fadeOut .4s ease;

}

@keyframes fadeIn{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

@keyframes fadeOut{

    from{

        opacity:1;

    }

    to{

        opacity:0;

    }

}

/* ==========================================================
   SCALE ANIMATION
==========================================================*/

.scale-up{

    animation:scaleUp .35s ease;

}

@keyframes scaleUp{

    from{

        transform:scale(.92);

        opacity:0;

    }

    to{

        transform:scale(1);

        opacity:1;

    }

}

/* ==========================================================
   PRINT SUPPORT
==========================================================*/

@media print{

    header,
    footer,
    .message-card,
    .status-card{

        display:none;

    }

    body{

        background:#ffffff;

    }

    .camera-card{

        display:none;

    }

    .result-card{

        display:block !important;

        box-shadow:none;

        border:none;

    }

}

/* ==========================================================
   FULLSCREEN SUPPORT
==========================================================*/

body.fullscreen{

    cursor:none;

}

body.fullscreen .top-header{

    padding-top:10px;

    padding-bottom:10px;

}

/* ==========================================================
   DISABLE TEXT SELECTION
==========================================================*/

body{

    user-select:none;

    -webkit-user-select:none;

    -moz-user-select:none;

}

/* ==========================================================
   SMOOTH SCROLL
==========================================================*/

html{

    scroll-behavior:smooth;

}

/* ==========================================================
   END OF PART 5
==========================================================*/