/* ==========================================================================
   Face Pay - Premium Glassmorphic Biometric Style Sheet
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #070a13;
    --card-bg: rgba(15, 22, 42, 0.55);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(168, 85, 247, 0.4);
    
    --primary-gradient: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
    --cyan-gradient: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --emerald-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --purple: #a855f7;
    --cyan: #06b6d4;
    --emerald: #10b981;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    /* Effects & Shadows */
    --glass-blur: blur(16px);
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.25);
    --glow-cyan: 0 0 20px rgba(6, 118, 212, 0.25);
    --glow-emerald: 0 0 20px rgba(16, 185, 129, 0.25);
    --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    
    /* Layout */
    --max-width: 480px;
    --border-radius: 20px;
    --border-radius-sm: 12px;
}

/* ==========================================================================
   Base Elements & Background Blobs
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}


/* Ambient glow blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.blob-purple {
    width: 350px;
    height: 350px;
    background-color: var(--purple);
    top: 10%;
    left: -100px;
    animation: floatBlob 20s infinite alternate;
}

.blob-cyan {
    width: 400px;
    height: 400px;
    background-color: var(--cyan);
    bottom: 10%;
    right: -150px;
    animation: floatBlob 25s infinite alternate-reverse;
}

.blob-emerald {
    width: 250px;
    height: 250px;
    background-color: var(--emerald);
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
}

@keyframes floatBlob {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-50px) scale(1.15); }
}

/* App Container Wrapper */
.app-container {
    width: 100%;
    max-width: var(--max-width);
    min-height: 100vh;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    position: relative;
}

/* ==========================================================================
   Header Component
   ========================================================================== */

.glass-header {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-glow-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
    color: white;
}

.logo-section h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.accent-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.online {
    background-color: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
}

/* ==========================================================================
   Universal Glass Card & UI Elements
   ========================================================================== */

.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Interactive card effects */
.action-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 16px;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-hover-border);
    box-shadow: 0 25px 50px -12px rgba(168, 85, 247, 0.15);
}

.action-card.highlighted:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.15);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.icon-purple {
    background: var(--primary-gradient);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.icon-cyan {
    background: var(--cyan-gradient);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.action-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-arrow {
    position: absolute;
    right: 24px;
    top: 24px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.action-card:hover .card-arrow {
    transform: translateX(5px);
    color: var(--text-main);
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: var(--glow-purple);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    opacity: 0.95;
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}

.btn-primary.cyan-btn {
    background: var(--cyan-gradient);
    box-shadow: var(--glow-cyan);
}

.btn-primary.cyan-btn:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-full-width {
    width: 100%;
}

.btn-back {
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
    margin-bottom: 12px;
}

.btn-back:hover {
    color: var(--text-main);
}

/* ==========================================================================
   SPA View Routing Layer
   ========================================================================== */

.main-content {
    flex-grow: 1;
    position: relative;
}

.spa-view {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.spa-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Dashboard Components
   ========================================================================== */

.hero-section {
    text-align: center;
    margin: 12px 0 28px;
}

.hero-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 10px;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.security-banner {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.15);
}

.security-icon {
    font-size: 1.4rem;
    color: var(--emerald);
    flex-shrink: 0;
    margin-top: 2px;
}

.security-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--emerald);
    margin-bottom: 4px;
}

.security-text p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ==========================================================================
   Views: Common Header
   ========================================================================== */

.view-header {
    margin-bottom: 20px;
}

.view-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.view-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   Forms & Inputs (Register Screen)
   ========================================================================== */

.form-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1rem;
}

.input-wrapper input {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 14px 45px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
    background: rgba(15, 23, 42, 0.6);
}

