* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) var(--bg-secondary);
}

:root {
    --primary: #635bff;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes borderGlow {
    0%, 100% { border-color: var(--primary); box-shadow: 0 0 20px rgba(99, 91, 255, 0.3); }
    50% { border-color: var(--primary-light); box-shadow: 0 0 40px rgba(99, 91, 255, 0.5); }
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes checkmark {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

@keyframes checkmarkScale {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

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

@keyframes successBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg-primary) 50%);
    animation: fadeIn 0.6s ease-out;
}

.login-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease-out;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 24px;
    animation: float 3s ease-in-out infinite;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.2);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 91, 255, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 12px 24px;
    white-space: nowrap;
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: var(--warning);
}

.btn-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--danger);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.override-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
}

/* Dashboard */
.dashboard {
    display: none;
    min-height: 100vh;
    background: var(--bg-primary);
}

.dashboard.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

header h1 {
    font-size: 18px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    animation: slideUp 0.5s ease-out;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* KYC List */
.kyc-list {
    display: grid;
    gap: 12px;
    animation: slideUp 0.5s ease-out 0.1s both;
}

.kyc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    animation: scaleIn 0.3s ease-out;
}

.kyc-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateX(4px);
}

.kyc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.kyc-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kyc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.kyc-card-title h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.kyc-card-title span {
    font-size: 13px;
    color: var(--text-muted);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-pending::before {
    background: var(--warning);
    animation: pulse 2s infinite;
}

.status-verified {
    background: var(--success-bg);
    color: var(--success);
}

.status-verified::before {
    background: var(--success);
}

.status-failed {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-failed::before {
    background: var(--danger);
}

/* Real-time status update animations */
.status-updating {
    animation: statusPulseOut 0.15s ease-out;
}

.status-updated {
    animation: statusPulseIn 0.35s ease-out;
}

@keyframes statusPulseOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

@keyframes statusPulseIn {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Real-time attempts count update animations */
.attempts-updating {
    animation: attemptsFlash 0.15s ease-out;
}

.attempts-updated {
    animation: attemptsPop 0.35s ease-out;
}

@keyframes attemptsFlash {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.3; transform: scale(0.9); }
}

@keyframes attemptsPop {
    0% { opacity: 0.3; transform: scale(0.9); color: var(--primary); }
    50% { transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); color: inherit; }
}

.kyc-card-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.kyc-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kyc-card-actions {
    display: flex;
    gap: 8px;
}

.kyc-card-actions .btn {
    padding: 10px 16px;
    font-size: 13px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

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

.modal {
    background: var(--bg-secondary);
    border-radius: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Details Modal */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

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

.detail-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px;
    overflow: hidden;
}

.detail-item label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.detail-item span {
    font-weight: 500;
}

.detail-item .detail-id {
    font-weight: 400;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
}

.attempt-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.attempt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.attempt-header strong {
    font-size: 14px;
}

.attempt-time {
    font-size: 12px;
    color: var(--text-muted);
}

.attempt-media {
    margin-top: 12px;
}

.attempt-media h4 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.media-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: center;
}

.media-grid img,
.media-grid video {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    object-fit: cover;
    flex-shrink: 0;
}

.media-grid img:hover,
.media-grid video:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Media status colors */
.media-success {
    border: 3px solid var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.media-failed {
    border: 3px solid var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.media-duplicate {
    border: 3px solid #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    animation: duplicatePulse 1.5s ease-in-out infinite;
}

@keyframes duplicatePulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
    }
}

/* Modal animation for nested modals */
.modal.modal-animate {
    animation: modalSlideIn 0.3s ease-out;
}

.modal.modal-animate-out {
    animation: modalSlideOut 0.2s ease-in forwards;
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    min-width: 280px;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

/* Verification Page */
.verify-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg-primary) 50%);
}

.verify-header {
    padding: 20px 24px;
    display: flex;
    justify-content: center;
    animation: slideDown 0.5s ease-out;
}

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

.verify-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.verify-logo span {
    font-weight: 600;
    font-size: 16px;
}

.verify-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.verify-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.5s ease-out;
}

.greeting-section {
    text-align: center;
    margin-bottom: 24px;
    animation: slideUp 0.5s ease-out 0.1s both;
}

.greeting-section h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.greeting-section p {
    color: var(--text-secondary);
    font-size: 15px;
}

.loading-section {
    text-align: center;
    padding: 48px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-section p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Pre-verification (no camera) */
.pre-verify-section {
    text-align: center;
    padding: 20px 0;
}

.pre-verify-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.pre-verify-section h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.pre-verify-section p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
}

.pre-verify-steps {
    text-align: left;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px 16px 16px 20px;
    margin-bottom: 24px;
    list-style: none;
}

