/* ============================================================================
   CHECKIN.CSS - INTERFACE DINÂMICA BASEADA EM ESTADOS
   ============================================================================ */

:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================================================
   CONTAINER PRINCIPAL
   ============================================================================ */

.checkin-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.checkin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    text-align: center;
    color: white;
}

.checkin-header .logo {
    height: 60px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}

.checkin-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

/* ============================================================================
   CONTEÚDO DINÂMICO
   ============================================================================ */

.conteudo-dinamico {
    padding: 40px 30px;
    min-height: 400px;
}

/* ============================================================================
   ESTADOS
   ============================================================================ */

.estado-container {
    text-align: center;
}

.icone-estado {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInScale 0.5s ease;
}

.icone-sucesso {
    color: var(--success-color);
}

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

.estado-container h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.estado-container p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 10px;
}

/* ============================================================================
   DADOS DO COLABORADOR
   ============================================================================ */

.dados-colaborador {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    text-align: left;
}

.dados-colaborador p {
    margin: 10px 0;
    font-size: 1rem;
}

.dados-colaborador-mini {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.dados-colaborador-mini p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* ============================================================================
   INSTRUÇÕES
   ============================================================================ */

.instrucao {
    margin: 30px 0;
}

.instrucao p {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.instrucao-aguardar {
    background: #ecfdf5;
    border: 2px solid var(--success-color);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.instrucao-aguardar p {
    color: var(--text-dark);
    margin: 10px 0;
}

/* ============================================================================
   PROGRESSO
   ============================================================================ */

.progresso-bar {
    margin: 30px 0;
}

.progresso-texto {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.progresso-barra {
    background: var(--border-color);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.progresso-preenchimento {
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    height: 100%;
    transition: width 0.5s ease;
}

/* ============================================================================
   LISTA DE TERMOS
   ============================================================================ */

.lista-termos {
    margin-top: 30px;
    text-align: left;
}

.item-termo {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.item-termo:hover {
    box-shadow: var(--shadow);
}

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

.termo-header h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin: 0;
}

.termo-conteudo {
    margin-bottom: 20px;
}

.termo-conteudo p {
    color: #64748b;
    font-size: 0.95rem;
    text-align: left;
}

.termo-texto-scroll {
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dark);
    text-align: left;
}

.termo-acoes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-aceite {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-dark);
}

.checkbox-aceite input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ============================================================================
   LISTA DE FORMULÁRIOS
   ============================================================================ */

.lista-formularios {
    margin-top: 30px;
    text-align: left;
}

.item-formulario {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.item-formulario:hover {
    box-shadow: var(--shadow);
}

.formulario-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.formulario-header h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

.form-descricao {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.form-concluido {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success-color);
    font-weight: 500;
}

.icone-check {
    font-size: 1.5rem;
    background: var(--success-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pendente {
    background: #fef3c7;
    color: #92400e;
}

.badge-sucesso {
    background: #d1fae5;
    color: #065f46;
}

/* ============================================================================
   MENSAGENS
   ============================================================================ */

.mensagem-sucesso {
    background: #ecfdf5;
    border: 2px solid var(--success-color);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.mensagem-sucesso p {
    color: var(--success-color);
    font-weight: 500;
    margin: 8px 0;
    font-size: 1.1rem;
}

.mensagem-erro {
    background: #fee2e2;
    border: 2px solid var(--error-color);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    color: var(--error-color);
    font-weight: 500;
}

/* ============================================================================
   BOTÕES
   ============================================================================ */

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.2rem;
}

/* ============================================================================
   INPUTS
   ============================================================================ */

.form-group {
    margin: 30px 0;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================================================
   LOADING
   ============================================================================ */

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-screen p {
    margin-top: 20px;
    color: #64748b;
    font-size: 1rem;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.checkin-footer {
    background: var(--bg-light);
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.checkin-footer p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.liberado-em {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.liberado-em small {
    color: #64748b;
    font-size: 0.85rem;
}

/* ============================================================================
   ESTADOS ESPECIAIS
   ============================================================================ */

.estado-sucesso {
    animation: successPulse 0.6s ease;
}

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

.estado-erro {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ============================================================================
   RESPONSIVO
   ============================================================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .checkin-container {
        border-radius: 16px;
    }
    
    .checkin-header {
        padding: 20px;
    }
    
    .checkin-header h1 {
        font-size: 1.4rem;
    }
    
    .conteudo-dinamico {
        padding: 30px 20px;
    }
    
    .icone-estado {
        font-size: 3rem;
    }
    
    .estado-container h2 {
        font-size: 1.4rem;
    }
    
    .btn {
        width: 100%;
        margin-top: 10px;
    }
}