.validation-status {
    position: absolute;
    right: 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.validation-status.valid {
    color: var(--emerald);
}

.validation-status.invalid {
    color: var(--danger);
}

.input-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Media/Capture Mode Swapping Grid */
.capture-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Media Containers & Camera Feeds
   ========================================================================== */

.media-container {
    height: 300px;
    padding: 0;
    overflow: hidden;
    position: relative;
    border-color: rgba(255, 255, 255, 0.05);
}

.scanner-container-height {
    height: 340px;
}

.media-box {
    width: 100%;
    height: 100%;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}

.media-box.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Live Camera Feed Elements */
.camera-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: black;
}

/* Camera Scanner Overlays */
.face-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-bracket {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 3px solid var(--purple);
}

.scanner-bracket.cyan-color {
    border-color: var(--cyan);
}

.top-left {
    top: 25px;
    left: 25px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 25px;
    right: 25px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 90px;
    left: 25px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 90px;
    right: 25px;
    border-left: none;
    border-top: none;
}

/* Specific alignments for scanning view */
#scan-camera-box .bottom-left { bottom: 85px; }
#scan-camera-box .bottom-right { bottom: 85px; }

.face-guide {
    width: 160px;
    height: 200px;
    border: 1px dashed rgba(168, 85, 247, 0.4);
    border-radius: 50%;
    margin-bottom: 60px; /* Offset to center it vertically above the camera controls */
    box-shadow: 0 0 0 1000px rgba(7, 10, 19, 0.45);
}

/* Scanner Animation Lines */
.scanner-line {
    position: absolute;
    width: calc(100% - 50px);
    height: 2px;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0) 0%, rgba(6, 182, 212, 0.8) 50%, rgba(6, 182, 212, 0) 100%);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
    top: 25px;
    animation: scanAnimation 3s infinite linear;
}

.upload-scanner-line {
    width: 100%;
    animation: scanAnimationFull 3.5s infinite linear;
}

@keyframes scanAnimation {
    0% { top: 25px; }
    50% { top: calc(100% - 90px); }
    100% { top: 25px; }
}

@keyframes scanAnimationFull {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

/* Biometric node overlay simulator */
.biometric-points-simulation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--cyan) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.15;
}

/* Camera controls bottom drawer overlay */
.camera-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
}

.btn-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shutter-btn {
    background: var(--primary-gradient);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
    font-size: 1.2rem;
}

.shutter-btn:hover {
    transform: scale(1.1);
}

.shutter-btn.cyan-btn {
    background: var(--cyan-gradient);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
}

/* File Upload drag/drop boxes */
.upload-box {
    background: rgba(15, 23, 42, 0.3);
    padding: 12px;
}

.drag-zone {
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
    text-align: center;
    padding: 20px;
}

.drag-zone:hover {
    border-color: var(--purple);
    background: rgba(168, 85, 247, 0.03);
}

.cloud-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.drag-zone:hover .cloud-icon {
    color: var(--purple);
}

.cloud-icon.cyan-text {
    color: var(--cyan);
}

.drag-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.drag-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Preview Zone after selection */
.preview-zone {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    position: relative;
}

.preview-zone img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.scanner-hint {
    display: flex;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 14px;
}

