/* ═══════════════════════════════════════════════════════════
   REGISTRATION PAGE — Clean Professional Institutional Design
   JRMSU Tampilisan Campus · Digital Voting System
   (Matching Login Page Design)
═══════════════════════════════════════════════════════════ */

:root {
    /* Primary Colors */
    --primary-blue:     #1A237E;
    --primary-blue-rgb: 26, 35, 126;
    --secondary-red:    #D32F2F;
    --secondary-red-rgb: 211, 47, 47;
    
    /* Backgrounds */
    --bg-main:          #F8F9FA;
    --card-bg:          #FFFFFF;
    
    /* Text Colors */
    --text-dark:        #1a1f2e;
    --text-body:        #374151;
    --text-muted:       #6B7280;
    --text-light:       #9CA3AF;
    
    /* Status Colors */
    --green:            #10B981;
    --amber:            #F59E0B;
    --red:              #DC2626;
    
    /* Input */
    --input-border:     #D1D5DB;
    --input-bg:         #F9FAFB;
    --input-focus-bg:   #FFFFFF;
    --border:           #E5E7EB;
    
    /* Shadows */
    --shadow-card:      0 4px 6px -1px rgba(0, 0, 0, 0.07),
                        0 2px 4px -2px rgba(0, 0, 0, 0.05),
                        0 0 0 1px rgba(0, 0, 0, 0.03);
    --shadow-btn-red:   0 4px 14px rgba(211, 47, 47, 0.25);
    --shadow-btn-blue:  0 4px 14px rgba(26, 35, 126, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }


/* ═══════════════════════════════════════════════════════════
   BACKGROUND — Clean, professional
═══════════════════════════════════════════════════════════ */
body.login-page {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: var(--bg-main);
}

/* Subtle decorative circles */
body.login-page::before {
    content: '';
    position: fixed;
    top: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: 1px solid rgba(26, 35, 126, 0.05);
    pointer-events: none;
    z-index: 0;
}

body.login-page::after {
    content: '';
    position: fixed;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(211, 47, 47, 0.04);
    pointer-events: none;
    z-index: 0;
}

.circle-decor {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: transparent;
}

.circle-decor-1 {
    top: 15%;
    left: 5%;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(26, 35, 126, 0.04);
}

.circle-decor-2 {
    bottom: 25%;
    left: 8%;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(211, 47, 47, 0.04);
}

.circle-decor-3 {
    top: 40%;
    right: 3%;
    width: 140px;
    height: 140px;
    border: 1px solid rgba(26, 35, 126, 0.03);
}


/* ═══════════════════════════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════════════════════════ */
.login-wrap {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


/* ═══════════════════════════════════════════════════════════
   REGISTRATION CARD
═══════════════════════════════════════════════════════════ */
.register-box {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: cardIn 0.5s ease-out;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}


/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
.reg-header {
    text-align: center;
    padding: 28px 24px 20px;
}

.reg-header .logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.reg-header .logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
}

.reg-header .logo-text {
    text-align: left;
}

.reg-header .logo-text small {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 3px;
}

.reg-header .logo-text h4 {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* Bicolor accent bar (50% Blue / 50% Red) */
.header-divider {
    width: 100%;
    height: 4px;
    border-radius: 100px;
    background: linear-gradient(90deg, 
        var(--primary-blue) 0%, 
        var(--primary-blue) 50%, 
        var(--secondary-red) 50%, 
        var(--secondary-red) 100%);
    margin-bottom: 20px;
}

.reg-header h3 {
    font-family: 'Sora', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--primary-blue);
}

.reg-header h3 .highlight { 
    color: var(--primary-blue); 
}

.reg-header h3 .normal { 
    color: var(--text-dark); 
}

.reg-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.reg-body { 
    padding: 0 28px 28px; 
}


/* ═══════════════════════════════════════════════════════════
   STEPS INDICATOR
═══════════════════════════════════════════════════════════ */
.steps {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-main);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--border);
}

