:root {
    --bg-page: #f4ede2;
    --bg-container: #faf7f2;
    --bg-card: #ffffff;
    --border-gold: #ebdcc5;
    --border-gold-strong: #d4a735;
    --gold-primary: #b8860b;
    --gold-light: #e5b958;
    --gold-dark: #8b6914;
    --text-dark: #2d2418;
    --text-muted: #7a6b55;
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0284c7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0.85rem 0.5rem;
    overflow-x: hidden;
}

/* Ambient Subtle Glows */
.bg-glow {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(229, 185, 88, 0.12), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-2 {
    position: fixed;
    bottom: -100px;
    right: 5%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(184, 134, 11, 0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* =========================================================
   MAIN MOBILE CONTAINER (FRAME)
   ========================================================= */
.app-mobile-container {
    width: 100%;
    max-width: 410px;
    background: var(--bg-container);
    border: 1.5px solid var(--border-gold);
    border-radius: 28px;
    box-shadow: 0 14px 40px rgba(184, 134, 11, 0.1), 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-bottom: 1rem;
    position: relative;
    z-index: 1;
}

/* 1. Unified Compact Header (Locked / Sticky on Scroll) */
.mobile-header-combined {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(7, 14, 28, 0.98) 0%, rgba(12, 21, 42, 0.98) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 0.75rem 1rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border-radius: 26px 26px 0 0;
    border-bottom: 1.5px solid rgba(212, 167, 53, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.header-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
    background: #000000;
    border: 1.5px solid var(--border-gold-strong);
    box-shadow: 0 2px 8px rgba(212, 167, 53, 0.35);
    flex-shrink: 0;
}

.header-brand-info {
    display: flex;
    flex-direction: column;
}

.header-brand-name {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.4px;
    color: #e5b958;
    line-height: 1.15;
    margin: 0;
}

.header-brand-sub {
    font-size: 0.68rem;
    color: #cbd5e1;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sound-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #e5b958;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(229, 185, 88, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-sound-toggle:hover {
    background: rgba(229, 185, 88, 0.2);
    border-color: #e5b958;
    transform: scale(1.06);
}

.btn-sound-toggle.muted {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-sound-toggle:active {
    transform: scale(0.92);
}

.btn-admin-gold-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5b958 0%, #c7923e 100%);
    color: #1a1205 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(229, 185, 88, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.btn-admin-gold-circle svg {
    fill: #1a1205;
}

.btn-admin-gold-circle:active {
    transform: scale(0.92);
}

/* Clean Borderless Date & Time Row inside Header (No Heavy Boxes) */
.header-date-row-clean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(212, 167, 53, 0.2);
    width: 100%;
}

.header-date-text-clean {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
}

.header-time-text-clean {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #e5b958;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Compact Single-Line Status Pill */
.status-pill {
    background: #ffffff;
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    padding: 0.32rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 2. Refined & Compact Status Badges (Standby, GPS, Scanning, Verified) */
.status-indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 0.45rem;
    margin: 0 0.75rem;
}

.status-pill {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    padding: 0.28rem 0.65rem;
    min-height: 27px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.25px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 2px 6px rgba(184, 134, 11, 0.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.25s ease;
}

.status-pill svg {
    fill: var(--text-muted);
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Interactive GPS Refresh Badge & Spinner */
#gpsBadge {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

#gpsBadge:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

#gpsBadge:active {
    transform: scale(0.96);
}

#gpsBadge.loading {
    border-color: #e5b958;
    background: rgba(229, 185, 88, 0.12);
    color: #b8860b;
}

.gps-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gps-spinner {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(229, 185, 88, 0.35);
    border-top-color: #b8860b;
    border-radius: 50%;
    animation: gpsSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes gpsSpin {
    to { transform: rotate(360deg); }
}

/* Standby / Scanning / Warning / Active states */
.status-pill.scanning {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
}

.status-pill.warning {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
}

.status-pill.active {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.status-pill.active svg {
    fill: #10b981;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #10b981;
    flex-shrink: 0;
}

.status-pill.scanning .pulse-dot,
.status-pill.warning .pulse-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

/* 3. Scanner Viewport Card */
.scanner-viewport-card {
    margin: 0 0.75rem;
    background: #070e1c;
    border-radius: 20px;
    border: 1.5px solid rgba(212, 167, 53, 0.35);
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.mobile-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #070e1c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#webcamVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
}

#overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Camera Standby Overlay (Futuristic Gold Wireframe HUD) */
.camera-standby-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, #0e1b38 0%, #060b17 90%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.camera-standby-overlay.hidden {
    display: none;
}

.biometric-hud-art {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
}

.hud-circle-outer {
    position: absolute;
    width: 132px;
    height: 132px;
    border: 1.5px dashed rgba(229, 185, 88, 0.45);
    border-radius: 50%;
    animation: rotateClockwise 25s linear infinite;
}

.hud-circle-inner {
    position: absolute;
    width: 104px;
    height: 104px;
    border: 1px solid rgba(229, 185, 88, 0.25);
    border-radius: 50%;
}

.hud-corner-tl, .hud-corner-tr, .hud-corner-bl, .hud-corner-br {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #e5b958;
}

.hud-corner-tl { top: 0; left: 0; border-top: 2.5px solid; border-left: 2.5px solid; border-radius: 5px 0 0 0; }
.hud-corner-tr { top: 0; right: 0; border-top: 2.5px solid; border-right: 2.5px solid; border-radius: 0 5px 0 0; }
.hud-corner-bl { bottom: 0; left: 0; border-bottom: 2.5px solid; border-left: 2.5px solid; border-radius: 0 0 0 5px; }
.hud-corner-br { bottom: 0; right: 0; border-bottom: 2.5px solid; border-right: 2.5px solid; border-radius: 0 0 5px 0; }

/* Continuous Matrix Laser Sweep Beam (Moving Up & Down) */
.standby-laser-sweep {
    position: absolute;
    left: 8%;
    width: 84%;
    height: 2.5px;
    background: linear-gradient(90deg, transparent, #e5b958, #ffffff, #e5b958, transparent);
    box-shadow: 0 0 14px #e5b958, 0 0 24px rgba(229, 185, 88, 0.8);
    border-radius: 50%;
    z-index: 10;
    animation: matrixLaserSweep 2.2s ease-in-out infinite alternate;
}

@keyframes matrixLaserSweep {
    0% { top: 12%; opacity: 0.35; }
    50% { opacity: 1; }
    100% { top: 88%; opacity: 0.35; }
}

.hud-face-wireframe {
    z-index: 2;
    animation: matrixFacePulse 3s ease-in-out infinite alternate;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes rotateClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes matrixFacePulse {
    0% { transform: scale(0.96); filter: drop-shadow(0 0 6px rgba(229, 185, 88, 0.35)); }
    100% { transform: scale(1.03); filter: drop-shadow(0 0 18px rgba(229, 185, 88, 0.85)); }
}

.standby-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.25rem;
    letter-spacing: 0.2px;
}

.standby-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.35;
    text-align: center;
    margin-bottom: 0.95rem;
}

.btn-open-scanner-gold {
    background: linear-gradient(135deg, #e5b958 0%, #c7923e 50%, #b8860b 100%);
    color: #1a1205 !important;
    font-weight: 800;
    font-size: 0.84rem;
    padding: 0.65rem 1.35rem;
    border-radius: 50px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 18px rgba(229, 185, 88, 0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-open-scanner-gold:active {
    transform: scale(0.96);
}

/* Scanner Laser HUD */
.scanner-hud-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
    display: none;
}

.camera-active .scanner-hud-overlay {
    display: block;
}

.laser-beam {
    position: absolute;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e5b958, #ffffff, #e5b958, transparent);
    box-shadow: 0 0 12px #e5b958;
    animation: scanLaser 2.5s ease-in-out infinite alternate;
}

@keyframes scanLaser {
    0% { top: 15%; opacity: 0.4; }
    50% { opacity: 1; }
    100% { top: 85%; opacity: 0.4; }
}

.scanner-reticle {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    border: 1px dashed rgba(229, 185, 88, 0.35);
    border-radius: 16px;
}

.scanner-reticle .corner-tl, .scanner-reticle .corner-tr,
.scanner-reticle .corner-bl, .scanner-reticle .corner-br {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: #e5b958;
}

.scanner-reticle .corner-tl { top: -2px; left: -2px; border-top: 2.5px solid; border-left: 2.5px solid; border-radius: 5px 0 0 0; }
.scanner-reticle .corner-tr { top: -2px; right: -2px; border-top: 2.5px solid; border-right: 2.5px solid; border-radius: 0 5px 0 0; }
.scanner-reticle .corner-bl { bottom: -2px; left: -2px; border-bottom: 2.5px solid; border-left: 2.5px solid; border-radius: 0 0 0 5px; }
.scanner-reticle .corner-br { bottom: -2px; right: -2px; border-bottom: 2.5px solid; border-right: 2.5px solid; border-radius: 0 0 5px 0; }

/* Camera Toolbar below video */
.camera-mobile-toolbar {
    background: #ffffff;
    padding: 0.5rem 0.65rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    border-top: 1px solid var(--border-gold);
}

.btn-toolbar-white {
    background: #ffffff;
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    padding: 0.55rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
}

.btn-toolbar-white:active {
    background: #f4ede2;
}

/* 4. Fast Face Registration Tool Card */
.register-card-white {
    margin: 0 0.75rem;
    background: #ffffff;
    border: 1px solid var(--border-gold);
    border-radius: 18px;
    padding: 0.95rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.register-card-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.avatar-icon-gold {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5b958, #c7923e);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(229, 185, 88, 0.25);
}

.register-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.1rem;
}

.register-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.25;
}

.form-group-custom {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.label-custom {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dark);
}

.select-wrapper-custom {
    position: relative;
    width: 100%;
}

.select-icon-left {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}

.form-control-custom {
    background: #faf8f5;
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    padding: 0.65rem 0.75rem 0.65rem 2.2rem;
    font-size: 0.78rem;
    color: var(--text-dark);
    width: 100%;
    font-weight: 600;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-control-custom:focus {
    border-color: var(--gold-primary);
    background: #ffffff;
}

.btn-register-gold {
    background: linear-gradient(135deg, #e5b958 0%, #c7923e 50%, #b8860b 100%);
    color: #1a1205 !important;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0.72rem;
    border-radius: 12px;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 3px 12px rgba(229, 185, 88, 0.3);
    cursor: pointer;
}

.btn-register-gold:active {
    transform: scale(0.97);
}

.btn-register-gold:disabled {
    background: linear-gradient(135deg, #6b6b6b 0%, #4a4a4a 50%, #3a3a3a 100%);
    color: #999 !important;
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}

/* =========================================================
   BOTTOM SHEET MODAL (STATUS ABSENSI)
   ========================================================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 22, 12, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.attendance-box-modal {
    background: #ffffff;
    border: 1.5px solid var(--border-gold);
    box-shadow: 0 -10px 40px rgba(184, 134, 11, 0.2);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 410px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.15rem 1.15rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 1, 0.23, 1);
}

.modal-backdrop.show .attendance-box-modal {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 38px;
    height: 4px;
    background: var(--border-gold);
    border-radius: 10px;
    margin: 0 auto 1rem;
}

/* Photo Preview - Large Centered on Top */
.emp-photo-top {
    display: flex;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.emp-photo-frame-lg {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold-primary);
    box-shadow: 0 4px 20px rgba(229, 185, 88, 0.3);
}

.emp-photo-frame-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Employee Verification Info Card */
.emp-verify-card {
    background: #faf8f5;
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.emp-verify-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    letter-spacing: -0.3px;
}

.emp-verify-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.2rem 0;
}

.emp-verify-row svg {
    flex-shrink: 0;
}

/* Dynamic Warning Notices */
.modal-notices {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.notice-late {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 152, 0, 0.12);
    border: 1px solid rgba(255, 152, 0, 0.4);
    color: #e65100;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
}

.notice-distance {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #c62828;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
}

.notice-distance svg {
    flex-shrink: 0;
}

.notice-late svg {
    flex-shrink: 0;
}

/* =========================================================================
   MULTI-TIER ATTENDANCE CATEGORY SELECTOR (LUXURY GOLD)
   ========================================================================= */
.attendance-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.9fr 0.9fr 0.9fr;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
    .attendance-main-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.35rem;
    }
}

.main-type-btn {
    background: #faf8f5;
    border: 1.5px solid var(--border-gold);
    border-radius: 10px;
    padding: 0.5rem 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    transition: all 0.22s ease;
    user-select: none;
}

.main-type-btn .main-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.main-type-btn .main-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-dark);
}

.main-type-btn:hover {
    border-color: #c7923e;
    background: #fffdf9;
    transform: translateY(-1px);
}

.main-type-btn.active {
    background: linear-gradient(135deg, #e5b958, #b8860b);
    border-color: #b8860b;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.35);
}

.main-type-btn.active .main-label {
    color: #1a1205 !important;
    font-weight: 900;
}

/* Dynamic Sub-Options Container */
.sub-options-wrap {
    background: rgba(229, 185, 88, 0.08);
    border: 1px dashed rgba(200, 150, 40, 0.4);
    border-radius: 12px;
    padding: 0.65rem;
    margin-bottom: 0.85rem;
    animation: fadeInSlide 0.25s ease forwards;
}

.sub-options-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #855800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sub-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}

@media (max-width: 420px) {
    .sub-options-grid {
        grid-template-columns: 1fr;
    }
}

.sub-option-card {
    background: #ffffff;
    border: 1.5px solid var(--border-gold);
    border-radius: 9px;
    padding: 0.5rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.sub-option-card .sub-icon {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.sub-option-card .sub-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.sub-option-card .sub-desc {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.1;
}

.sub-option-card:hover:not(.is-locked) {
    border-color: #b8860b;
    background: #fffdf7;
    transform: translateY(-1px);
}

.sub-option-card.selected {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #d97706;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.25);
}

.sub-option-card.selected .sub-title {
    color: #78350f !important;
    font-weight: 900;
}

/* Locked Option State */
.sub-option-card.is-locked {
    background: #f1f5f9;
    border-color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.72;
}

.sub-option-card.is-locked .sub-title {
    color: #64748b;
}

.sub-option-card.is-locked .sub-desc {
    color: #94a3b8;
}

.sub-option-card.is-locked .lock-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* Notice Locked / Early Checkout Alert */
.notice-locked {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.5rem 0.75rem;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    animation: shakeAlert 0.35s ease;
}

.notice-locked svg {
    flex-shrink: 0;
    margin-top: 1px;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.attendance-notes-wrap {
    margin-bottom: 1rem;
}

.notes-input {
    width: 100%;
    background: #faf8f5;
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    color: var(--text-dark);
    outline: none;
}

.modal-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 0.55rem;
}

.btn-action-cancel {
    padding: 0.75rem;
    background: #faf8f5;
    border: 1px solid var(--border-gold);
    color: var(--text-muted);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-action-confirm {
    padding: 0.75rem;
    background: linear-gradient(135deg, #e5b958 0%, #c7923e 50%, #b8860b 100%);
    border: none;
    color: #1a1205 !important;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(229, 185, 88, 0.35);
}

/* =========================================================
   RESULT PROOF CARD MODAL
   ========================================================= */
.result-card-modal {
    background: #ffffff;
    border: 2px solid var(--border-gold-strong);
    box-shadow: 0 -10px 40px rgba(184, 134, 11, 0.25);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 410px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.15rem;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 1, 0.23, 1);
    text-align: center;
}

.modal-backdrop.show .result-card-modal {
    transform: translateY(0);
}

.result-badge-success {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #047857;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

.proof-image-wrapper {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid var(--border-gold);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    background: #000;
}

.proof-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.result-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr 0.8fr;
    gap: 0.45rem;
}

.btn-action-save {
    padding: 0.65rem 0.4rem;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.btn-action-wa {
    padding: 0.65rem 0.4rem;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.25);
}

.btn-action-close {
    padding: 0.65rem 0.4rem;
    background: #faf8f5;
    border: 1px solid var(--border-gold);
    color: var(--text-muted);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 90%;
    max-width: 360px;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    border: 1.5px solid var(--border-gold);
    color: var(--text-dark);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success { border-color: rgba(16, 185, 129, 0.5); color: #047857; }
.toast.error { border-color: rgba(239, 68, 68, 0.5); color: #b91c1c; }
.toast.warning { border-color: rgba(245, 158, 11, 0.5); color: #b45309; }
/* =========================================================
   COUNTDOWN PREPARATION OVERLAY (3 2 1 SMILE / READY)
   ========================================================= */
.camera-countdown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 14, 28, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.camera-countdown-overlay.show {
    display: flex;
}

.countdown-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5b958, #b8860b);
    border: 3px solid #ffffff;
    box-shadow: 0 0 35px rgba(229, 185, 88, 0.85), inset 0 0 15px rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    animation: countdownPop 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

#countdownNumber {
    font-size: 3rem;
    font-weight: 900;
    color: #1a1205;
    line-height: 1;
}

.countdown-text {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.6);
    padding: 0.35rem 0.95rem;
    border-radius: 50px;
    border: 1px solid rgba(229, 185, 88, 0.45);
}

@keyframes countdownPop {
    0% { transform: scale(0.65); opacity: 0.6; }
    50% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); opacity: 0.95; }
}
/* =========================================================
   SEARCHABLE EMPLOYEE SELECT DROPDOWN COMPONENT
   ========================================================= */
.searchable-select-wrap {
    position: relative;
    width: 100%;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #faf8f5;
    border: 1.5px solid var(--border-gold);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-box:focus-within, .search-input-box.open {
    border-color: var(--gold-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.12);
}

.search-icon-left {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}

.search-control-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.72rem 2.2rem 0.72rem 2.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark);
    outline: none;
}

.search-arrow-right {
    position: absolute;
    right: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    transition: transform 0.2s ease;
}

.search-input-box.open .search-arrow-right {
    transform: rotate(180deg);
    color: var(--gold-primary);
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1.5px solid var(--border-gold);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(184, 134, 11, 0.18), 0 4px 15px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: none;
    padding: 0.4rem;
}

.search-results-dropdown.show {
    display: block;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-item:hover, .search-item.active {
    background: #faf5eb;
}

.emp-avatar-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5b958, #b8860b);
    color: #1a1205;
    font-weight: 900;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-details {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.emp-name-text {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-sub-text {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
}

.emp-type-tag {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--gold-primary);
    background: rgba(184, 134, 11, 0.1);
    padding: 0.2rem 0.45rem;
    border-radius: 50px;
    border: 1px solid rgba(184, 134, 11, 0.25);
    flex-shrink: 0;
}

.search-item-empty {
    padding: 1rem;
    text-align: center;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}
/* =========================================================
   CENTERED EMPLOYEE SEARCH PICKER MODAL (GOLD THEME)
   ========================================================= */
.search-trigger-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #faf8f5;
    border: 1.5px solid var(--border-gold);
    border-radius: 12px;
    padding: 0.75rem 0.85rem 0.75rem 2.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-trigger-box:hover {
    border-color: var(--gold-primary);
    background: #ffffff;
}

.register-simple-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.selected-emp-placeholder {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    flex: 1;
}

.center-picker-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 22, 12, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1rem;
}

.center-picker-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.center-picker-card {
    background: #ffffff;
    border: 1.5px solid var(--border-gold);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(184, 134, 11, 0.22), 0 4px 20px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 410px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.88) translateY(15px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.center-picker-backdrop.show .center-picker-card {
    transform: scale(1) translateY(0);
}

.center-picker-header {
    padding: 1.15rem 1.25rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-gold);
}

.center-picker-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
}

.center-picker-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.15rem;
}

.btn-close-picker {
    background: #faf8f5;
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-close-picker:hover {
    background: var(--border-gold);
    color: var(--text-dark);
}

.center-search-bar {
    margin: 0.85rem 1.15rem 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    background: #faf8f5;
    border: 1.5px solid var(--border-gold);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
}

.center-search-bar svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.center-search-bar input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark);
    outline: none;
}

.center-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.picker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--border-gold);
    background: #ffffff;
    transition: all 0.2s ease;
}

.picker-item.available {
    cursor: pointer;
}

.picker-item.available:hover {
    background: #fdfaf2;
    border-color: var(--gold-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.12);
}

.picker-item.disabled {
    background: #faf8f5;
    opacity: 0.65;
    cursor: not-allowed;
    border-color: #eee7dc;
}

.picker-item-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5b958, #b8860b);
    color: #1a1205;
    font-weight: 900;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.picker-item-avatar.registered {
    background: #cbd5e1;
    color: #475569;
}

.picker-item-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.picker-emp-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-emp-nip {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.picker-status-tag {
    flex-shrink: 0;
}

.badge-tag-registered {
    font-size: 0.65rem;
    font-weight: 800;
    color: #475569;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    padding: 0.25rem 0.55rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-tag-available {
    font-size: 0.68rem;
    font-weight: 800;
    color: #b8860b;
    background: rgba(184, 134, 11, 0.12);
    border: 1px solid rgba(184, 134, 11, 0.35);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
}

.picker-item-empty {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}
/* =========================================================
   LANDING FOOTER COPYRIGHT BRANDING
   ========================================================= */
.landing-footer {
    text-align: center;
    padding: 1.25rem 1rem 2rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-icon {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* =========================================================
   PROFESSIONAL FACE REGISTRATION OVERLAY
   ========================================================= */
.face-reg-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    /* Radial gradient: lingkaran tengah transparan, luar gelap+hijau — kamera tetap terlihat */
    background: radial-gradient(
        circle 28vw at 50% 38%,
        transparent 0,
        transparent 28vw,
        rgba(16, 185, 129, 0.4) calc(28vw + 3px),
        rgba(0, 10, 5, 0.82) calc(28vw + 60px),
        rgba(0, 5, 3, 0.92) 100%
    );
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.face-reg-overlay.show {
    display: flex;
    opacity: 1;
}

/* Circle Mask - hanya untuk border lingkaran hijau bercahaya */
.face-reg-circle-mask {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(58vw, 260px);
    height: min(58vw, 260px);
    z-index: 2;
    pointer-events: none;
}

.face-reg-circle-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.3));
}

/* Glowing pulse animation for circle border */
.face-reg-circle-border {
    animation: faceRegPulse 2s ease-in-out infinite;
}

@keyframes faceRegPulse {
    0%, 100% { 
        stroke-width: 4; 
        stroke: #10b981;
        filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
    }
    50% { 
        stroke-width: 5; 
        stroke: #34d399;
        filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.7));
    }
}

/* Scanning line sweeping up and down */
.face-reg-scan-line {
    animation: faceRegScanSweep 2.5s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes faceRegScanSweep {
    0%   { transform: translateY(-60px); opacity: 0; }
    15%  { opacity: 0.8; }
    50%  { transform: translateY(60px); opacity: 0.8; }
    85%  { opacity: 0.8; }
    100% { transform: translateY(-60px); opacity: 0; }
}

/* Step Icons Container */
.face-reg-step-icon {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    display: none;
}

.face-reg-step-icon > div {
    display: none;
    animation: stepIconBounce 0.6s ease-out;
}

.face-reg-step-icon > div.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon-smile, .step-icon-blink {
    font-size: 48px;
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.6));
}

