:root {
    --primary: #00f0ff;
    --secondary: #ff00e5;
    --success: #00ff88;
    --danger: #ff0044;
    --warning: #ffaa00;
    --dark: #0a0a1a;
    --darker: #050510;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-glow: 0 0 20px rgba(0, 240, 255, 0.5);
    --neon-glow-strong: 0 0 40px rgba(0, 240, 255, 0.8);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--dark);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Partículas de Fundo Animadas */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 0, 229, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 100%);
    z-index: -1;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Grid Futurista */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Header Futurista */
.header-glass {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.header-glass::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 240, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

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

.logo-icon {
    font-size: 2em;
    animation: pulse 2s infinite;
}

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

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.datetime {
    text-align: center;
}

.clock-digital {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary);
    text-shadow: var(--neon-glow);
    letter-spacing: 2px;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { text-shadow: var(--neon-glow); }
    50% { text-shadow: var(--neon-glow-strong); }
}

.date-digital {
    color: #888;
    font-size: 1.1em;
    margin-top: 5px;
}

/* Painéis de Vidro */
.glass-effect {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.glass-effect:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
    transform: translateY(-2px);
}

.panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon {
    font-size: 1.2em;
    animation: iconFloat 3s ease-in-out infinite;
}

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

/* Botões Futuristas */
.btn-neon, .btn-futuristic {
    padding: 15px 30px;
    background: linear-gradient(45deg, var(--primary), #0099ff);
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-neon::before, .btn-futuristic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-neon:hover::before, .btn-futuristic:hover::before {
    left: 100%;
}

.btn-neon:hover, .btn-futuristic:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3);
}

.btn-capture {
    background: linear-gradient(45deg, #ffaa00, #ff6600);
}

.btn-success {
    background: linear-gradient(45deg, var(--success), #00cc66);
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger), #cc0033);
}

.btn-futuristic:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

/* Métodos de Identificação */
.identification-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.method-card {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.method-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.method-card:hover {
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
    transform: translateY(-5px);
}

.method-icon {
    font-size: 3em;
    margin-bottom: 15px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.method-card h3 {
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
}

/* Caixa de Busca */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
    background: rgba(0, 240, 255, 0.05);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(20px);
}

.search-results.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.search-result-item {
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.search-result-item:hover {
    background: rgba(0, 240, 255, 0.1);
    padding-left: 20px;
}

.search-result-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* Câmera */
.camera-container {
    position: relative;
    margin: 20px 0;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
}

.camera-container video {
    width: 100%;
    max-height: 400px;
    border-radius: 15px;
    display: block;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    box-shadow: var(--neon-glow);
    animation: scan 3s infinite;
}

@keyframes scan {
    0%, 100% { top: 0; opacity: 1; }
    50% { top: calc(100% - 2px); opacity: 0.5; }
}

/* Tabs */
.method-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    position: relative;
    overflow: hidden;
}

.tab-btn.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #000;
    font-weight: bold;
    box-shadow: var(--neon-glow);
}

/* Card do Funcionário */
.employee-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 229, 0.1));
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.employee-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: var(--neon-glow);
    object-fit: cover;
    animation: photoGlow 3s ease-in-out infinite;
}

@keyframes photoGlow {
    0%, 100% { box-shadow: var(--neon-glow); }
    50% { box-shadow: var(--neon-glow-strong); }
}

.employee-info {
    flex: 1;
}

.employee-info h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.employee-info p {
    color: #888;
    margin-bottom: 3px;
}

.status-badge {
    padding: 8px 16px;
    background: var(--success);
    color: #000;
    border-radius: 50px;
    font-weight: bold;
    animation: badgePulse 2s ease-in-out infinite;
}

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

/* Responsividade */
@media (max-width: 768px) {
    .header-glass {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .identification-methods {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-futuristic {
        width: 100%;
    }
    
    .clock-digital {
        font-size: 2em;
    }
}

/* ========== MELHORIAS GERAIS ========== */
* {
    -webkit-tap-highlight-color: transparent;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ========== GRID OVERLAY ========== */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* ========== HEADER MELHORADO ========== */
.header-glass {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 30px;
    margin-bottom: 30px;
}

.btn-admin-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 240, 255, 0.1);
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.btn-admin-link:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 30px var(--primary);
    transform: translateY(-2px);
}

/* ========== IDENTIFICATION PANEL ========== */
.identification-panel {
    margin-bottom: 30px;
    padding: 30px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5em;
    margin-bottom: 25px;
    color: var(--primary);
}

.panel-title .icon {
    font-size: 1.3em;
    filter: drop-shadow(0 0 10px var(--primary));
}

.identification-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.method-card {
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    display: none;
}

.method-card.active {
    display: block;
    animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.method-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.method-icon {
    font-size: 3em;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px var(--primary));
}

.method-card h3 {
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
}

/* ========== SEARCH BOX ========== */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-size: 1.1em;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary);
    background: rgba(0, 0, 0, 0.7);
}

