body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 0 15px;
    height: 60px;
    line-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

header h2 {
    margin: 0;
    padding: 0;
}

#horaAtual {
    position: absolute;
    right: 20px;
    font-size: 0.9em;
}

.sidebar {
    width: 60px;
    background-color: #34495e;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    transition: transform 0.3s ease-in-out;
    z-index: 2000;
}

.sidebar a {
    color: white;
    font-size: 24px;
    margin: 20px 0;
    text-decoration: none;
    transition: transform 0.2s;
    filter: grayscale(100%) brightness(200%);
    -webkit-filter: grayscale(100%) brightness(200%);
}

.sidebar a:hover {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(100%);
    -webkit-filter: grayscale(0%) brightness(100%);
}

.main {
    margin-left: 80px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Padrão: alinhado à esquerda */
}

/* Usado no HTML para centralizar o conteúdo de uma página */
.main-centered {
    align-items: center;
}


/* ======================================================= */
/* ESTILOS DOS FORMULÁRIOS (BLOCO BRANCO)                  */
/* ======================================================= */

/* Base para TODOS os formulários (sem largura definida aqui) */
.form-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 40px 0;
}

/* Largura para formulários PEQUENOS (Login e Cadastro) */
.login-page .form-container,
.page-cadastro .form-container {
    max-width: 400px;
    width: 100%; 
}

/* Largura para formulários LARGOS (Config) */
.form-container.form-container-wide {
    max-width: 700px;
}

/* ======================================================= */
/* ESTILOS PARA O CONTEÚDO DENTRO DOS FORMULÁRIOS          */
/* ======================================================= */
.form-container h3 {
    text-align: center;
    margin-bottom: 30px;
}

.form-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Largura PADRÃO (80%) para os campos */
.form-container label {
    display: block;
    text-align: left;
    width: 80%;
    margin-bottom: 5px;
    box-sizing: border-box;
}

.form-container input, .form-container button {
    display: block;
    width: 80%;
    margin-bottom: 20px;
    box-sizing: border-box;
}


/* ======================================================= */
/* ESTILOS GERAIS                                          */
/* ======================================================= */

.form-container input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.buttons button, .btn {
    padding: 15px 25px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    width: 100%; 
    margin-bottom: 15px;
}

.buttons button {
    background-image: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.buttons button:hover, .btn:hover, form button:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

.buttons button:active, .btn:active, form button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-image: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    color: #333;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
  animation-name: animatetop;
  animation-duration: 0.4s;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#modalMensagem {
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
}

@keyframes animatetop {
  from { top: -300px; opacity: 0 }
  to { top: 0; opacity: 1 }
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    table-layout: fixed;
}

th, td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
}

th {
    background-color: #ecf0f1;
    font-weight: bold;
}

.obs {
    margin-top: 20px;
}

.obs textarea {
    width: calc(100% - 20px);
    height: 80px;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    resize: vertical;
}

.summary-card {
    background-color: #f7f9fc;
    border-radius: 8px;
    padding: 20px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    margin-top: 20px;
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
}

.summary-card p {
    font-size: 1.1em;
    font-weight: bold;
    color: #34495e;
    margin: 5px 0;
}

.summary-card span {
    color: #2980b9;
}

.btn-editar, .btn-excluir {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
    transition: transform 0.2s;
}

.btn-editar:hover, .btn-excluir:hover {
    transform: scale(1.2);
}

#edicaoModal .modal-content {
    background-color: #fff;
    max-width: 400px;
}

#edicaoModal form label {
    text-align: left;
    margin-top: 10px;
}