@keyframes stepIconBounce {
    0%   { transform: scale(0.3); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

/* Arrow icons positioning */
.step-icon-arrow-right {
    position: relative;
    left: 80px;
}

.step-icon-arrow-left {
    position: relative;
    right: 80px;
}

/* Instruction Text */
.face-reg-instruction {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    max-width: 85%;
    line-height: 1.5;
    transition: all 0.3s ease;
    display: none;
}

.face-reg-instruction.show {
    display: block;
    animation: instrFadeIn 0.4s ease-out;
}

@keyframes instrFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Progress Dots */
.face-reg-progress {
    position: absolute;
    bottom: 16%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: none;
    gap: 10px;
    align-items: center;
}

.face-reg-progress.show {
    display: flex;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s ease;
}

.progress-dot.active {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
    transform: scale(1.2);
}

.progress-dot.done {
    background: #10b981;
    border-color: #059669;
}

/* Step Counter */
.face-reg-step-counter {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: none;
}

.face-reg-step-counter.show {
    display: block;
}

/* Cancel Button during Guided Registration Steps */
.btn-cancel-reg-live {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.5rem;
    border-radius: 25px;
    border: 1.5px solid rgba(255, 80, 80, 0.5);
    background: rgba(30, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ff6b6b;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-reg-live.show {
    display: flex;
}

.btn-cancel-reg-live:active {
    transform: translateX(-50%) scale(0.95);
    background: rgba(255, 80, 80, 0.25);
}

/* =========================================================
   PREPARATION CARD (Step 0)
   ========================================================= */
.face-reg-prep {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.5rem;
}

.face-reg-prep.hidden {
    display: none;
}

.prep-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: prepCardSlideUp 0.5s ease-out;
}

@keyframes prepCardSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.prep-icon {
    font-size: 48px;
    margin-bottom: 0.5rem;
}

.prep-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.prep-rules {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.prep-rule {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
}

.prep-rule-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.btn-start-registration {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.btn-start-registration:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-cancel-registration {
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* =========================================================
   SUCCESS SCREEN
   ========================================================= */
.face-reg-success {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.face-reg-success.show {
    display: flex;
    animation: successFadeIn 0.5s ease-out;
}

@keyframes successFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.success-checkmark-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 3px solid #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    animation: checkmarkPop 0.6s ease-out;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.4);
}

@keyframes checkmarkPop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    color: #10b981;
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 12px rgba(16, 185, 129, 0.4);
}

.success-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 700;
}

/* Circle turns orange when capturing */
.face-reg-circle-border.capturing {
    stroke: #f59e0b;
    animation: captureFlash 0.5s ease-in-out;
}

@keyframes captureFlash {
    0%   { stroke: #10b981; stroke-width: 4; }
    50%  { stroke: #f59e0b; stroke-width: 7; }
    100% { stroke: #10b981; stroke-width: 4; }
}