.pre-verify-steps li {
    padding: 10px 0 10px 36px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.pre-verify-steps li:last-child {
    border-bottom: none;
}

.pre-verify-steps li::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.video-section {
    position: relative;
    margin-bottom: 24px;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

.video-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 4/3;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.face-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 220px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.face-guide.active {
    border-color: var(--primary);
    animation: borderGlow 2s ease-in-out infinite;
}

.face-guide.success {
    border-color: var(--success);
    animation: successPulse 1s ease-out;
}

.liveness-indicator {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.liveness-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.liveness-dot.good {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.liveness-dot.bad {
    background: var(--danger);
}

.instruction-display {
    text-align: center;
    margin-bottom: 24px;
    animation: slideUp 0.5s ease-out 0.3s both;
}

.current-instruction {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
    background-size: 200% 100%;
}

.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.step-dot.complete {
    background: var(--success);
}

.step-dot.failed {
    background: var(--danger);
}

.action-section {
    animation: slideUp 0.5s ease-out 0.4s both;
}

.btn-verify {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.4);
}

.btn-verify:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 91, 255, 0.5);
}

.btn-verify:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Success Screen */
.success-section {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease-out;
}

.success-checkmark {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
}

.checkmark-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: circleGrow 0.5s ease-out, successPulse 2s ease-out 0.5s;
}

.checkmark-svg {
    width: 60px;
    height: 60px;
    animation: checkmarkScale 0.5s ease-out 0.3s both;
}

.checkmark-svg path {
    fill: none;
    stroke: var(--success);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.8s ease-out 0.5s forwards;
}

.success-section h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--success);
    animation: slideUp 0.5s ease-out 0.6s both;
}

.success-section p {
    color: var(--text-secondary);
    font-size: 16px;
    animation: slideUp 0.5s ease-out 0.7s both;
}

/* Fail Screen */
.fail-section {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease-out;
}

.fail-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--danger-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    animation: circleGrow 0.5s ease-out;
}

.fail-section h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--danger);
}

.fail-section p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

/* Result section */
.result-section {
    text-align: center;
    padding: 20px 0;
    animation: scaleIn 0.5s ease-out;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 2s ease-in-out infinite;
}

.result-section h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.result-section p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.retry-notice {
    background: var(--warning-bg);
    color: var(--warning);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
}