.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.5);
    text-align: left;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: rgba(10, 10, 26, 0.95);
    border: 2px solid var(--primary);
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-results:empty {
    display: none;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.search-result-item:hover {
    background: rgba(0, 240, 255, 0.1);
}

.search-result-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* ========== METHOD TABS ========== */
.method-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.method-tabs .tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.method-tabs .tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 30px var(--primary);
}

.method-tabs .tab-btn:hover:not(.active) {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.1);
}

/* ========== EMPLOYEE CARD ========== */
.employee-card {
    display: none;
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    animation: slideInDown 0.5s ease;
}

.employee-card.show {
    display: flex !important;
    gap: 25px;
    align-items: center;
}

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

.employee-photo-container {
    position: relative;
    flex-shrink: 0;
}

.employee-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px var(--primary);
}

.employee-photo-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.employee-info {
    flex: 1;
}

.employee-name {
    font-size: 1.5em;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    margin-bottom: 5px;
}

.employee-role {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.employee-schedule {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.employee-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-cancel-selection {
    background: rgba(255, 0, 68, 0.2);
    border: 2px solid var(--danger);
    color: var(--danger);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel-selection:hover {
    background: var(--danger);
    color: #fff;
    transform: rotate(90deg);
}

/* ========== REGISTRATION PANEL ========== */
.registration-panel {
    margin-bottom: 30px;
    padding: 30px;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 25px;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.3);
}

.camera-container video {
    width: 100%;
    height: auto;
    display: block;
}

.camera-status {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    z-index: 10;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.registration-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
}

.info-label {
    display: block;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary);
}

.capture-preview {
    margin-top: 20px;
    text-align: center;
}

.captured-photo {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    border: 3px solid var(--success);
    box-shadow: 0 0 30px var(--success);
    margin-bottom: 15px;
}

.btn-retake {
    padding: 10px 20px;
    background: rgba(0, 240, 255, 0.1);
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-retake:hover {
    background: var(--primary);
    color: #000;
}

/* ========== ACTION BUTTONS ========== */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.btn-futuristic {
    padding: 18px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.btn-futuristic:hover::before {
    width: 300px;
    height: 300px;
}

.btn-futuristic:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-capture {
    background: linear-gradient(135deg, #ff00e5, #cc00b8);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 0, 229, 0.4);
}

.btn-capture:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 0, 229, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #ff0044, #cc0033);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 0, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 0, 68, 0.6);
}

/* ========== HISTORY PANEL ========== */
.history-panel {
    padding: 30px;
}

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

.history-count {
    background: var(--primary);
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 0 20px var(--primary);
}

.records-list {
    display: grid;
    gap: 15px;
}

.record-item {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
    transition: all 0.3s;
}

.record-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.record-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.record-info h4 {
    margin-bottom: 5px;
    color: var(--primary);
}

.record-info p {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.record-time {
    text-align: right;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-size: 1.2em;
}

/* ========== FOOTER ========== */
.footer-glass {
    margin-top: 40px;
    padding: 20px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    text-shadow: 0 0 10px var(--primary);
}

/* ========== TOAST CONTAINER ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 20px;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.4s ease;
    border-left: 4px solid;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

.toast.info {
    border-left-color: var(--primary);
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 240, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

#loadingText {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-size: 1.2em;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .header-glass {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .datetime {
        order: -1;
    }
    
    .identification-methods {
        grid-template-columns: 1fr;
    }
    
    .employee-card.show {
        flex-direction: column;
        text-align: center;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .registration-info {
        grid-template-columns: 1fr;
    }
    
    .record-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .record-photo {
        margin: 0 auto;
    }
    
    .record-time {
        text-align: center;
    }
}

/* ========== FACE RECOGNITION ========== */
.face-recognition {
    position: relative;
}

.face-recognition video {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    border: 3px solid var(--primary);
    margin-bottom: 15px;
}

.face-status,
.voice-status {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== VOICE RECOGNITION ========== */
.voice-recognition {
    text-align: center;
}

#voiceButton {
    padding: 20px 40px;
    font-size: 1.1em;
}

.voice-result {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 240, 255, 0.1);
    border: 2px solid var(--primary);
    border-radius: 10px;
    color: var(--primary);
    font-weight: 600;
}

.voice-result:empty {
    display: none;
}

/* ========== MODAIS DE AJUDA E PRIVACIDADE ========== */
.modal-help,
.modal-privacy {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-help .modal-content,
.modal-privacy .modal-content {
    position: relative;
    max-width: 650px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a3a 0%, #0a0a1a 100%);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 0 40px rgba(0, 240, 255, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5em;
    background: linear-gradient(45deg, #00f0ff, #ff00e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    background: #ff0044;
    transform: rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.5);
}

.modal-body {
    color: #ccc;
    line-height: 1.6;
}

.help-section,
.privacy-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.help-section h3,
.privacy-section h3 {
    color: #00f0ff;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.help-steps {
    padding-left: 20px;
}

.help-steps li {
    margin-bottom: 15px;
}

.help-steps ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: none;
}

.help-steps ul li {
    margin-bottom: 5px;
}

.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.help-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
}

.help-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.2);
}