#edicaoModal form input,
#edicaoModal form select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* ✅ ✅ ✅ CORREÇÃO PONTUAL: CENTRALIZAÇÃO DA PÁGINA DE LOGIN ✅ ✅ ✅ */
/* Esta regra remove o cabeçalho e centraliza o formulário na página de login */
.login-page header {
    display: none;
}
.login-page {
    height: 100vh; /* Garante que a página ocupe a altura total da tela */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Garante que o form-container na página de login não tenha margem lateral indesejada */
.login-page .form-container {
    margin-left: 0;
    margin-right: 0;
}
/* ✅ ✅ ✅ FIM DA CORREÇÃO ✅ ✅ ✅ */


.form-container form button {
    background-image: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.filtros {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 450px;
}

.filtros label {
    font-weight: bold;
    font-size: 1.1em;
    color: #34495e;
    flex-shrink: 0;
}

#filtroMes, #filtroColaborador {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2334495e%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    background-color: white;
    color: #333;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}

#filtroMes:hover, #filtroColaborador:hover {
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#filtroMes:focus, #filtroColaborador:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

#btnEntrada { background-image: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
#btnEntrada:hover { box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4); }
#btnInicioIntervalo, #btnFimIntervalo { background-image: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); }
#btnInicioIntervalo:hover, #btnFimIntervalo:hover { box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4); }
#btnSaida { background-image: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
#btnSaida:hover { box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4); }

.btn-excluir-grande {
    background-color: #e74c3c;
    color: white;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}
.btn-excluir-grande:hover {
    background-color: #c0392b;
}

@media (max-width: 768px) {
    body {
        padding-top: 115px;
    }
    header {
        margin-left: 0;
        justify-content: center;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1001;
        height: 60px;
        line-height: 60px;
    }
    header h2 {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        text-align: center;
        font-size: 1.1em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .main {
        margin-left: 0;
        padding: 20px;
    }
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    .form-container {
        margin: 20px 0;
    }
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px;
        width: 100%;
    }
    #horaAtual {
        display: none;
    }
    .modal-content {
        margin-top: 40%;
        width: 90%;
    }
    .filtros {
        flex-direction: column;
        align-items: flex-start;
    }
    .sidebar {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        height: 55px;
        top: 60px;
        left: 0;
        padding-top: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .sidebar a {
        margin: 10px 0;
        font-size: 28px;
    }
}
/* ======================================================= */
/* ESTILOS PARA A PÁGINA DE CONFIGURAÇÕES (FLEXBOX)        */
/* ======================================================= */

/* Aumenta a largura máxima do container para caber as duas colunas */
.form-container.form-container-wide {
    max-width: 1100px;
    width: 100%;
}

/* Cria o container flexível que vai alinhar as caixas */
.settings-grid {
    display: flex;
    flex-wrap: wrap; /* Permite que as caixas quebrem para a linha de baixo */
    gap: 40px;       /* Espaçamento de 40px entre as caixas */
}

/* Define o tamanho de cada caixa para caber 2 por linha */
.settings-card {
    width: calc(50% - 20px); /* 50% da largura menos metade do espaçamento */
    display: flex;
    flex-direction: column;
}

/* Ajustes nos formulários dentro das caixas */
.settings-card form {
    align-items: flex-start; /* Alinha os labels à esquerda */
    flex-grow: 1; /* Faz o formulário crescer para ocupar o espaço da caixa */
    display: flex;
    flex-direction: column;
}

.settings-card form button {
    margin-top: auto; /* Empurra o botão 'Salvar' para o final da caixa */
}

.settings-card form label,
.settings-card form input,
.settings-card form button,
#admin-management-section label,
#admin-management-section input,
#admin-management-section button,
#admin-management-section select {
    width: 100%; /* Faz os campos ocuparem 100% da largura da caixa */
}


/* ======================================================= */
/* AJUSTE PARA TELAS MENORES (RESPONSIVIDADE)              */
/* ======================================================= */

@media (max-width: 992px) {
    /* Faz as caixas ocuparem 100% da largura, voltando a uma única coluna */
    .settings-card {
        width: 100%;
    }
}
/* ======================================================= */
/* ESTILOS PARA OS CONTROLES DE ADMIN EM CONFIGURAÇÕES     */
/* ======================================================= */

/* --- Estilo Base (Compartilhado entre os 3 elementos) --- */
#select-colaborador,
#reset-senha,
#btn-reset-senha {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
    color: #333;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    margin-bottom: 10px; /* Adiciona um pequeno espaço abaixo */
}

/* --- Estilo Específico para o Seletor (Adiciona a seta) --- */
#select-colaborador {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2334495e%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    padding-right: 40px; /* Adiciona espaço para a seta não sobrepor o texto */
}

/* --- Estilo Específico para o Botão (Muda a cor de fundo e centraliza o texto) --- */
#btn-reset-senha {
    background-color: #f0f2f5; /* Um cinza bem claro para diferenciar de um campo de texto */
    text-align: center;
}

/* --- Efeitos de Hover e Focus (Quando passa o mouse ou clica) --- */
#select-colaborador:hover,
#reset-senha:hover,
#btn-reset-senha:hover {
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#btn-reset-senha:hover {
    background-color: #e9ecef; /* Escurece um pouco o botão no hover */
}

#select-colaborador:focus,
#reset-senha:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* ======================================================= */
/* ESTILO DO TEXTO DENTRO DAS CAIXAS DE INPUT E TEXTAREA   */
/* ======================================================= */

/* --- Estilo para o texto digitado --- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="time"],
textarea,
select {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px; /* Tamanho mais legível e evita zoom em celulares */
    color: #333;     /* Cor do texto um pouco mais suave que o preto puro */
}

/* --- Estilo para o texto de placeholder (ex: "Digite aqui...") --- */
::placeholder { /* Padrão para Chrome, Firefox, Opera, Safari */
  color: #a9a9a9; /* Cinza claro */
  font-style: italic;
  opacity: 1; /* Necessário para o Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
  color: #a9a9a9;
  font-style: italic;
}

::-ms-input-placeholder { /* Microsoft Edge */
  color: #a9a9a9;
  font-style: italic;
}

/* ======================================================= */
/* AJUSTES ESPECÍFICOS PARA O DASHBOARD E RELATÓRIOS */
/* ======================================================= */

/* Faz os cards de resumo e avisos terem largura e altura que se ajustam ao conteúdo */
.summary-card {
    width: fit-content;
    min-width: 320px;
    height: auto;
    box-sizing: border-box;
}

/* Garante que o container de avisos tenha a largura total */
#avisosCard {
    width: 100%;
}

/* Estiliza o container do botão "Gerar PDF" */
.pdf-button-container {
    text-align: right;
    margin-bottom: 25px;
}

.pdf-button-container .btn {
    width: auto;
}
.main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin-left: 0;
}

/* ======================================================= */
/* CORREÇÃO DO BOTÃO "VER HISTÓRICO GERAL" NO DASHBOARD    */
/* ======================================================= */
.view-all-container {
    margin-top: 10px; /* Adiciona espaço entre a tabela e o botão */
    text-align: center;
}
.view-all-container .btn {
    width: auto;
    padding: 10px 20px; /* Reduz o tamanho do botão */
}