.scanner-hint i {
    color: var(--cyan);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* ==========================================================================
   Biometric Loader System
   ========================================================================== */

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 10, 19, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loader-overlay.active {
    display: flex;
}

.loader-content {
    max-width: 320px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border-color: rgba(6, 182, 212, 0.2);
}

.biometric-radar {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-circle {
    position: absolute;
    border: 1px solid var(--cyan);
    border-radius: 50%;
    animation: radarRipple 2s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8);
    opacity: 0;
}

.circle-1 { animation-delay: 0s; }
.circle-2 { animation-delay: 0.6s; }
.circle-3 { animation-delay: 1.2s; }

.radar-face {
    font-size: 2.2rem;
    color: var(--cyan);
    z-index: 2;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

@keyframes radarRipple {
    0% {
        width: 30px;
        height: 30px;
        opacity: 0.8;
    }
    100% {
        width: 90px;
        height: 90px;
        opacity: 0;
    }
}

.loader-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.loader-content p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar-fill {
    width: 30%;
    height: 100%;
    background: var(--cyan-gradient);
    border-radius: 10px;
    animation: loadingBarFill 1.8s infinite ease-in-out;
}

@keyframes loadingBarFill {
    0% { transform: translateX(-100%); width: 30%; }
    50% { width: 60%; }
    100% { transform: translateX(350%); width: 30%; }
}

/* ==========================================================================
   Drawer Component (Bottom Glass Sheet Modal)
   ========================================================================== */

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    justify-content: center;
    align-items: flex-end;
}

.drawer-overlay.active {
    display: flex;
}

.drawer-content {
    width: 100%;
    max-width: var(--max-width);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 30px 24px 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(11, 16, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.drawer-overlay.active .drawer-content {
    transform: translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.drawer-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Success Indicator */
.success-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    animation: scaleRing 2s infinite ease-out;
}

.check-icon {
    font-size: 3rem;
    color: var(--emerald);
    z-index: 2;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

@keyframes scaleRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.drawer-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.drawer-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

/* Recognized User Profile card */
.matched-profile {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    margin-bottom: 24px;
}

.profile-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--cyan);
}

.profile-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 4px;
    font-family: 'Space Grotesk', sans-serif;
    word-break: break-all;
}

.match-score {
    text-align: right;
}

.score-percentage {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--emerald);
}

.score-label {
    display: block;
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Apps redirect list grid */
.payment-apps-container {
    width: 100%;
    text-align: left;
}

.payment-apps-container h5 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.payment-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.payment-app-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    cursor: pointer;
    text-decoration: none;
    color: white;
    transition: all 0.25s ease;
}

.payment-app-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.app-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.payment-app-btn span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Payment App Visual Accents */
.gpay .app-logo {
    background: rgba(66, 133, 244, 0.15);
    color: #4285f4;
}
.gpay:hover { border-color: #4285f4; }

.phonepe .app-logo {
    background: rgba(95, 37, 159, 0.15);
    color: #5f259f;
}
.phonepe:hover { border-color: #5f259f; }

.paytm .app-logo {
    background: rgba(0, 185, 245, 0.15);
    color: #00b9f5;
}
.paytm:hover { border-color: #00b9f5; }

.bhim .app-logo {
    background: rgba(247, 147, 26, 0.15);
    color: #f7931a;
}
.bhim:hover { border-color: #f7931a; }

.margin-top-md {
    margin-top: 18px;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 400px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast.success {
    border-left: 4px solid var(--emerald);
}
.toast.success .toast-icon { color: var(--emerald); }

.toast.error {
    border-left: 4px solid var(--danger);
}
.toast.error .toast-icon { color: var(--danger); }

.toast.info {
    border-left: 4px solid var(--cyan);
}
.toast.info .toast-icon { color: var(--cyan); }

.toast-message {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
    text-align: center;
    padding: 24px 0 8px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: auto;
}

/* ==========================================================================
   Device Media Adaptations (Responsive Checks)
   ========================================================================== */

@media (max-width: 360px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
    .hero-section h2 {
        font-size: 1.5rem;
    }
    .media-container {
        height: 250px;
    }
    .scanner-container-height {
        height: 280px;
    }
    .face-guide {
        width: 140px;
        height: 185px;
    }
}

/* ==========================================================================
   Automatic Scanning Additions
   ========================================================================== */

.auto-scan-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.35);
    padding: 10px 22px;
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
    backdrop-filter: blur(8px);
}

.pulse-dot-cyan {
    width: 9px;
    height: 9px;
    background-color: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cyan);
    animation: pulseGlow 1.6s infinite ease-in-out;
}

.status-text-glow {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--cyan);
    text-shadow: 0 0 5px rgba(6, 182, 212, 0.3);
    font-family: 'Space Grotesk', sans-serif;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.55; }
    50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px var(--cyan); }
    100% { transform: scale(0.9); opacity: 0.55; }
}

/* Pulsing scanner brackets during auto-scan */
@keyframes bracketPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; filter: drop-shadow(0 0 4px var(--cyan)); }
    100% { opacity: 0.6; }
}

