/* =============================
   SISTEMA DE PONTO ELETRÔNICO AJUSTADO
   ============================= */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f6f8fb;
    font-size: 11px;
    color: #333;
}

.ponto-wrapper {
    max-width: 1100px;
    margin: 30px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 24px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ponto-filtro-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.ponto-filtro-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.ponto-filtro-group label {
    font-weight: 600;
    font-size: 11px;
}

.ponto-filtro-group select,
.ponto-filtro-group input[type="date"] {
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #fff;
}

.ponto-tipo-filtro {
    display: flex;
    gap: 20px;
    background: #f1f5ff;
    padding: 10px;
    border-radius: 6px;
}

.ponto-user-info {
    flex: 1;
    background-color: #f5f7fb;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e4ef;
}

#live-clock {
    font-size: 16px;
    font-weight: bold;
    color: #2e5dee;
}

.btn-salvar {
    background-color: #2e5dee;
    color: #fff;
    padding: 8px 16px;
    font-size: 11px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-salvar:hover {
    background-color: #2048c2;
}

.mkr-alert {
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
    margin-bottom: 20px;
}

.mkr-alert-success {
    background-color: #e5fbe8;
    color: #167b2e;
    border-left: 4px solid #45c264;
}

.mkr-alert-error {
    background-color: #fbe5e5;
    color: #991e1e;
    border-left: 4px solid #ff5a5a;
}

.tabela-visualizacao-fixa {
    margin-top: 30px;
    background-color: #f9fbfe;
    padding: 20px;
    border-radius: 8px;
}

.tabela-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tabela-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.btn-tabela {
    background-color: #3e5bdc;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.btn-tabela:hover {
    background-color: #2f47b2;
}

#tabela-registros-fixos {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

#tabela-registros-fixos thead {
    background-color: #e8edfa;
}

#tabela-registros-fixos th,
#tabela-registros-fixos td {
    padding: 6px 8px;
    border-bottom: 1px solid #dee3ee;
}

#tabela-registros-fixos tbody tr:nth-child(even) {
    background-color: #f9f9fb;
}

.status-faltou {
    background-color: transparent;
    color: red;
    font-weight: bold;
}

.status-presente {
    background-color: transparent;
    color: green;
    font-weight: bold;
}

