* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.nav-links a {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.nav-links a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

input[type="time"], input[type="date"], input[type="text"], select, textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

input[type="time"]:focus, input[type="date"]:focus, input[type="text"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.ponto-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.ponto-section:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.ponto-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.4);
}

.foto-upload {
    position: relative;
    display: inline-block;
}

.foto-upload input[type="file"] {
    display: none;
}

.btn-foto {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-foto:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.foto-preview-ponto {
    position: relative;
    display: inline-block;
    margin-top: 15px;
}

.foto-preview-ponto img {
    border: 3px solid #4CAF50;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    transition: transform 0.3s ease;
}

.foto-preview-ponto img:hover {
    transform: scale(1.05);
}

.btn-remove-foto {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-remove-foto:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.folga-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(255, 152, 0, 0.2);
    transition: all 0.3s ease;
}

.folga-section:hover {
    border-color: rgba(255, 152, 0, 0.4);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.1);
}

.folga-section label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #E65100;
}

.folga-section input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #FF9800;
}

.resumo {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    border: 2px solid rgba(76, 175, 80, 0.2);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2E7D32;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

tr:hover td {
    background-color: #f8f9ff;
}

.ponto-cell {
    position: relative;
    padding: 10px;
}

.horario {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.ponto-actions-cell {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-edit-ponto, .btn-remove-ponto {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit-ponto {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}

.btn-edit-ponto:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-remove-ponto {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 2px 10px rgba(244, 67, 54, 0.3);
}

.btn-remove-ponto:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.btn-fotos {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}

.btn-fotos:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #c3e6cb;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 15px rgba(21, 87, 36, 0.1);
}

.error-message {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #f5c6cb;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 15px rgba(114, 28, 36, 0.1);
}

.ponto-batido {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    color: white !important;
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.galeria-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.galeria-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.galeria-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.galeria-close:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.galeria-item {
    text-align: center;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.galeria-item:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.galeria-item img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.galeria-label {
    font-weight: 600;
    color: #333;
    margin-top: 10px;
    font-size: 1rem;
}

.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.edit-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.edit-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-close:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edit-form label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.edit-form input[type="time"], .edit-form input[type="file"] {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.edit-form input[type="time"]:focus, .edit-form input[type="file"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edit-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-save-edit, .btn-cancel-edit {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-save-edit {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-save-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-cancel-edit {
    background: linear-gradient(135deg, #757575, #616161);
    color: white;
    box-shadow: 0 4px 15px rgba(117, 117, 117, 0.3);
}

.btn-cancel-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(117, 117, 117, 0.4);
}

.muted {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .ponto-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ponto-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .galeria-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos para funcionalidade de câmera */
.foto-buttons {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.btn-foto {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-foto:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.btn-camera {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-camera:hover {
    background: #0056b3;
    border-color: #004085;
    color: white;
}

/* Modal da Câmera */
.camera-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.camera-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.camera-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 1001;
}

.camera-close:hover {
    color: #000;
}

.camera-container {
    text-align: center;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

#cameraStatus {
    font-weight: 500;
    color: #495057;
}

.btn-switch-camera {
    background: #6c757d;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-switch-camera:hover {
    background: #5a6268;
    transform: scale(1.05);
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn-capture, .btn-retake, .btn-confirm {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-capture {
    background: #28a745;
    color: white;
}

.btn-capture:hover {
    background: #218838;
    transform: scale(1.05);
}

.btn-retake {
    background: #ffc107;
    color: #212529;
}

.btn-retake:hover {
    background: #e0a800;
    transform: scale(1.05);
}

.btn-confirm {
    background: #007bff;
    color: white;
}

.btn-confirm:hover {
    background: #0056b3;
    transform: scale(1.05);
}

#cameraVideo {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #000;
}

#cameraPreviewImg {
    border: 2px solid #28a745;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsividade para câmera */
@media (max-width: 768px) {
    .camera-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }
    
    .camera-controls {
        gap: 10px;
    }
    
    .btn-capture, .btn-retake, .btn-confirm {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .foto-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-foto {
        justify-content: center;
        padding: 10px;
    }
}