:root {
    --primary: #1a56db;
    --primary-hover: #1e40af;
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --background: #f1f5f9;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-highlight: #cbd5e1;
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

:root.dark-theme {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary: #475569;
    --secondary-hover: #334155;
    --success: #10b981;
    --success-hover: #34d399;
    --danger: #f87171;
    --danger-hover: #ef4444;
    --background: #0f172a;
    --surface: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --border-highlight: #475569;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body { transition: background-color 0.3s ease, color 0.3s ease; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.app-container {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    width: 100%;
    max-width: 1000px;
    margin: auto;
    min-height: 650px;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
}
@media (min-width: 768px) { .app-container { flex-direction: row; } }

.sidebar {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 40px 30px;
    width: 100%;
}
@media (min-width: 768px) { .sidebar { width: 300px; min-height: 100%; } }

.brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 50px; }
.brand h2 { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 1.2rem; margin: 0; text-align: center; }
.brand i, .brand h2 i { font-size: 2.5rem; color: #60a5fa; }

.stepper { list-style: none; display: flex; flex-direction: column; gap: 25px; }
.step { display: flex; align-items: center; gap: 15px; opacity: 0.5; transition: all 0.3s; }
.step.active { opacity: 1; transform: translateX(5px); }
.step.completed { opacity: 0.8; }
.step-num {
    display: flex; justify-content: center; align-items: center;
    width: 35px; height: 35px; border-radius: 50%;
    background-color: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.3);
    font-weight: 600; transition: all 0.3s;
}
.step.active .step-num { background-color: var(--primary); border-color: var(--primary); box-shadow: 0 0 15px rgba(26, 86, 219, 0.5); }
.step.completed .step-num { background-color: var(--success); border-color: var(--success); color: white; }
.step-text { font-size: 1rem; font-weight: 500; }