.help-card-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.help-card h4 {
    color: #fff;
    margin-bottom: 5px;
}

.help-card p {
    font-size: 0.85em;
    color: #aaa;
}

.faq-list {
    margin-top: 10px;
}

.faq-item {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid #00f0ff;
}

.faq-item h4 {
    color: #fff;
    margin-bottom: 5px;
}

.faq-item p {
    font-size: 0.9em;
    color: #aaa;
}

.privacy-section ul {
    padding-left: 20px;
    margin: 10px 0;
}

.privacy-section ul li {
    margin-bottom: 5px;
}

.modal-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsivo */
@media (max-width: 600px) {
    .modal-help .modal-content,
    .modal-privacy .modal-content {
        padding: 20px;
    }
    
    .help-cards {
        grid-template-columns: 1fr;
    }
}

/* ========== CONTAGEM REGRESSIVA ========== */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
    border-radius: 15px;
}

.countdown-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 8em;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 
        0 0 30px var(--primary),
        0 0 60px var(--primary),
        0 0 90px var(--primary);
    animation: countdownPulse 1s ease-in-out;
}

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

.countdown-number.pulse {
    animation: countdownPulse 1s ease-in-out;
}

@media (max-width: 768px) {
    .countdown-number {
        font-size: 5em;
    }
}

/* ========== BOTÃO DESTACADO (AUTO-REGISTRO) ========== */
.btn-highlight {
    animation: highlightPulse 1.5s ease-in-out infinite;
    position: relative;
    z-index: 5;
}

.btn-highlight::after {
    content: '⚡';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 1.2em;
    background: var(--warning);
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--warning);
    animation: bounce 1s infinite;
}

@keyframes highlightPulse {
    0%, 100% { 
        box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
        transform: translateY(-2px);
    }
    50% { 
        box-shadow: 0 0 40px currentColor, 0 0 80px currentColor;
        transform: translateY(-4px);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.1); }
}

.btn-success.btn-highlight {
    color: #000;
}

.btn-danger.btn-highlight {
    color: #fff;
}

/* ========== BOTÃO CANCELAR AUTO-REGISTRO ========== */
.btn-cancel-auto {
    background: linear-gradient(135deg, #ff6b6b, #ff0044) !important;
    color: #fff !important;
    grid-column: 1 / -1;
    margin-top: 10px;
    animation: cancelPulse 2s ease-in-out infinite;
}

@keyframes cancelPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 0, 68, 0.8);
    }
}

.btn-cancel-auto:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 68, 0.6) !important;
}

/* Ajuste na action-buttons para permitir 4 itens */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

@media (max-width: 768px) {
    .btn-cancel-auto {
        grid-column: 1;
    }
}

/* ========== MODAL LISTA DE FUNCIONÁRIOS ========== */
.modal-lista {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-lista-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-lista-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: linear-gradient(135deg, #1a1a3a 0%, #0a0a1a 100%);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.2), 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

.modal-lista-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
}

.modal-lista-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    background: linear-gradient(45deg, #00f0ff, #ff00e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-close-modal:hover {
    background: #ff0044;
    transform: rotate(90deg);
}

.modal-lista-search {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-lista-search input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.modal-lista-search input:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.modal-lista-search input::placeholder {
    color: #666;
}

.modal-lista-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.lista-funcionario-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.lista-funcionario-item:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateX(5px);
}

.lista-funcionario-foto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #00f0ff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00f0ff, #ff00e5);
    font-weight: bold;
    font-size: 1.2rem;
    color: #000;
}

.lista-funcionario-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lista-funcionario-info {
    flex: 1;
}

.lista-funcionario-nome {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    margin: 0 0 2px;
}

.lista-funcionario-cargo {
    color: #888;
    font-size: 0.85rem;
    margin: 0;
}

.lista-funcionario-id {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 15px;
    color: #00f0ff;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}

.lista-funcionario-seta {
    font-size: 1.5rem;
    color: #00f0ff;
    opacity: 0;
    transition: all 0.3s;
}

.lista-funcionario-item:hover .lista-funcionario-seta {
    opacity: 1;
    transform: translateX(5px);
}

/* Scrollbar personalizada */
.modal-lista-body::-webkit-scrollbar {
    width: 6px;
}

.modal-lista-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-lista-body::-webkit-scrollbar-thumb {
    background: #00f0ff;
    border-radius: 3px;
}

@media (max-width: 600px) {
    .modal-lista-content {
        width: 95%;
        max-height: 90vh;
    }
}