.step {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.step .step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: #D1D5DB;
    color: #fff;
    transition: all 0.3s;
    flex-shrink: 0;
}

.step.active {
    background: var(--card-bg);
    color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step.active .step-num {
    background: var(--primary-blue);
}

.step.done { 
    color: var(--green); 
}

.step.done .step-num { 
    background: var(--green); 
}


/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
    width: calc(100% - 32px);
}

.toast-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    animation: toastIn 0.4s ease-out;
    position: relative;
    border-left: 4px solid;
    background: var(--card-bg);
}

.toast-alert.fade-out { animation: toastOut 0.35s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(50px); } }

.toast-alert.error { 
    background: #FEF2F2; 
    border-left-color: var(--secondary-red); 
    color: #991B1B; 
}

.toast-alert.warning { 
    background: #FFFBEB; 
    border-left-color: var(--amber); 
    color: #92400E; 
}

.toast-alert.success { 
    background: #ECFDF5; 
    border-left-color: var(--green); 
    color: #065F46; 
}

.toast-alert .toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.toast-alert.error .toast-icon { background: #FEE2E2; color: var(--secondary-red); }
.toast-alert.warning .toast-icon { background: #FEF3C7; color: #B45309; }
.toast-alert.success .toast-icon { background: #D1FAE5; color: var(--green); }

.toast-alert .toast-body { flex: 1; }
.toast-alert .toast-body strong { display: block; font-size: 13px; margin-bottom: 2px; }

.toast-alert .toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 14px;
    color: inherit;
    cursor: pointer;
    opacity: 0.5;
}

.toast-alert .toast-close:hover { opacity: 1; }

.toast-alert .toast-timer {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 2px;
    border-radius: 0 0 10px 0;
}

.toast-alert.error .toast-timer { background: var(--secondary-red); }
.toast-alert.warning .toast-timer { background: var(--amber); }
.toast-alert.success .toast-timer { background: var(--green); }


/* ═══════════════════════════════════════════════════════════
   FORM STEP HEADERS
═══════════════════════════════════════════════════════════ */
.wizard-content h5 {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wizard-content h5 .step-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--primary-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}


/* ═══════════════════════════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════════════════════════ */
.form-group { 
    margin-bottom: 16px; 
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.form-group label .required { 
    color: var(--secondary-red); 
    margin-left: 2px; 
}

.form-control {
    border-radius: 10px;
    border: 1.5px solid var(--input-border);
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    width: 100%;
    background: var(--input-bg);
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-blue);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.08);
    outline: none;
}

.form-control:disabled, 
.form-control[readonly] {
    background: var(--bg-main);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-hint i {
    color: var(--primary-blue);
    opacity: 0.6;
}

.cred-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.cred-status.empty { background: var(--bg-main); color: var(--text-light); }
.cred-status.checking { background: #EFF6FF; color: var(--primary-blue); }
.cred-status.ok { background: #ECFDF5; color: var(--green); }
.cred-status.taken { background: #FEF2F2; color: var(--secondary-red); }
.cred-status.warn { background: #FFFBEB; color: #B45309; }
.cred-status i { font-size: 10px; }

.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 42px; }

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: color 0.2s;
}

.pw-toggle:hover { 
    color: var(--primary-blue); 
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.name-display {
    background: var(--bg-main) !important;
    font-weight: 600;
    color: var(--text-body) !important;
    border: 1.5px dashed var(--input-border) !important;
}

.name-display.filled {
    border-color: var(--green) !important;
    border-style: solid !important;
    background: #F0FDF4 !important;
    color: #065F46 !important;
}


/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn-nav {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Sora', sans-serif;
}

/* Continue/Next Button (Blue) */
.btn-next {
    background: var(--primary-blue);
    color: #fff;
    box-shadow: var(--shadow-btn-blue);
}

.btn-next:hover:not(:disabled) {
    background: #0D1657;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3);
}

.btn-next:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

/* Back Button */
.btn-prev {
    background: var(--bg-main);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-prev:hover { 
    background: var(--border); 
    color: var(--text-dark); 
}

/* Submit Button (Red - Critical Action) */
.btn-submit {
    background: var(--secondary-red);
    color: #fff;
    box-shadow: var(--shadow-btn-red);
}

.btn-submit:hover:not(:disabled) {
    background: #B71C1C;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.35);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════
   VERIFICATION STEP
═══════════════════════════════════════════════════════════ */
.security-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.badge-security {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: var(--bg-main);
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.badge-security.active { 
    background: #ECFDF5; 
    color: #065F46; 
    border-color: #86EFAC; 
}

.badge-security.failed { 
    background: #FEF2F2; 
    color: #991B1B; 
    border-color: #FCA5A5; 
}

.badge-security i { 
    font-size: 9px; 
}

.liveness-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    text-align: center;
    transition: all 0.3s;
}

.liveness-card.detecting { 
    border-color: var(--amber); 
    background: #FFFBEB; 
}

.liveness-card.challenge { 
    border-color: #8B5CF6; 
    background: #F5F3FF; 
}

.liveness-card.blink { 
    border-color: #3B82F6; 
    background: #EFF6FF; 
}

.liveness-card.averaging { 
    border-color: #8B5CF6; 
    background: #F5F3FF; 
}

.liveness-card.passed { 
    border-color: var(--green); 
    background: #ECFDF5; 
}

.liveness-card.error { 
    border-color: var(--secondary-red); 
    background: #FEF2F2; 
}

.liveness-card .lc-icon { 
    font-size: 18px; 
    display: inline; 
    margin-right: 6px; 
    vertical-align: middle; 
}

.liveness-card .lc-title { 
    font-size: 13px; 
    font-weight: 700; 
    color: var(--text-dark); 
    display: inline; 
    vertical-align: middle; 
}

.liveness-card .lc-sub { 
    font-size: 11px; 
    color: var(--text-muted); 
    margin-top: 4px; 
}

.lc-progress-wrap { 
    margin-top: 8px; 
    display: none; 
}

.lc-bar { 
    width: 100%; 
    height: 6px; 
    background: var(--border); 
    border-radius: 4px; 
    overflow: hidden; 
}

.lc-fill { 
    height: 100%; 
    background: var(--primary-blue); 
    width: 0%; 
    transition: width 0.15s; 
    border-radius: 4px; 
}

.lc-fill.blink { 
    background: linear-gradient(90deg, #3B82F6, var(--green)); 
}

.lc-fb { 
    margin-top: 4px; 
    font-size: 11px; 
    font-weight: 600; 
    color: var(--green); 
}

.avg-wrap { 
    margin-top: 8px; 
    display: none; 
}

.avg-bar { 
    width: 100%; 
    height: 10px; 
    background: var(--border); 
    border-radius: 6px; 
    overflow: hidden; 
    position: relative; 
}

.avg-fill { 
    height: 100%; 
    background: linear-gradient(90deg, var(--primary-blue), #8B5CF6); 
    width: 0%; 
    transition: width 0.1s; 
    border-radius: 6px; 
}

.avg-label { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 8px; 
    font-weight: 700; 
    color: #fff; 
}

.avg-sub { 
    font-size: 10px; 
    color: #7C3AED; 
    font-weight: 600; 
    margin-top: 4px; 
}

.capture-status { 
    text-align: center; 
    margin-top: 8px; 
    font-size: 12px; 
    font-weight: 600; 
    min-height: 18px; 
}

.capture-status.active { 
    color: var(--primary-blue); 
}

.capture-status.captured { 
    color: var(--green); 
}

.capture-status.error { 
    color: var(--secondary-red); 
}


/* ═══════════════════════════════════════════════════════════
   FACE CAMERA
═══════════════════════════════════════════════════════════ */
.face-camera-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    position: relative;
    width: 220px;
    height: 220px;
}

.face-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--border);
    transition: all 0.4s;
    pointer-events: none;
    z-index: 6;
}

.face-ring.detecting { 
    border-color: var(--amber); 
    animation: ringPulse 1.4s infinite; 
}

.face-ring.found { 
    border-color: var(--green); 
    box-shadow: 0 0 0 5px rgba(16,185,129,0.15); 
}

.face-ring.challenge { 
    border-color: #8B5CF6; 
    box-shadow: 0 0 0 5px rgba(139,92,246,0.15); 
    animation: ringChallenge 1s infinite; 
}

.face-ring.blink { 
    border-color: #3B82F6; 
    box-shadow: 0 0 0 5px rgba(59,130,246,0.15); 
    animation: ringChallenge 1s infinite; 
}

.face-ring.averaging { 
    border-color: #8B5CF6; 
    box-shadow: 0 0 0 6px rgba(139,92,246,0.2); 
    animation: ringChallenge 0.6s infinite; 
}

.face-ring.passed { 
    border-color: var(--green); 
    box-shadow: 0 0 0 6px rgba(16,185,129,0.2); 
    border-width: 4px; 
}

.face-ring.error { 
    border-color: var(--secondary-red); 
    box-shadow: 0 0 0 5px rgba(211,47,47,0.15); 
}

@keyframes ringPulse { 
    0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.3); } 
    50% { box-shadow: 0 0 0 8px rgba(251,191,36,0); } 
}

@keyframes ringChallenge { 
    0%, 100% { box-shadow: 0 0 0 4px rgba(139,92,246,0.15); } 
    50% { box-shadow: 0 0 0 12px rgba(139,92,246,0); } 
}

.face-circle-clip {
    width: 214px;
    height: 214px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #1a1a2e;
    z-index: 4;
}

.face-circle-clip video, 
.face-circle-clip canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.face-circle-clip canvas { 
    display: none; 
}

.face-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(26, 35, 126, 0.6), transparent);
    z-index: 5;
    top: 0;
    animation: scanDown 2.5s linear infinite;
    pointer-events: none;
}

@keyframes scanDown { 
    0% { top: 0%; opacity: 0; } 
    10% { opacity: 1; } 
    90% { opacity: 1; } 
    100% { top: 100%; opacity: 0; } 
}

.face-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    z-index: 7;
    pointer-events: none;
}

.face-corner::before, 
.face-corner::after {
    content: '';
    position: absolute;
    background: var(--primary-blue);
    border-radius: 2px;
}

.face-corner.tl { top: 10px; left: 10px; }
.face-corner.tr { top: 10px; right: 10px; transform: rotate(90deg); }
.face-corner.bl { bottom: 10px; left: 10px; transform: rotate(-90deg); }
.face-corner.br { bottom: 10px; right: 10px; transform: rotate(180deg); }
.face-corner::before { width: 12px; height: 3px; top: 0; left: 0; }
.face-corner::after { width: 3px; height: 12px; top: 0; left: 0; }

/* Arrow Overlay */
.arrow-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.arrow-overlay.show { display: flex; }

.arrow-overlay .arrow-icon {
    font-size: 52px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.arrow-overlay .arrow-icon.left { animation: arrowLeft 0.8s ease-in-out infinite; }
.arrow-overlay .arrow-icon.right { animation: arrowRight 0.8s ease-in-out infinite; }
.arrow-overlay .arrow-icon.down { animation: arrowDown 0.8s ease-in-out infinite; }

@keyframes arrowLeft { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-12px); } }
@keyframes arrowRight { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(12px); } }
@keyframes arrowDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }

/* Model Loading */
.model-loading {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 25;
}

.model-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.model-loading p { 
    color: #fff; 
    margin-top: 8px; 
    font-size: 11px; 
    text-align: center; 
    padding: 0 10px; 
}

.model-loading .load-bar { 
    width: 100px; 
    height: 4px; 
    background: rgba(255,255,255,0.2); 
    border-radius: 3px; 
    margin-top: 6px; 
}

.model-loading .load-fill { 
    height: 100%; 
    background: var(--primary-blue); 
    width: 0%; 
    border-radius: 3px; 
    transition: width 0.3s; 
}


/* ═══════════════════════════════════════════════════════════
   ID CAMERA
═══════════════════════════════════════════════════════════ */
.id-camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a2e;
    aspect-ratio: 4/3;
    border: 2px solid var(--border);
}

.id-camera-wrapper video, 
.id-camera-wrapper canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.id-camera-wrapper canvas { 
    display: none; 
}

.id-guide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.id-guide-rect {
    width: 82%;
    height: 64%;
    border: 2px dashed rgba(255,255,255,0.4);
    border-radius: 8px;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-capture {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--primary-blue);
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.btn-capture::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 50%;
    background: var(--secondary-red);
    transition: all 0.15s;
}

.btn-capture:hover::after { 
    background: var(--primary-blue); 
}