.main-content {
    flex: 1;
    padding: 40px 50px;
    position: relative;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Scrollbar Personalizado */
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-track { background: transparent; margin-block: 10px; }
.main-content::-webkit-scrollbar-thumb { background-color: var(--border-highlight); border-radius: 10px; }
.main-content::-webkit-scrollbar-thumb:hover { background-color: var(--secondary); }

.form-step { display: none; }
.form-step.active { display: block; animation: slideInRight 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

.step-header { margin-bottom: 35px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.step-header h3 { font-size: 1.5rem; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.step-header h3 i { color: var(--primary); }
.step-header p { color: var(--text-muted); }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group.full-width { grid-column: 1 / -1; }
label { font-size: 0.9rem; font-weight: 500; }
input[type="text"], input[type="date"], input[type="email"], input[type="password"] {
    padding: 12px 15px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 1rem; font-family: 'Inter', sans-serif; transition: all 0.2s; background-color: var(--background); color: var(--text-main);
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15); background-color: var(--surface); }

/* --- OTP Inputs --- */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 15px 0 25px; }
.otp-input {
    width: 45px; height: 55px; text-align: center; font-size: 1.5rem; font-weight: 700;
    font-family: 'Inter', sans-serif; border: 2px solid var(--border); border-radius: 12px;
    background: var(--background); color: var(--primary); transition: all 0.25s; padding: 0 !important;
}
.otp-input:focus {
    outline: none; border-color: var(--primary); background: white;
    box-shadow: 0 0 0 4px rgba(0, 40, 104, 0.10); transform: scale(1.05);
}
.form-actions { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.btn {
    padding: 12px 24px; border-radius: var(--radius); font-size: 1rem; font-weight: 600;
    cursor: pointer; border: none; display: flex; align-items: center; gap: 10px; transition: all 0.2s; font-family: inherit;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background-color: var(--secondary); color: white; }
.btn-secondary:hover { background-color: var(--secondary-hover); }
.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: var(--success-hover); }
.btn-outline { background-color: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background-color: var(--background); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.photo-upload-area { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 20px; }
.upload-box {
    width: 100%; max-width: 400px; height: 250px; border: 2px dashed var(--border-highlight);
    border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 15px; cursor: pointer; background-color: var(--background); transition: all 0.2s; text-align: center; padding: 20px;
}
.upload-box:hover, .upload-box.dragover { border-color: var(--primary); background-color: rgba(26,86,219,0.05); }
.icon-large { font-size: 3rem; color: var(--primary); }
.hidden-input { display: none; }
.preview-area { display: flex; flex-direction: column; align-items: center; gap: 15px; }
#photo-preview { max-width: 250px; max-height: 250px; border-radius: var(--radius); object-fit: contain; }

.hands-container { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; }
.hand-box { flex: 1; min-width: 280px; background: #f8fafc; border: 1px solid var(--border); padding: 20px; border-radius: var(--radius); text-align: center; }
.hand-box h4 { margin-bottom: 20px; }
.fingers-grid { display: flex; justify-content: space-around; gap: 5px; }
.finger-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: transform 0.2s; font-size: 0.85rem; font-weight: 500; position: relative;}
.finger-item:hover { transform: translateY(-3px); }
.finger-item span { position: relative; z-index: 10; background-color: rgba(255, 255, 255, 0.85); padding: 2px 4px; border-radius: 4px; color: var(--text-main); font-weight: 600; text-align: center; font-size: 0.75rem; line-height: 1.1; max-width: 65px; word-wrap: break-word; }
.finger-status {
    width: 38px; height: 50px; border: 2px solid var(--border-highlight);
    border-radius: 19px 19px 8px 8px; background-color: #fff; display: flex; align-items: center; justify-content: center; transition: all 0.3s;
}
.finger-status::after { font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f577"; font-size: 1.1rem; color: var(--border-highlight); transition: all 0.3s; }
.finger-item.scanned .finger-status { border-color: var(--success); background-color: rgba(16, 185, 129, 0.1); }
.finger-item.scanned .finger-status::after { color: var(--success); }

/* Dashboard Premium Additions */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; background-color: #dbeafe; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-data { display: flex; flex-direction: column; }
.stat-title { font-size: 0.85rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 1.8rem; font-weight: bold; color: var(--text-main); }

/* Premium Futuristic Clock Widget */
.live-clock-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    padding: 12px 25px;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
    user-select: none;
}

/* Glowing multitone border on hover using mask */
.live-clock-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, #3b82f6, #a855f7, #10b981);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.live-clock-widget:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 15px 35px 0 rgba(59, 130, 246, 0.25);
    background: rgba(30, 41, 59, 0.7);
}

.live-clock-widget:hover::before {
    opacity: 1;
}

.clock-date {
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.clock-time {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Pulsing live dot */
.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
    animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
    0% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 0.4; transform: scale(0.8); }
}

.table-container th { background: #f8fafc; color: #475569; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; padding: 15px; border-bottom: 2px solid var(--border); }
.table-container td { padding: 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.status-badge { padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; text-align: center; display: inline-block; min-width: 100px; }
.status-pendiente { background: #fef08a; color: #b45309; }
.status-revision { background: #bae6fd; color: #0369a1; }
.status-completado { background: #bbf7d0; color: #166534; }
.status-correccion { background: #fecaca; color: #991b1b; animation: pulseRed 2s infinite; }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); } 70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }

.row-needs-correction { background-color: rgba(254, 226, 226, 0.4) !important; border-left: 4px solid #ef4444; }
.alert-icon { color: #dc2626; margin-right: 8px; font-size: 1.1rem; filter: drop-shadow(0 0 4px rgba(220,38,38,0.3)); cursor: help; }

.status-select { padding: 6px 10px; border-radius: var(--radius); border: 1px solid var(--border); font-family: inherit; font-size: 0.9rem; outline: none; background: var(--background); color: var(--text-main); cursor: pointer; }

/* --- MODERN USERS VIEW LAYOUT --- */
.modern-users-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: stretch;
    padding: 30px;
}

.user-form-card {
    flex: 1 1 320px;
    max-width: 420px;
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(100, 116, 139, 0.15);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.08);
    border-radius: 20px;
    padding: 30px;
    animation: slideInLeft 0.5s ease-out;
}

.user-form-card h3 {
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.modern-grid-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modern-grid-form .input-group {
    margin-bottom: 0;
}

.modern-grid-form .full-width {
    grid-column: 1 / -1;
}

.user-list-card {
    flex: 2 1 600px;
    min-width: 0;
    background: var(--surface);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(100, 116, 139, 0.1);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
    animation: slideInRight 0.5s ease-out;
}

.user-list-card h3 {
    margin-bottom: 25px;
    color: var(--text-main);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.modern-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    text-align: left;
}
.modern-table th {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0 15px 10px 15px;
}
.modern-table tbody tr {
    background: var(--background);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.modern-table tbody tr:hover {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.modern-table td {
    border: none;
    padding: 18px 25px;
    vertical-align: middle;
}
.modern-table td:first-child { border-radius: 12px 0 0 12px; }
.modern-table td:last-child { border-radius: 0 12px 12px 0; }

.user-avatar-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}
.user-info-text {
    display: flex;
    flex-direction: column;
}
.user-info-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}
.user-info-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Camera UI */
.camera-wrapper { position: relative; width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 3/4; background: #000; border-radius: var(--radius); overflow: hidden; display: none; }
.camera-wrapper video { width: 100%; height: 100%; object-fit: cover; }
.camera-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 30%); }
.btn-capture-photo { background: #ef4444; color: white; border: none; width: 60px; height: 60px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; border: 4px solid rgba(255,255,255,0.5); transition: all 0.2s; }
.btn-capture-photo:hover { background: #dc2626; transform: scale(1.05); }
.camera-preview { width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 3/4; display: none; background-color: var(--background); border-radius: var(--radius); border: 2px dashed var(--border-highlight); align-items: center; justify-content: center; overflow: hidden; }
.camera-preview img { width: 100%; height: 100%; object-fit: cover; }
.toolbar-box { display: flex; gap: 15px; margin-bottom: 20px; background: var(--surface); padding: 15px; border-radius: var(--radius); border: 1px solid var(--border); }
.search-box { flex: 1; display: flex; align-items: center; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 15px; }
.search-box i { color: #94a3b8; }
.search-box input { border: none; background: transparent; padding: 12px 10px; width: 100%; font-size: 1rem; color: var(--text-main); outline: none; }

.progress-bar-container { width: 100%; height: 8px; background-color: var(--border); border-radius: 4px; margin-top: 30px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background-color: var(--primary); transition: width 0.4s ease; }

.review-area { background-color: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 25px; }
.review-section { margin-bottom: 20px; }
.review-section h4 { border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 15px; color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.review-item { display: flex; justify-content: space-between; margin-bottom: 10px; padding: 8px; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-item strong { color: var(--text-muted); font-size: 0.85rem; }
.review-item span { color: var(--text-main); font-weight: 600; }

.success-message { text-align: center; padding: 50px 20px; animation: fadeIn 0.5s ease-out; }
.success-icon {
    width: 80px; height: 80px; background-color: var(--success); color: white; border-radius: 50%; display: flex; justify-content: center;
    align-items: center; font-size: 2.5rem; margin: 0 auto 20px; box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: white; padding: 30px; border-radius: var(--radius); width: 90%; max-width: 400px; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }

.mt-2 { margin-top: 10px; } .mt-4 { margin-top: 20px; } .text-center { text-align: center; }

/* --- MOVIL RESPONSIVE --- */
.dashboard-body-top { padding: 20px 30px 10px 30px; }
.dashboard-body-bottom { padding: 0 30px 20px 30px; }

/* Header base styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    gap: 15px;
    flex-wrap: wrap;
}
.header h2 { color: white; display: flex; align-items: center; gap: 10px; white-space: nowrap; }

/* 768px: tablet / mobile */
@media (max-width: 768px) {
    body { padding: 5px; }
    .app-container { height: auto; min-height: 100vh; flex-direction: column; overflow-y: visible; max-height: none; }
    .sidebar { padding: 15px 12px; }
    .brand { margin-bottom: 20px; }
    .brand h2 i { font-size: 1.8rem; }
    .stepper { flex-direction: row; flex-wrap: wrap; gap: 8px; justify-content: center; }
    .step-text { display: none; }
    .main-content { padding: 15px 12px; overflow-y: auto; max-height: none; }
    .form-grid { grid-template-columns: 1fr; }
    .hands-container { padding: 0; gap: 15px; }
    .fingers-grid { flex-wrap: wrap; justify-content: center; }
    .dashboard-container { min-height: 100vh; }

    /* Header: stacked and centered on mobile */
    .header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    .header h2 { font-size: 1.15rem; justify-content: center; }
    .header > div { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
    .header > div > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; }
    #logged-user-display { text-align: center; }
    .header button { padding: 7px 10px; font-size: 0.8rem; }

    .dashboard-body-top { padding: 12px 12px 8px 12px; }
    .dashboard-body-bottom { padding: 0 12px 12px 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
    .stat-card { padding: 12px; flex-direction: column; text-align: center; gap: 4px; }
    .stat-icon { width: 36px; height: 36px; font-size: 1rem; margin: 0 auto; }
    .stat-value { font-size: 1.2rem; }
    .stat-title { font-size: 0.7rem; }
    .toolbar-box { flex-direction: column; gap: 8px; padding: 10px; }
    .table-container { padding: 0; overflow-x: auto; }
    table { font-size: 0.8rem; }
    th, td { padding: 8px 5px; }
    .status-badge { padding: 3px 7px; font-size: 0.72rem; min-width: 0; }
    .modern-users-layout { padding: 12px; flex-direction: column; }
    .user-form-card, .user-list-card { padding: 15px 12px; max-width: 100%; }
    .login-container { padding: 20px 15px; }

    /* Clock: centered at bottom on mobile */
    .live-clock-widget {
        bottom: 12px;
        right: 50%;
        transform: translateX(50%);
        padding: 8px 20px;
        border-radius: 14px;
        white-space: nowrap;
    }
    .clock-time { font-size: 1.05rem; }
    .clock-date { font-size: 0.65rem; }
}

/* 480px: small phones */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .finger-item span { font-size: 0.62rem; max-width: 55px; }
    .finger-item[data-id="11"], .finger-item[data-id="12"] { margin-bottom: 10px; }
    .live-clock-widget { padding: 6px 14px; bottom: 8px; }
    .clock-time { font-size: 0.9rem; letter-spacing: 1px; }
}

/* --- AI PREMIUM LOGIN STYLES --- */
.login-ai-bg {
    position: relative;
    background-color: #030712;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1;
}

/* AI Glow Orbs - Dominican Colors */
.glow-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6; z-index: -1; animation: floatOrb 10s infinite alternate ease-in-out; }
.orb-blue { width: 400px; height: 400px; background: rgba(0, 40, 104, 0.7); top: -10%; left: -10%; animation-delay: 0s; }
.orb-red { width: 350px; height: 350px; background: rgba(206, 17, 38, 0.6); bottom: -10%; right: -5%; animation-delay: -5s; }
.orb-white { width: 200px; height: 200px; background: rgba(255, 255, 255, 0.4); top: 40%; left: 40%; filter: blur(100px); animation: pulseWhite 4s infinite alternate; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.2); }
}
@keyframes pulseWhite {
    0% { opacity: 0.2; transform: scale(0.8); }
    100% { opacity: 0.6; transform: scale(1.5); }
}

.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Subtle Animated border representing AI scanning */
.glass-panel::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 2px;
    background: linear-gradient(90deg, transparent, #CE1126, #ffffff, #002868, transparent);
    animation: scanLine 6s linear infinite;
    z-index: 10;
}
@keyframes scanLine {
    0% { left: -100%; } 100% { left: 200%; }
}

.login-header { text-align: center; margin-bottom: 25px; }

.ai-shield-icon {
    position: relative; width: 80px; height: 80px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(0, 40, 104, 0.2);
    border: 1px solid rgba(0, 40, 104, 0.5); box-shadow: 0 0 20px rgba(0, 40, 104, 0.4);
}
.ai-pulse { font-size: 2.5rem; color: #60a5fa; text-shadow: 0 0 15px #60a5fa; animation: pulseGlow 2s infinite alternate; }
@keyframes pulseGlow { 0% { text-shadow: 0 0 10px #60a5fa; opacity: 0.8; } 100% { text-shadow: 0 0 25px #3b82f6, 0 0 40px #60a5fa; opacity: 1; transform: scale(1.05); } }

.radar-scan {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    border: 2px solid transparent; border-top-color: #CE1126; border-right-color: transparent;
    animation: spinRadar 3s linear infinite; opacity: 0.7;
}
@keyframes spinRadar { 100% { transform: rotate(360deg); } }

.login-header h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: 1px; margin-bottom: 5px; }
.text-blue { color: #3B82F6; font-weight: 800; }
.text-red { color: #F87171; font-weight: 800; }
.text-white { color: #ffffff; }

.flag-bar { width: 60px; height: 4px; margin: 15px auto; background: linear-gradient(90deg, #002868 33%, #ffffff 33%, #ffffff 66%, #CE1126 66%); border-radius: 2px; }

.subtitle { color: #94a3b8; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }

.modern-form { display: flex; flex-direction: column; gap: 25px; }

.modern-input-group { position: relative; width: 100%; display: flex; flex-direction: column;}
.input-icon { position: absolute; left: 15px; top: 15px; color: #64748b; font-size: 1.1rem; transition: color 0.3s, text-shadow 0.3s; z-index: 2; pointer-events: none;}
.modern-input-group input {
    width: 100%; padding: 15px 15px 15px 45px; background: rgba(30, 41, 59, 0.5) !important;
    border: 1px solid rgba(100, 116, 139, 0.3) !important; border-radius: 12px !important;
    color: #f8fafc !important; font-size: 1rem; outline: none; transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}
.modern-input-group label {
    position: absolute; left: 45px; top: 15px;
    color: #64748b; font-size: 1rem; cursor: text; transition: all 0.3s ease; pointer-events: none;
}

/* Floating Label FX */
.modern-input-group input:focus, .modern-input-group input:not(:placeholder-shown) { border-color: #3b82f6 !important; background: rgba(30, 41, 59, 0.8) !important; }
.modern-input-group input:focus + label, .modern-input-group input:not(:placeholder-shown) + label {
    top: -10px; left: 15px; font-size: 0.75rem; color: #60a5fa; background: #0f172a; padding: 0 5px; border-radius: 4px; font-weight: 600;
}
.modern-input-group input:focus ~ .input-icon { color: #60a5fa; text-shadow: 0 0 10px rgba(96, 165, 250, 0.5); }

/* Input Glow FX */
.input-glow { position: absolute; inset: -2px; border-radius: 14px; background: linear-gradient(45deg, #002868, #CE1126, #3b82f6); z-index: -1; opacity: 0; filter: blur(5px); transition: opacity 0.3s; }
.modern-input-group input:focus ~ .input-glow { opacity: 0.5; }

.btn-ai-submit {
    margin-top: 10px; width: 100%; padding: 16px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #002868, #3b82f6); color: white;
    font-size: 1rem; font-weight: 700; font-family: 'Inter', sans-serif; letter-spacing: 1px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    position: relative; overflow: hidden; transition: all 0.3s;
    box-shadow: 0 10px 20px -5px rgba(0, 40, 104, 0.5);
}
.btn-ai-submit::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shineBtn 3s infinite;
}
@keyframes shineBtn { 0% { left: -100%; } 20% { left: 100%; } 100% { left: 100%; } }
.btn-ai-submit:hover { transform: translateY(-2px); box-shadow: 0 15px 25px -5px rgba(59, 130, 246, 0.6); background: linear-gradient(135deg, #1e3a8a, #60a5fa); }

.login-footer { margin-top: 25px; text-align: center; color: #475569; font-size: 0.75rem; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 8px; }
/* --- RESOURCES SECTION STYLES --- */
.resource-card {
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

.resource-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, #3b82f6, #ef4444);
    opacity: 0;
    transition: opacity 0.3s;
}

.resource-card:hover::after {
    opacity: 1;
}

.resource-icon {
    transition: transform 0.3s ease;
}

.resource-card:hover .resource-icon {
    transform: scale(1.1) rotate(5deg);
}
/* --- SMART PHONE INPUT COMPONENT --- */
.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    transition: all 0.2s;
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
    background: var(--surface);
}

.prefix-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 44px;
    background: rgba(0,0,0,0.03);
    border-right: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: var(--text-main);
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.prefix-trigger:hover {
    background: rgba(0,0,0,0.06);
}

.prefix-list {
    position: absolute;
    top: 50px;
    left: 0;
    width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 2000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.prefix-list.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.prefix-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.prefix-item:last-child {
    border-bottom: none;
}

.prefix-item:hover {
    background: var(--background);
}

.prefix-item .flag { 
    font-size: 1.4rem; 
    line-height: 1;
}
.flag {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    display: inline-block;
    vertical-align: middle;
}
.prefix-item .name { flex: 1; font-size: 0.85rem; color: var(--text-main); font-weight: 500; }
.prefix-item .code { font-weight: 600; font-size: 0.9rem; color: var(--primary); }

.phone-input-wrapper input {
    border: none !important;
    background: transparent !important;
    flex: 1;
    width: 100%;
    height: 44px;
    box-shadow: none !important;
    padding: 0 15px !important;
}

/* --- SWEETALERT2 MODERN & ELEGANT CUSTOM STYLES --- */
.swal-elegant-popup {
    background: var(--surface) !important;
    color: var(--text-main) !important;
    border-radius: 24px !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
    padding: 30px !important;
    font-family: 'Inter', sans-serif !important;
}

.swal-elegant-title {
    color: var(--text-main) !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

.swal-elegant-html {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--text-main) !important;
}

/* Elegant info card styling */
.swal-card-container {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.swal-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.swal-card-label {
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swal-card-label i {
    font-size: 1rem;
    color: var(--primary);
}

.swal-value {
    color: var(--text-main);
    font-weight: 700;
    text-align: right;
    word-break: break-all;
}

.swal-value.badge-expediente {
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(26, 86, 219, 0.2);
}

.swal-select-label {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: block;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Beautiful custom select input */
.swal-elegant-select {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', sans-serif !important;
    background-color: var(--background) !important;
    color: var(--text-main) !important;
    margin: 0 0 20px 0 !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 12px 12px !important;
    appearance: none !important;
}

.swal-elegant-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15) !important;
    background-color: var(--surface) !important;
}

.swal-elegant-select option {
    background-color: var(--surface) !important;
    color: var(--text-main) !important;
}

/* Elegant custom textarea input */
.swal-elegant-textarea {
    width: 100% !important;
    min-height: 120px !important;
    padding: 12px 15px !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', sans-serif !important;
    background-color: var(--background) !important;
    color: var(--text-main) !important;
    margin: 0 0 20px 0 !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    resize: vertical !important;
    box-shadow: none !important;
}

.swal-elegant-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15) !important;
    background-color: var(--surface) !important;
}

/* Green WhatsApp Button */
.swal-elegant-confirm {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 28px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.swal-elegant-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5) !important;
    filter: brightness(1.05) !important;
}

.swal-elegant-confirm:active {
    transform: translateY(0) !important;
}

/* Elegant cancel button */
.swal-elegant-cancel {
    background: var(--background) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 14px 28px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.swal-elegant-cancel:hover {
    background: var(--border) !important;
    color: var(--text-main) !important;
}

/* Elegant primary confirm/transition button */
.swal-elegant-confirm-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 28px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 15px rgba(26, 86, 219, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.swal-elegant-confirm-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(26, 86, 219, 0.5) !important;
    filter: brightness(1.05) !important;
}

.swal-elegant-confirm-primary:active {
    transform: translateY(0) !important;
}

/* Botón premium de eliminar/repetir huella (aparece al hacer hover sobre huellas escaneadas) */
.finger-item .btn-clear-finger {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 30;
    cursor: pointer;
}
.finger-item:hover .btn-clear-finger {
    opacity: 1;
    transform: scale(1);
}
.finger-item .btn-clear-finger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    transform: scale(1.15);
    box-shadow: 0 6px 8px rgba(0,0,0,0.25);
}

/* Indicador de casilla activa para el escaneo ZKTeco con animación de pulso */
.finger-item.active-scan-target .finger-status {
    border-color: var(--primary, #1a56db) !important;
    box-shadow: 0 0 12px rgba(26, 86, 219, 0.5) !important;
    animation: activePulse 2s infinite ease-in-out;
}
@keyframes activePulse {
    0% { transform: scale(1); box-shadow: 0 0 4px rgba(26, 86, 219, 0.3); }
    50% { transform: scale(1.04); box-shadow: 0 0 15px rgba(26, 86, 219, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 4px rgba(26, 86, 219, 0.3); }
}

/* ==========================================================================
   ESTILOS PREMIUM: SISTEMA BIOMÉTRICO ZKTECO Y ACCESO FLOTANTE MULTI-ENTORNO
   ========================================================================== */

/* 1. BARRA DE ESTADO DE LA BIOMETRÍA EN EL WIZARD */
.zkteco-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 22px;
    border-radius: 14px;
    margin-top: 15px;
    margin-bottom: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.zkteco-status-bar.offline {
    border: 1px solid rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.05);
}

.zkteco-status-bar.online {
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.06);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-text {
    font-size: 0.92rem;
    color: var(--text-main);
}

.status-text strong {
    font-weight: 600;
}

.status-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 2. PUNTOS DE PULSO GLOWING ANIMADOS */
.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.offline .pulse-dot,
.zkteco-floating-pill.offline .pulse-dot {
    background-color: #f59e0b;
    box-shadow: 0 0 8px #f59e0b, 0 0 15px #f59e0b;
    animation: pulseYellow 2s infinite ease-in-out;
}

.online .pulse-dot,
.zkteco-floating-pill.online .pulse-dot {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981, 0 0 15px #10b981;
    animation: pulseGreen 2s infinite ease-in-out;
}

@keyframes pulseGreen {
    0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulseYellow {
    0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* 3. BOTONES DE ACCIÓN DE BIOMETRÍA */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.btn-action.download {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.btn-action.download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    filter: brightness(1.05);
}

.btn-action.start {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.btn-action.start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
    filter: brightness(1.05);
}

.btn-action.help {
    background: var(--background);
    color: var(--text-main);
    border: 1px solid var(--border-highlight);
}

.btn-action.help:hover {
    background: var(--border);
    color: var(--text-main);
    transform: translateY(-1px);
}

.badge-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* 4. WIDGET FLOTANTE DE CONTROL DE BIOMETRÍA (ACCESO RÁPIDO) */
#zkteco-floating-widget {
    position: fixed;
    bottom: 25px;
    right: 85px; /* Al lado del botón de tema */
    z-index: 9990;
    font-family: 'Inter', sans-serif;
}

/* El botón circular / pastilla compacta */
.zkteco-floating-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(255, 255, 255, 0.85);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.zkteco-floating-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.zkteco-floating-pill i.fa-fingerprint {
    font-size: 1.15rem;
    color: var(--primary);
}

.zkteco-floating-pill span.pill-label {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* El panel flotante expandible */
.zkteco-floating-card {
    position: absolute;
    bottom: 55px;
    right: 0;
    width: 320px;
    border-radius: 16px;
    backdrop-filter: blur(18px) saturate(190%);
    -webkit-backdrop-filter: blur(18px) saturate(190%);
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
    padding: 18px;
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.zkteco-floating-card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Cabecera del Panel */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 10px;
}

.card-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h4 i {
    color: var(--primary);
}

.btn-close-card {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.btn-close-card:hover {
    color: #ef4444;
}

/* Área de Estado */
.card-status-info {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.card-status-info i.status-icon {
    font-size: 1.25rem;
    margin-top: 2px;
}

.card-status-info.online i.status-icon {
    color: #10b981;
}

.card-status-info.offline i.status-icon {
    color: #f59e0b;
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.status-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.status-desc {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.35;
}

/* Acciones */
.card-actions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-actions-list .btn-action {
    justify-content: center;
    width: 100%;
    padding: 10px 15px;
    font-size: 0.88rem;
}

/* ADAPTACIONES AL TEMA OSCURO */
.dark-theme .zkteco-floating-pill {
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-theme .zkteco-floating-pill i.fa-fingerprint {
    color: #60a5fa;
}

.dark-theme .zkteco-floating-card {
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.dark-theme .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dark-theme .card-header h4 {
    color: #f8fafc;
}

.dark-theme .card-header h4 i {
    color: #60a5fa;
}

.dark-theme .btn-close-card {
    color: #94a3b8;
}

.dark-theme .btn-close-card:hover {
    color: #f87171;
}

.dark-theme .card-status-info {
    background: rgba(255, 255, 255, 0.03);
}

.dark-theme .status-title {
    color: #f8fafc;
}

.dark-theme .status-desc {
    color: #94a3b8;
}

.dark-theme .btn-action.help {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-theme .btn-action.help:hover {
    background: rgba(255, 255, 255, 0.1);
}