.scanner-bracket.cyan-pulse {
    animation: bracketPulse 2s infinite ease-in-out;
}

/* ==========================================================================
   Mobile-Native PWA Styling & Email Auth Extensions
   ========================================================================== */

.mobile-app-layout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.app-screen {
    width: 100%;
    max-width: var(--max-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.app-header-bar {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.glow-logo-icon {
    font-size: 1.25rem;
    color: var(--purple);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.app-header-bar h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.accent-glow {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.25));
}

.native-network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.pulse-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
    animation: simplePulse 1.8s infinite ease-in-out;
}

@keyframes simplePulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.app-viewport {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 100px; /* Large bottom padding to stay clear of floating Nav tab bar */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Auth Section Styles */
.auth-brand-section {
    text-align: center;
    margin: 40px 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.auth-logo-hex {
    width: 68px;
    height: 68px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
    transform: rotate(45deg);
    margin-bottom: 12px;
}

.auth-logo-hex i {
    transform: rotate(-45deg);
}

.auth-brand-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
}

.auth-brand-section p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-card {
    border-color: rgba(168, 85, 247, 0.15);
}

.auth-tabs {
    margin-bottom: 24px;
}

.auth-form {
    display: none;
    opacity: 0;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: scale(1);
}

.margin-top-sm {
    margin-top: 12px;
}

/* Dashboard Greeting */
.dashboard-greeting-header {
    margin: 8px 0 4px;
}

.dashboard-greeting-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
}

.dashboard-greeting-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Biometric Status Widget */
.biometric-status-widget {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(15, 22, 42, 0.45);
}

.widget-status-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.widget-title h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.widget-title p {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.widget-details {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-upi {
    display: flex;
    flex-direction: column;
}

.widget-upi-lbl {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.widget-upi-val {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    margin-top: 2px;
}

.widget-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--emerald);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.widget-badge.unlinked {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-sub-card {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-lbl {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.stat-sub-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-trendup {
    font-size: 0.85rem;
    color: var(--emerald);
}

.cyan-text-glow {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
}

.dashboard-activity h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.t-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.timeline-cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
}

.timeline-purple {
    background: rgba(168, 85, 247, 0.1);
    color: var(--purple);
}

.timeline-detail h5 {
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-detail p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Profile Tab Styles */
.profile-avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    margin: 12px auto 20px;
}

.profile-details-section {
    text-align: center;
    margin-bottom: 24px;
}

.profile-details-section h3 {
    font-size: 1.35rem;
    font-weight: 700;
}

.profile-email-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-meta-info {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-lbl {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.meta-val {
    font-size: 0.82rem;
    font-weight: 600;
}

.meta-val.highlight-val {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--cyan);
}

.profile-logout-btn {
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.04);
}

.profile-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Bottom Navigation Styling */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 76px;
    background: rgba(11, 16, 30, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    z-index: 400;
    padding-bottom: env(safe-area-inset-bottom, 12px);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.25s ease;
    height: 100%;
    justify-content: center;
}

.nav-tab i {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.nav-tab.active {
    color: var(--purple);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.nav-tab.active i {
    transform: translateY(-2px);
}

/* Floating middle action scanner tab */
.scan-accent-tab {
    position: relative;
}

.scan-tab-fab {
    width: 50px;
    height: 50px;
    background: var(--cyan-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.45);
    margin-top: -30px; /* Floating look */
    border: 3px solid #070a13;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-tab:hover .scan-tab-fab {
    transform: translateY(-2px);
}

.nav-tab.active .scan-tab-fab {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
    background: var(--cyan-gradient);
}

/* Auth Centered Vertical Column Shell */
#view-auth {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px 16px;
    gap: 16px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

#view-auth.active {
    display: flex !important;
}

.auth-brand-section {
    margin: 20px 0 12px !important;
}

.auth-card {
    width: 100%;
    max-width: 380px;
}



