/* ==========================================
   GESTÃO COMPLETA - RELÓGIO-PONTO
   Estilos para o painel administrativo
   ========================================== */

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

body {
    font-family: 'Inter', sans-serif;
    background: #f7fafc;
    padding: 20px;
    padding-top: 80px;
}

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

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

.menu-toggle:hover {
    transform: scale(1.1);
    background: #764ba2;
}

.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: #667eea;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

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

/* ========== BOTÃO VOLTAR ========== */
.btn-voltar-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: #667eea;
    color: white;
    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(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.btn-voltar-menu:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: #764ba2;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

/* ========== NAVEGAÇÃO POR ABAS ========== */
.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.tab-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.tab-btn i {
    font-size: 16px;
}

/* ========== CONTEÚDO DAS ABAS ========== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ========== SECTION HEADER ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 22px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========== BOTÕES ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

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

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========== STATS CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-info h3 {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
}

/* ========== TABELAS ========== */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f7fafc;
}

th {
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #2d3748;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f7fafc;
}

.loading, .empty {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
}

.selfie-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.selfie-thumb:hover {
    transform: scale(1.1);
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-ativo {
    background: #c6f6d5;
    color: #22543d;
}

.badge-inativo {
    background: #fed7d7;
    color: #742a2a;
}

.badge-semanal {
    background: #fef5e7;
    color: #7a5c00;
}

.badge-mensal {
    background: #d6f5ff;
    color: #003d5c;
}

/* ========== FILTROS ========== */
.filtros-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filtro-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.filtro-item select,
.filtro-item input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.filtro-item select:focus,
.filtro-item input:focus {
    outline: none;
    border-color: #667eea;
}

/* ========== RESUMO PAGAMENTOS ========== */
.resumo-pagamentos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resumo-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.resumo-card h3 {
    font-size: 14px;
    color: #718096;
    margin-bottom: 15px;
}

.valor-total {
    font-size: 42px;
    font-weight: 800;
    color: #667eea;
}

.valor-parcial {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
}

/* ========== BANCO DE HORAS ========== */
.resumo-banco-horas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.valor-positivo {
    font-size: 36px;
    font-weight: 800;
    color: #48bb78;
}

.valor-negativo {
    font-size: 36px;
    font-weight: 800;
    color: #f56565;
}

.valor-dinheiro {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

/* ========== CONFIGURAÇÕES ========== */
.config-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.config-section h3 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-description {
    font-size: 14px;
    color: #718096;
    margin-bottom: 20px;
}

.config-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
}

.config-item label {
    display: block;
    font-size: 14px;
    margin-bottom: 10px;
}

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

.horario-inputs input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.horario-inputs span {
    color: #718096;
    font-size: 14px;
}

.config-checks {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
}

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

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #2d3748;
}

.modal form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
}

/* Modal Selfie */
.modal-close-x {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s;
}

.modal-close-x:hover {
    transform: scale(1.2);
}

#modalSelfie img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 15px;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    body {
        padding: 15px;
        padding-top: 70px;
    }

    .header h1 {
        font-size: 22px;
    }

    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .tab-btn {
        min-width: 120px;
        flex: 0 0 auto;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }

    .filtros-grid {
        grid-template-columns: 1fr;
    }

    .resumo-pagamentos {
        grid-template-columns: 1fr;
    }
}