.error-section {
    text-align: center;
    padding: 48px 20px;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.error-section h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.error-section p {
    color: var(--text-secondary);
}

/* Tips panel */
.tips-panel {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.tips-panel h4 {
    color: var(--warning);
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-panel li {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.tips-panel li::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: var(--warning);
}

/* Search & Filter Bar */
.filters-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-box input {
    width: 100%;
    padding: 10px 36px 10px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 14px;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--border);
    border: none;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: var(--danger);
    color: white;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filters-bar select {
    padding: 10px 32px 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    min-width: 130px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filters-bar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    border-color: var(--border-light);
    background: var(--bg-primary);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-custom::after {
    content: '✓';
    font-size: 10px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.result-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
    padding: 0 8px;
}

/* Full ID Display */
.kyc-id {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 3px 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
    vertical-align: middle;
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kyc-id:hover {
    color: var(--primary);
    background: rgba(99, 91, 255, 0.15);
    max-width: 300px;
}

.detail-id {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.detail-id::after {
    content: '📋';
    font-size: 11px;
    opacity: 0.6;
}

.detail-id:hover {
    border-color: var(--primary);
    background: rgba(99, 91, 255, 0.1);
    color: var(--text-primary);
}

.detail-id:hover::after {
    opacity: 1;
}

/* Hidden Verification Styles */
.kyc-card-hidden {
    opacity: 0.5;
    border-style: dashed;
    background: transparent;
}

.kyc-card-hidden:hover {
    opacity: 0.75;
    background: var(--bg-card);
}

.hidden-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--warning);
    background: var(--warning-bg);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Override Buttons Grid */
.override-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.override-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 4px;
}

.override-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.override-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.override-btn-icon {
    font-size: 20px;
    font-weight: 600;
}

.override-btn-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.override-btn-verified {
    border-color: rgba(34, 197, 94, 0.3);
}

.override-btn-verified:hover:not(:disabled) {
    border-color: var(--success);
    background: var(--success-bg);
}

.override-btn-verified .override-btn-icon {
    color: var(--success);
}

.override-btn-verified.active {
    border-color: var(--success);
    background: var(--success-bg);
}

.override-btn-failed {
    border-color: rgba(239, 68, 68, 0.3);
}

.override-btn-failed:hover:not(:disabled) {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.override-btn-failed .override-btn-icon {
    color: var(--danger);
}

.override-btn-failed.active {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.override-btn-pending {
    border-color: rgba(245, 158, 11, 0.3);
}

.override-btn-pending:hover:not(:disabled) {
    border-color: var(--warning);
    background: var(--warning-bg);
}

.override-btn-pending .override-btn-icon {
    color: var(--warning);
}

.override-btn-pending.active {
    border-color: var(--warning);
    background: var(--warning-bg);
}

/* Device Info Styles */
.device-info-section {
    margin-top: 12px;
}

.device-info-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-info-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.toggle-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.device-info-content {
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    animation: fadeIn 0.2s ease;
}

.device-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.device-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.device-info-item.device-info-full {
    grid-column: span 2;
}

.device-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.device-value {
    font-size: 12px;
    color: var(--text-primary);
    word-break: break-word;
}

.device-value-small {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: monospace;
    line-height: 1.4;
}

/* Activity Log Styles */
.activity-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-log-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
}

.log-main-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: 0;
}

.activity-log-item-expandable .log-main-content {
    cursor: pointer;
}

.activity-log-item-expandable .log-main-content:hover {
    background: var(--bg-secondary);
    border-radius: 8px;
}

.log-expanded .log-main-content {
    border-radius: 8px 8px 0 0;
}

.log-expand-arrow {
    font-size: 10px;
    color: var(--text-muted);
    margin-right: -4px;
    flex-shrink: 0;
}

.log-expanded-content {
    padding: 0 12px 12px 32px;
    border-top: 1px solid var(--border);
    margin-top: 0;
}

.log-device-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 10px;
}

.device-info-row {
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.device-info-row .info-label {
    color: var(--text-muted);
    min-width: 80px;
}

.device-info-row .info-value {
    color: var(--text-primary);
    font-family: monospace;
}

.log-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.log-label {
    font-weight: 500;
    color: var(--text-primary);
    flex-shrink: 0;
}

.log-detail {
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.log-reason {
    font-style: italic;
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.log-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Activity Log Animation for new items */
.activity-log-item-new {
    opacity: 0;
    transform: translateY(-10px);
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--success);
    transition: all 0.4s ease-out;
}

.activity-log-item-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade background highlight after appearing */
.activity-log-item-new.activity-log-item-visible {
    animation: logItemHighlight 3s ease-out forwards;
}

@keyframes logItemHighlight {
    0% {
        background: rgba(76, 175, 80, 0.15);
        border-color: var(--success);
    }
    70% {
        background: rgba(76, 175, 80, 0.08);
        border-color: var(--success);
    }
    100% {
        background: var(--bg-card);
        border-color: var(--border);
    }
}

/* Attempt card animation for new items */
.attempt-card-new {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease-out;
}

.attempt-card-new.attempt-card-visible {
    opacity: 1;
    transform: translateY(0);
    animation: attemptCardHighlight 3s ease-out forwards;
}

@keyframes attemptCardHighlight {
    0% {
        box-shadow: 0 0 0 2px var(--success);
        background: rgba(76, 175, 80, 0.1);
    }
    70% {
        box-shadow: 0 0 0 2px var(--success);
        background: rgba(76, 175, 80, 0.05);
    }
    100% {
        box-shadow: none;
        background: var(--bg-card);
    }
}

/* Media Animation for new items */
.media-new {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease-out;
}

.media-new.media-visible {
    opacity: 1;
    transform: scale(1);
    animation: mediaHighlight 2s ease-out forwards;
}

@keyframes mediaHighlight {
    0% {
        box-shadow: 0 0 0 3px var(--success);
    }
    70% {
        box-shadow: 0 0 0 3px var(--success);
    }
    100% {
        box-shadow: none;
    }
}

/* Small Modal */
.modal-small {
    max-width: 440px;
}

.modal-small .modal-body {
    padding: 20px 24px;
}

.modal-small .modal-body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Biometric Toggle */
.biometric-toggle-container {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.biometric-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.biometric-toggle-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.biometric-toggle-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Disabled toggle state */
.toggle-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-disabled .toggle-slider {
    cursor: not-allowed;
    background-color: var(--bg-secondary);
}

.biometric-disabled .biometric-toggle-desc {
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .kyc-card-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .kyc-card-actions {
        flex-wrap: wrap;
    }
    
    .modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }
    
    .verify-box {
        padding: 24px;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-bar select {
        width: 100%;
    }
    
    .result-count {
        margin-left: 0;
        text-align: center;
    }
    
    .device-info-grid {
        grid-template-columns: 1fr;
    }
    
    .device-info-item.device-info-full {
        grid-column: span 1;
    }
    
    .activity-log-item {
        flex-direction: column;
        gap: 6px;
    }
    
    .log-time {
        margin-left: 0;
    }
}
