/* ==========================================
   RELÓGIO-PONTO NOVO - COM CÂMERA AO VIVO
   Estilos do formulário
   ========================================== */

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

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

/* ========== MENU FLUTUANTE ========== */
.menu-flutuante {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.menu-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #000;
    color: white;
    border: 3px solid white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.menu-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    gap: 8px;
    flex-direction: column;
}

.menu-links.active {
    display: flex;
    animation: slideDown 0.3s ease;
}

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

.menu-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #f0f0f0;
    border-radius: 10px;
    color: #000;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.menu-links a:hover {
    background: #000;
    color: white;
    transform: scale(1.1);
}

@media (max-width: 640px) {
    .menu-flutuante {
        top: 15px;
        right: 15px;
    }
    
    .menu-toggle {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ========== BOTÃO VOLTAR ========== */
.btn-voltar-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: white;
    color: #667eea;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid #667eea;
}

.btn-voltar-menu:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #667eea;
    color: white;
}

@media (max-width: 640px) {
    .btn-voltar-menu span {
        display: none;
    }
    
    .btn-voltar-menu {
        padding: 12px 15px;
        border-radius: 50%;
    }
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

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

/* ========== CABEÇALHO ========== */
.header {
    text-align: center;
    margin-bottom: 35px;
}

.icon-clock {
    font-size: 50px;
    color: #667eea;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

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

.title {
    font-size: 32px;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 5px;
}

.company {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    color: #718096;
    line-height: 1.5;
}

/* ========== FORMULÁRIO ========== */
.form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: #667eea;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select:hover {
    border-color: #cbd5e0;
}

/* ========== CÂMERA ========== */
.camera-instruction {
    background: #ebf4ff;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #2c5282;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-instruction i {
    color: #667eea;
}

.camera-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.camera-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.btn-capture {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: white;
    border: 4px solid white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-capture:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.camera-controls {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

.foto-preview {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.foto-preview img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.foto-success {
    color: #38a169;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.foto-success i {
    font-size: 20px;
}

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

/* ========== INFORMAÇÃO AUTOMÁTICA ========== */
.info-automatica {
    background: #ebf4ff;
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    border-radius: 8px;
}

.info-automatica p {
    font-size: 13px;
    color: #2c5282;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-automatica i {
    color: #667eea;
}

/* ========== BOTÃO DE ENVIO ========== */
.btn-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

/* ========== MENSAGEM DE SUCESSO ========== */
.success-message {
    background: #c6f6d5;
    border: 2px solid #48bb78;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.success-message.hidden {
    display: none;
}

.success-message i {
    font-size: 50px;
    color: #38a169;
    margin-bottom: 10px;
}

.success-message p {
    font-size: 18px;
    font-weight: 600;
    color: #22543d;
    margin-bottom: 5px;
}

.success-detail {
    font-size: 14px;
    font-weight: 400;
    color: #2f855a;
}

/* ========== LINK ADMINISTRATIVO ========== */
.admin-link {
    margin-top: 25px;
    text-align: center;
}

.admin-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-link a:hover {
    color: #764ba2;
    transform: translateX(5px);
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 640px) {
    .card {
        padding: 25px 20px;
    }

    .title {
        font-size: 24px;
    }

    .company {
        font-size: 16px;
    }

    .subtitle {
        font-size: 13px;
    }

    .icon-clock {
        font-size: 40px;
    }

    .form {
        gap: 20px;
    }

    .btn-submit {
        padding: 14px 20px;
        font-size: 15px;
    }

    .camera-controls {
        flex-direction: column;
    }
}

@media (max-width: 400px) {
    body {
        padding: 15px;
    }

    .card {
        padding: 20px 15px;
    }

    .title {
        font-size: 20px;
    }
}