.ponto-input,
.ponto-input-text,
.ponto-textarea,
.ponto-select {
    font-size: 11px;
    padding: 5px 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Ajustes para os campos de substituição */
.substituicao-dobra {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.substituicao-turno {
    display: flex;
    gap: 10px;
    align-items: center;
}

.substituicao-turno label {
    font-size: 12px;
    font-weight: bold;
}

.horarios-substituicao {
    display: flex;
    gap: 8px;
}

.ponto-input-small {
    width: 70px;
    padding: 5px;
    font-size: 12px;
}

.ponto-select {
    width: 100%;
    padding: 6px;
}

.ponto-textarea {
    width: 100%;
    height: 50px;
    resize: vertical;
}

/* Ajuste do espaçamento nas tabelas */
.tabela-registros-fixos td {
    vertical-align: middle;
    padding: 10px;
}

.tabela-search-container {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tabela-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.tabela-search:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

/* NOVOS AJUSTES PARA AS TABELAS ESPECÍFICAS */
.tabela-substituicoes {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.tabela-substituicoes th, 
.tabela-substituicoes td {
    padding: 6px 8px;
    border: 1px solid #dee3ee;
    text-align: left;
}

.tabela-substituicoes th {
    background-color: #e8edfa;
    font-weight: 600;
}

/* Ajuste específico para a coluna de substituições */
.tabela-substituicoes .col-substituicoes {
    width: 45%; /* Aumentado para 45% */
    min-width: 200px;
}

/* Ajuste para as colunas de horário */
.tabela-substituicoes .col-horario {
    width: 15%; /* Reduzido para 15% */
}

.tabela-substituicoes .col-observacoes {
    width: 10%;
}

/* Ajuste para os selects dentro da tabela */
.tabela-substituicoes select {
    width: 100%;
    padding: 6px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

@media (max-width: 768px) {
    .ponto-filtro-container {
        flex-direction: column;
    }

    .ponto-user-info {
        margin-top: 20px;
    }

    .btn-salvar {
        width: 100%;
    }

    .tabela-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tabela-substituicoes .col-substituicoes,
    .tabela-substituicoes .col-horario {
        width: auto;
    }
}

.status-substituido {
    background-color: transparent;
    color: orange;
    font-weight: bold;
}

.status-presente { color: green; font-weight: bold; }
.status-faltou { color: red; font-weight: bold; }
.status-substituido { color: orange; font-weight: bold; }

/* NOVA ORGANIZAÇÃO DE FILTROS FIXOS */
.tabela-filtros-flex {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.filtro-linha-unica {
    width: 100%;
}

.filtro-duas-colunas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.tabela-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

@media (max-width: 600px) {
    .filtro-duas-colunas {
        grid-template-columns: 1fr;
    }
}

#tabela-registros-fixos_wrapper {
    margin-top: 20px;
}

div.dataTables_scrollBody {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: auto;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}


div.dataTables_scrollBody {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: auto;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}


/* =========================
   HORA EXTRA (projeto WIT)
   ========================= */

/* células novas: centraliza e mantém tudo alinhado */
td .he-tempo { width: 100px; text-align: center; }
td .he-obs   { min-width: 180px; max-width: 320px; }

/* switch estilizado para o checkbox (continua sendo um <input type=checkbox>) */
.he-toggle {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 18px;
  background: #e7ecfb;
  border-radius: 999px;
  position: relative;
  outline: none;
  cursor: pointer;
  vertical-align: middle;
  transition: background .18s ease;
  box-shadow: inset 0 0 0 1px #d5dbf2;
}
.he-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: left .18s ease;
}
.he-toggle:checked { background: #2e5dee; box-shadow: inset 0 0 0 1px #2e5dee; }
.he-toggle:checked::after { left: 18px; }

/* acessibilidade/feedback */
.he-toggle:focus-visible { outline: 2px solid rgba(46,93,238,.35); outline-offset: 2px; border-radius: 999px; }

/* inputs quando desabilitados (antes de marcar HE) */
.he-tempo:disabled,
.he-obs:disabled {
  background: #f3f5fb;
  color: #747b8a;
  border-color: #e0e5f2;
  opacity: .95;
}

/* dá um leve destaque na linha quando HE estiver ativa
   (se no JS você adicionar/remover a classe .he-on na <tr>) */
tr.he-on { background: #f6fbff; }
tr.he-on td { border-bottom-color: #cfe1ff; }
tr.he-on .he-tempo, tr.he-on .he-obs { border-color: #bcd0ff; box-shadow: inset 0 0 0 1px #e3ecff; }

/* pequenos ajustes de alinhamento nas novas colunas */
#ponto-tabela .he-col-center { text-align: center; }


/* força o bloco a ir de borda a borda */
.ponto-wrapper.ponto-full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 24px;  /* mantém respiro */
  padding-right: 24px;
}


/* REMOVE qualquer limitação de largura existente */
.ponto-wrapper.ponto-full {
    max-width: 100% !important;
    width: 100% !important;
    margin: 30px 0 !important;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 20px;
    box-sizing: border-box;
}

/* Remove margens negativas se existirem */
.ponto-wrapper.ponto-full {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Garante que containers pais não limitem a largura */
body .entry-content, 
body #content, 
body .container, 
body .wp-block-group {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ajusta as tabelas internas para usar toda a largura */
#tabela-registros-fixos,
#ponto-tabela {
    width: 100% !important;
    max-width: 100% !important;
}

.dataTables_wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* Se ainda não funcionar, use esta versão MAIS AGRESSIVA: */
body .ponto-wrapper.ponto-full {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 24px 5%;
    box-sizing: border-box;
}

/* Remove qualquer overflow que possa estar cortando o conteúdo */
body {
    overflow-x: visible !important;
}

/* Avatar nas tabelas */
.col-nome .nome-wrap{
  display:flex;
  align-items:center;
  gap:8px;
}
.tbl-avatar{
  width:28px;
  height:28px;
  border-radius:50%;
  object-fit:cover;
  display:inline-block;
}
.avatar-placeholder{
  width:28px;
  height:28px;
  border-radius:50%;
  background:#e5e7eb; /* cinza claro */
  display:inline-block;
}


/* Avatares nas duas tabelas (fixa e de edição) */
#tabela-registros-fixos td .tbl-avatar,
#ponto-tabela td .tbl-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

/* Wrapper do nome com a foto */
#tabela-registros-fixos td.col-nome .nome-wrap,
#ponto-tabela td.col-nome .nome-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap; /* evita quebrar o nome pra baixo da foto */
}

/* (Opcional) fixa uma largura confortável pra coluna do nome */
#tabela-registros-fixos th:first-child,
#tabela-registros-fixos td.col-nome {
  width: 260px;
}




/* === AVATARES (FORÇA CONTRA REGRAS DO TEMA) === */
#tabela-registros-fixos td.col-nome .nome-wrap img.tbl-avatar,
#ponto-tabela           td.col-nome .nome-wrap img.tbl-avatar {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: inline-block !important;
}

/* Layout “foto + nome” */
#tabela-registros-fixos td.col-nome .nome-wrap,
#ponto-tabela           td.col-nome .nome-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap;
}

/* AVATARES - REGRA SIMPLIFICADA */
.tbl-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

.avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  display: inline-block;
}

/* Layout foto + nome */
.nome-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}