.btn-capture:disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
}

.btn-retake {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-retake:hover { 
    background: var(--text-muted); 
    color: #fff; 
    border-color: var(--text-muted);
}

.btn-continue-id {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    transition: all 0.2s;
}

.btn-continue-id:hover:not(:disabled) {
    background: #0D1657;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.25);
}

.btn-continue-id:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.preview-thumbnail {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--green);
    display: none;
    margin: 6px auto 0;
}

.preview-thumbnail.rect { 
    border-radius: 8px; 
    width: 72px; 
    height: 50px; 
}

.twin-warning {
    display: none;
    background: #FFFBEB;
    border: 1px solid var(--amber);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 10px;
    font-size: 11px;
}

.twin-warning.show { 
    display: block; 
}

.twin-warning strong { 
    color: #92400E; 
    font-size: 12px; 
}


/* ═══════════════════════════════════════════════════════════
   SUMMARY
═══════════════════════════════════════════════════════════ */
.summary-card {
    background: #ECFDF5;
    border: 2px solid var(--green);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.summary-card h6 { 
    color: #065F46; 
    font-weight: 700; 
    font-size: 13px; 
    margin: 0 0 12px; 
}

.summary-photos {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.summary-photos .sp-item img { 
    border: 2px solid var(--green); 
}

.summary-photos .sp-label { 
    font-size: 10px; 
    color: var(--text-muted); 
    margin-top: 4px; 
    text-align: center; 
}


/* ═══════════════════════════════════════════════════════════
   LOGIN LINK
═══════════════════════════════════════════════════════════ */
.login-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.login-link a { 
    color: var(--primary-blue); 
    font-weight: 700; 
    text-decoration: none; 
    transition: color 0.2s;
}

.login-link a:hover { 
    color: var(--secondary-red); 
}

#cameraVideo.mirror { 
    transform: scaleX(-1); 
}

@keyframes timerShrink { 
    from { width: 100%; } 
    to { width: 0%; } 
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .login-wrap {
        padding: 16px;
    }
    
    .register-box {
        border-radius: 14px;
    }
    
    .reg-body { 
        padding: 0 18px 22px; 
    }
    
    .reg-header {
        padding: 22px 18px 16px;
    }
    
    .form-row-2 { 
        grid-template-columns: 1fr; 
    }
    
    .face-camera-wrapper { 
        width: 190px; 
        height: 190px; 
    }
    
    .face-circle-clip { 
        width: 184px; 
        height: 184px; 
    }
    
    .steps .step-label { 
        display: none; 
    }
    
    .circle-decor-1,
    .circle-decor-2,
    .circle-decor-3 {
        display: none;
    }
}

@media (max-width: 380px) {
    .reg-header .logo-wrap {
        gap: 10px;
    }
    
    .reg-header .logo-img {
        width: 48px;
        height: 48px;
    }
    
    .reg-header .logo-text h4 {
        font-size: 13px;
    }
    
    .reg-header h3 {
        font-size: 22px;
    }
}