:root {
    --primary: #005A9C; --secondary: #007bff; --background: #f4f6f8; --text-color: #333; --window: #ffffff;
    --border-color: #ced4da; --sidebar-bg: #ffffff; --sidebar-text: #34495e; --sidebar-active-bg: #ecf0f1;
    --acerto-rapido: #28a745; --acerto-medio: #007bff; --acerto-lento: #6f42c1;
    --erro-rapido: #fd7e14; --erro-medio: #ffc107; --erro-lento: #dc3545;
    --key-bg: #f9fafb; --key-shadow: #a1a1aa; --key-text: #374151; --keyboard-bg: #d1d5db;
}
html { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background); color: var(--text-color); margin: 0; padding: 0;
    box-sizing: border-box; min-height: 100%; display: flex;
}
*, *::before, *::after { box-sizing: inherit; }
.dashboard-container { display: flex; width: 100%; }
.sidebar { width: 260px; background-color: var(--sidebar-bg); border-right: 1px solid #e0e0e0; padding: 20px 0; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .logo { padding: 0 20px 20px 20px; margin-bottom: 20px; border-bottom: 1px solid #e0e0e0; }
.sidebar .logo img { max-width: 100%; }
.sidebar nav ul { list-style: none; padding: 0; }
.sidebar nav ul li a { display: block; padding: 12px 20px; color: var(--sidebar-text); text-decoration: none; font-size: 16px; font-weight: 500; transition: background-color 0.2s ease; cursor: pointer; }
.sidebar nav ul li a:hover, .sidebar nav ul li a.active { background-color: var(--sidebar-active-bg); color: var(--primary); }
.sidebar nav ul ul { padding-left: 20px; }
.sidebar nav ul ul a { font-size: 14px; }
.main-content { flex-grow: 1; padding: 30px; overflow-y: auto; min-width: 0; }
.content-section { display: none; }
.content-section.active { display: block; }
#content-cadastro, #content-analise, #content-relatorio-cpf, #content-relatorio-nome, #content-relatorio-data { background-color: var(--window); padding: 30px; border-radius: 8px; border: 1px solid #e0e0e0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; text-align: left; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #495057; }
.form-group input, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 16px; }
.form-group input[readonly] { background-color: #e9ecef; }
.start-buttons-container { grid-column: 1 / -1; display: flex; justify-content: center; gap: 20px; margin-top: 15px; }
.lgpd-consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; }
.lgpd-consent input { width: auto; margin-top: 4px; flex-shrink: 0; }
.lgpd-consent label { font-size: 12px; color: #6c757d; }
.hidden { display: none !important; }
.filter-container { display: flex; gap: 20px; margin-bottom: 30px; padding: 20px; background-color: #fdfdff; border-radius: 8px; border: 1px solid #e0e0e0; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; }
.filter-group label { margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.filter-group input { padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 16px; }
.results-table-container { background-color: var(--window); border-radius: 8px; padding: 20px; border: 1px solid #e0e0e0; overflow-x: auto; }
#triagensTable { width: 100%; border-collapse: collapse; font-size: 14px; }
#triagensTable th, #triagensTable td { border-bottom: 1px solid #e0e0e0; padding: 12px; text-align: left; }
#triagensTable th { background-color: #f7f7f7; font-weight: 600; color: var(--primary); }
#triagensTable tr:last-child td { border-bottom: none; }
.screen { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; flex-direction: column; align-items: center; padding: 40px; background: var(--window); z-index: 100; overflow-y: auto; }
.screen.active { display: flex; }
h1 { font-size: 2.5rem; color: var(--primary); margin-bottom: 10px; text-align: center;}
h2 { font-size: 1.8rem; margin-bottom: 20px; font-weight: 500; color: var(--text-color); text-align: center;}
p { font-size: 1.2rem; margin-bottom: 15px; line-height: 1.6; max-width: 900px; text-align: center; }
#comparison-container { display: flex; flex-direction: row; justify-content: center; align-items: flex-start; gap: 30px; margin-top: 40px; width: 100%; }
.image-option-wrapper { display: flex; flex-direction: column; align-items: center; }
.image-label { font-family: 'Times New Roman', Times, serif; font-weight: bold; font-size: 48px; color: var(--text-color); margin-top: 15px; }
.image-box { border: 2px solid #e0e0e0; border-radius: 8px; padding: 10px; display: flex; align-items: center; justify-content: center; background-color: var(--window); }
.image-box-comparison { width: 250px; height: 250px; }
.image-box-memory { width: 350px; height: 350px; }
.image-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.result-label { font-size: 24px; font-weight: bold; margin-top: 20px; text-transform: uppercase; }
.correct { color: var(--acerto-rapido); }
.incorrect { color: var(--erro-lento); }
.green-border { border-color: var(--acerto-rapido) !important; }
.red-border { border-color: var(--erro-lento) !important; }
#reportContent { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 750px; padding: 0 10px; }
.report-actions { width: 100%; display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap;}
.btn-report, .btn-start { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; font-size: 14px; font-weight: bold; color: #fff; background-color: var(--primary); border: none; border-radius: 5px; cursor: pointer; }
.btn-start.fidelity { background-color: var(--secondary); }
.btn-start:disabled { background-color: #a0a0a0; }
#corteWarning { width: 100%; color: var(--erro-lento); font-weight: bold; font-size: 1.1rem; margin: 10px 0 20px; padding: 10px; border: 2px solid var(--erro-lento); border-radius: 5px; text-align: center; }
#dadosParticipante { width: 100%; border: 1px solid #e0e0e0; padding: 15px; border-radius: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; text-align: left; font-size: 14px; margin-bottom: 20px; }
#dadosParticipante div { padding: 2px 0; }
#dadosParticipante span { font-weight: bold; color: #555; }
.time-summary-container, .total-summary-container { display: flex; justify-content: center; gap: 40px; width: 100%; margin-bottom: 20px; font-size: 1.1rem; flex-wrap: wrap; }
.detailed-summary-container { display: flex; flex-wrap: wrap; justify-content: space-around; width: 100%; gap: 20px; margin: 20px 0 30px 0; text-align: left; }
.summary-column { flex: 1; min-width: 250px; display: flex; flex-direction: column; gap: 10px;}
.summary-column h3 { font-size: 18px; color: var(--primary); border-bottom: 2px solid #e0e0e0; padding-bottom: 5px; margin-bottom: 5px; }
.detail-stat-item { display: flex; align-items: center; font-size: 14px; }
.detail-stat-item .color-box { width: 16px; height: 16px; border-radius: 4px; margin-right: 10px; flex-shrink: 0; }
.chart-container { position: relative; width: 100%; margin: 20px 0; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.zoom-btn { padding: 5px 10px; font-size: 16px; line-height: 1; margin-left: 5px; width: auto; background-color: var(--secondary);}
.table-container { max-height: 500px; overflow-y: auto; width: 100%; border: 1px solid var(--border-color); border-radius: 8px; margin-top: 30px; }
#resultTable { width: 100%; border-collapse: collapse; font-size: 14px; }
#resultTable th, #resultTable td { border: 1px solid #e0e0e0; padding: 12px; text-align: center; }
#resultTable th { background-color: #f7f7f7; font-weight: 600; color: var(--primary); position: sticky; top: 0; z-index: 1; }
.login-container { display: flex; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--background); z-index: 200; padding: 20px; }
.login-box { width: 100%; max-width: 420px; padding: 30px 40px; background-color: var(--window); border-radius: 8px; border: 1px solid #e0e0e0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); text-align: center; }
.login-logo { max-width: 220px; margin-bottom: 25px; }
.login-box h1 { font-size: 22px; color: var(--primary); margin-bottom: 30px; }
.login-box .form-group { text-align: left; margin-bottom: 20px; }
.login-box .form-group label { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: block; }
.login-box .form-group input { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 16px; }
.btn-login { width: 100%; padding: 12px; font-size: 16px; font-weight: bold; color: #fff; background-color: var(--primary); border: none; border-radius: 5px; cursor: pointer; margin-top: 15px; transition: background-color 0.2s ease; }
.btn-login:hover { background-color: #004a80; }
.login-error { color: var(--erro-lento); font-size: 14px; margin-bottom: 15px; text-align: center; }
@media (max-width: 992px) { .sidebar { width: 220px; } .main-content { padding: 20px; } .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    body { display: block; }
    .dashboard-container { flex-direction: column; min-height: 100vh; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid #e0e0e0; }
    .main-content { padding: 15px; flex-grow: 1; }
    #content-cadastro, #content-analise, #content-relatorio-cpf, #content-relatorio-nome, #content-relatorio-data { padding: 15px; }
    h1 { font-size: 1.8rem; } h2 { font-size: 1.3rem; } p { font-size: 1rem; }
    .screen { padding: 20px; }
    .start-buttons-container { flex-direction: column; gap: 10px; } .btn-start { width: 100%; }
    .filter-container { flex-direction: column; padding: 15px; gap: 15px; }
    .image-box-memory { width: 280px; height: 280px; } #comparison-container { flex-direction: column; align-items: center; gap: 20px; }
    .image-box-comparison { width: 220px; height: 220px; } .image-label { font-size: 40px; margin-top: 10px; }
    .report-actions { gap: 10px; } #dadosParticipante { grid-template-columns: 1fr; gap: 8px; }
    .time-summary-container, .total-summary-container { flex-direction: column; gap: 10px; align-items: center; font-size: 1rem; }
    .detailed-summary-container { flex-direction: column; gap: 25px; } .summary-column { min-width: 100%; }
    .chart-header { flex-direction: column; gap: 10px; }
}
@media print {
    body { background-color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; display: block; }
    .sidebar, .report-actions, .chart-actions, .login-container { display: none; }
    .main-content { padding: 0; } .dashboard-container { display: block; }
    .content-section { display: none !important; } .screen { display: none !important; }
    #tela5.active { display: block !important; position: static; height: auto; width: 100%; overflow: visible; padding: 0; border: none; box-shadow: none; }
    #reportContent { max-width: 100%; padding: 0; }
    h1, h2, h3 { color: #000; text-align: left; } h1 { font-size: 22pt; } h2 { font-size: 16pt; } h3 { font-size: 14pt; }
    #dadosParticipante { grid-template-columns: 1fr 1fr; border: 1px solid #ccc; }
    .chart-container, .table-container, #dadosParticipante, .detailed-summary-container { page-break-inside: avoid; margin-top: 30px; }
    canvas { max-width: 100% !important; height: auto !important; }
    .table-container { max-height: none; overflow: visible; border: none; }
    #resultTable { font-size: 9pt; } #resultTable th, #resultTable td { border: 1px solid #ccc; padding: 8px; }
    .color-box { border: 1px solid #ccc; }
}
.screen { justify-content: center; text-align: center; }
.instructions-content { display: flex; flex-direction: column; align-items: center; gap: 25px; max-width: 90vw; }
#telaAgradecimento .btn-report { margin-top: 20px; width: auto; padding: 10px 20px; font-size: 1rem; }
.final-instruction { margin-top: 40px; font-weight: bold;}
#escolaridade { text-align: center; -moz-text-align-last: center; text-align-last: center; }
#escolaridade optgroup { font-weight: bold; font-style: normal; }
#escolaridade option { text-align: left; }
img[src="alvo/maca.jpg"] { filter: saturate(1.8) brightness(0.9); }
.animation-container { margin-top: 25px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.keyboard { background-color: var(--keyboard-bg); padding: 10px; border-radius: 8px; box-shadow: 0 4px 0 var(--key-shadow); display: flex; flex-direction: column; gap: 8px; }
.keyboard-row { display: flex; justify-content: center; gap: 6px; }
.key { display: flex; justify-content: center; align-items: center; font-weight: 600; font-size: 12px; color: var(--key-text); width: 38px; height: 38px; background-color: var(--key-bg); border-radius: 5px; border: 1px solid #ccc; box-shadow: 0 2px 0 #b2b2b2; }
.key.wide { width: 60px; }
.key.extra-wide { width: 80px; }
.spacebar-row { display: flex; justify-content: center; gap: 6px; width: 100%; }
.spacebar-adjacent { width: 38px; height: 38px; background-color: var(--key-bg); border-radius: 5px; border: 1px solid #ccc; box-shadow: 0 2px 0 #b2b2b2; }
.spacebar { height: 38px; background-color: var(--key-bg); border-radius: 5px; border: 1px solid #ccc; box-shadow: 0 2px 0 #b2b2b2; animation: blink-spacebar 1.5s infinite; flex-grow: 1; }
.arrow { width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-bottom: 20px solid var(--primary); border-top: 0; animation: bounce-arrow 1.5s infinite; }
.mobile-device { width: 140px; height: 280px; background-color: #111; border: 4px solid #333; border-radius: 30px; display: flex; justify-content: center; align-items: center; padding: 10px; position: relative; }
.mobile-screen { width: 100%; height: 100%; background-color: #fff; border-radius: 20px; display: flex; justify-content: center; align-items: center; }
.touch-button { width: 80%; padding: 12px; background-color: var(--primary); border-radius: 8px; color: white; font-weight: bold; font-size: 14px; animation: blink-touch-button 1.5s infinite; }
@keyframes blink-spacebar { 0%, 40%, 100% { background-color: var(--key-bg); } 50% { background-color: #ef4444; box-shadow: 0 0 10px #ef4444, 0 2px 0 #b2b2b2; } }
@keyframes bounce-arrow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink-touch-button { 0%, 40%, 100% { background-color: var(--primary); transform: scale(1); } 50% { background-color: #ef4444; transform: scale(0.98); } }

/* NOVA ANIMAÇÃO DA SETA PISCANTE PARA CELULAR */
.mobile-animation .arrow {
    border-top: 0;
    border-bottom: 20px solid var(--primary);
    animation: blink-arrow 1.5s infinite; /* Usa a nova animação de piscar */
}
@keyframes blink-arrow {
    50% { opacity: 0.2; }
}

/* LÓGICA DE EXIBIÇÃO RESPONSIVA */
.mobile-animation, .mobile-only { display: none; }
.desktop-animation, .desktop-only { display: block; } /* Use block ou flex dependendo do container */
.desktop-animation { display: flex; }

@media (max-width: 768px) {
    .desktop-animation, .desktop-only { display: none; }
    .mobile-animation, .mobile-only { display: block; } /* Use block ou flex dependendo do container */
    .mobile-animation { display: flex; }
}