/* style.css */

/* Configuração geral para zerar margens e mudar a fonte */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fundo da tela em degradê com os tons de azul da CMR */
body {
  background: linear-gradient(135deg, #0e5eb5 0%, #063161 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  color: #333;
}

/* Caixa branca principal do projeto */
.container {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  /* Padrão para Login e Cadastro */
  margin: 0 auto;
  border-top: 6px solid #ffd000;
  /* Linha amarela decorativa do logo CMR */
}

/* Classe utilitária para telas largas (Painel e Controle) */
.container.largo {
  max-width: 950px;
}

/* Títulos das páginas */
h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #0e5eb5;
  /* Azul CMR */
}

/* Espaçamento dos blocos de entrada de texto */
.input-group {
  margin-bottom: 20px;
}

/* Textos das labels nos formulários */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
}

/* Campos de digitação (Inputs) e Seletores (Selects) */
/* INCLUSÃO: Adicionado select e input[type="date"] para herdar a mesma estilização elegante */
input:not([type="checkbox"]),
select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  outline: none;
  font-size: 16px;
  background-color: #ffffff;
  transition: border-color 0.3s ease;
}

/* Efeito ao clicar no campo de digitação ou seleção */
input:focus,
select:focus {
  border-color: #0e5eb5;
}

/* Estilo para inputs que forem desabilitados pelo JavaScript de estoque */
input:disabled,
select:disabled {
  background-color: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
  opacity: 0.8;
}

/* Botões padrões do sistema */
button {
  width: 100%;
  padding: 12px;
  background-color: #0e5eb5;
  /* Azul CMR */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

/* Efeito de passar o mouse por cima do botão */
button:hover {
  background-color: #0b498c;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Links e textos da parte inferior */
p {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
  text-align: center;
}

/* Força links dentro de parágrafos a quebrarem linha e centralizarem bem */
p a {
  display: inline-block;
  margin-top: 5px;
}

a {
  color: #0e5eb5;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/* Links de navegação superiores */
.link-voltar {
  color: #0e5eb5;
  display: inline-block;
  margin-bottom: 15px;
  font-size: 14px;
}

/* ==========================================================================
   ESTILOS COMPLEMENTARES: Filtros, Menus e Tabelas (Cores CMR)
   ========================================================================== */

/* Cards de Opções Clicáveis no Painel */
.card-opcao {
  background: #f8fafc;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  text-align: center;
  margin-bottom: 15px;
  transition: transform 0.2s ease, background-color 0.2s ease;
  border-left: 4px solid #008b47;
  /* Faixa verde inferior do logo CMR */
}

.card-opcao:hover {
  background-color: #f1f5f9;
  transform: translateY(-2px);
  border-left-color: #ffd000;
  /* Altera para amarelo ao passar o mouse */
}

/* Barra que organiza os botões de filtro */
.filtros-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}

/* Botões arredondados de filtro */
.btn-filtro {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto;
  margin-top: 0;
}

.btn-filtro:hover {
  background-color: #e2e8f0;
}

/* Estado ativo do filtro (Azul oficial da marca) */
.btn-filtro.ativo {
  background-color: #0e5eb5;
  color: white;
  border-color: #0e5eb5;
}

/* Títulos dos blocos de tabela */
.uniforme-titulo {
  background-color: #0e5eb5;
  color: white;
  padding: 10px;
  margin-top: 30px;
  border-radius: 6px 6px 0 0;
  font-size: 15px;
  font-weight: bold;
}

/* Rolagem lateral interna para tabelas em telas pequenas */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

th,
td {
  padding: 10px;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}

/* CORREÇÃO ORIGINAL: Adicionado cor escura (#333) fixa para os textos das linhas normais. */
td {
  color: #333;
}

/* Cabeçalho da tabela com o azul da marca */
th {
  background-color: #0e5eb5;
  color: white;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Botão Sair com o vermelho dinâmico do topo do logo */
#btnSair {
  background-color: #e52222;
}

#btnSair:hover {
  background-color: #b81b1b;
}

/* Ajuste fino para inputs internos de tabelas do estoque (controle.html) */
.input-tabela {
  max-width: 90px;
  padding: 6px !important;
  text-align: center;
  font-size: 14px !important;
}
/* ==========================================================
   CONFIRMAÇÃO DE PONTO - CALENDÁRIO
   ========================================================== */

#calendarioPontoCabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

#calendarioTitulo {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: #0e5eb5;
}

#btnMesAnterior,
#btnProximoMes {
    width: auto;
    min-width: 45px;
    margin: 0;
    padding: 8px 14px;
}

#calendarioPonto {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 12px;
}

#calendarioPonto button {
    width: 100%;
    height: 42px;
    margin: 0;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: .2s;
}

#calendarioPonto button:hover {
    background: #0e5eb5;
    color: #ffffff;
}

#modalConfirmacao {
    display: none;
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    background: #f8fafc;
}

#modalConfirmacao h2 {
    margin-bottom: 15px;
}

#dataReferencia {
    display: block;
    margin-bottom: 20px;
    font-weight: bold;
    color: #334155;
}

#modalConfirmacao label {
    margin-top: 15px;
}

#modalConfirmacao input[type="file"] {
    margin-bottom: 15px;
}

#btnSalvar,
#btnCancelar {
    margin-top: 10px;
}

@media (max-width:768px){

    #calendarioPonto{
        grid-template-columns: repeat(7,1fr);
        gap:6px;
    }

    #calendarioPonto button{
        height:38px;
        font-size:13px;
    }

}


/* ==========================================================
   TEMAS DO SISTEMA
   ========================================================== */
.titulo-configuracao { color: #0e5eb5; font-size: 16px; margin-bottom: 15px; }
.temas-configuracao { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.btn-tema { width:100%; min-height:105px; margin-top:0; padding:14px; background:#fff; color:#334155; border:2px solid #e2e8f0; border-radius:10px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; box-shadow:none; }
.btn-tema:hover { background:#f8fafc; border-color:#0e5eb5; }
.btn-tema.ativo { border-color:#0e5eb5; box-shadow:0 0 0 2px rgba(14,94,181,.12); }
.btn-tema strong { font-size:15px; }
.btn-tema small { font-size:12px; font-weight:normal; opacity:.75; }
.tema-amostra { width:42px; height:22px; border-radius:999px; display:block; border:1px solid rgba(0,0,0,.12); }
.tema-amostra-claro { background:#fff; }
.tema-amostra-azul { background:linear-gradient(90deg,#0e5eb5,#063161); }
.tema-amostra-escuro { background:#111827; }
.tema-amostra-rosa { background:linear-gradient(90deg,#ec4899,#9d174d); }

body.tema-claro { background:#f1f5f9 !important; color:#1e293b; }
body.tema-claro .container { background:#fff !important; border-top-color:#0e5eb5 !important; }
body.tema-claro h2,body.tema-claro .titulo-configuracao,body.tema-claro .link-voltar,body.tema-claro a { color:#0e5eb5 !important; }

body.tema-azul { background:linear-gradient(135deg,#0e5eb5 0%,#063161 100%) !important; }

body.tema-escuro { background:#0f172a !important; color:#e5e7eb !important; }
body.tema-escuro .container { background:#111827 !important; color:#e5e7eb !important; border-top-color:#64748b !important; }
body.tema-escuro h2,body.tema-escuro .titulo-configuracao,body.tema-escuro .link-voltar,body.tema-escuro a { color:#93c5fd !important; }
body.tema-escuro label { color:#cbd5e1 !important; }
body.tema-escuro input:not([type="checkbox"]),body.tema-escuro select { background:#1f2937 !important; color:#f8fafc !important; border-color:#475569 !important; }
body.tema-escuro input::placeholder { color:#94a3b8; }
body.tema-escuro .btn-tema { background:#1f2937 !important; color:#f8fafc !important; border-color:#475569 !important; }
body.tema-escuro .btn-tema:hover,body.tema-escuro .btn-tema.ativo { border-color:#93c5fd !important; background:#273449 !important; }
body.tema-escuro .btn-tema small { color:#cbd5e1; }
body.tema-escuro .card-opcao { background:#1f2937 !important; border-color:#475569 !important; }
body.tema-escuro td { color:#e5e7eb !important; border-color:#475569 !important; }
body.tema-escuro th { background:#1e3a5f !important; }
body.tema-escuro tr:nth-child(even) { background:#1f2937 !important; }
body.tema-escuro #modalConfirmacao { background:#1f2937 !important; border-color:#475569 !important; }

body.tema-rosa { background:linear-gradient(135deg,#ec4899 0%,#9d174d 100%) !important; color:#334155; }
body.tema-rosa .container { background:#fff !important; border-top-color:#ec4899 !important; }
body.tema-rosa h2,body.tema-rosa .titulo-configuracao,body.tema-rosa .link-voltar,body.tema-rosa a { color:#be185d !important; }
body.tema-rosa input:not([type="checkbox"]):focus,body.tema-rosa select:focus { border-color:#ec4899 !important; }
body.tema-rosa button { background-color:#db2777; }
body.tema-rosa button:hover { background-color:#be185d; }
body.tema-rosa .btn-tema { background:#fff !important; color:#334155 !important; border-color:#fbcfe8 !important; }
body.tema-rosa .btn-tema:hover,body.tema-rosa .btn-tema.ativo { border-color:#db2777 !important; box-shadow:0 0 0 2px rgba(219,39,119,.12); }
body.tema-rosa th,body.tema-rosa .uniforme-titulo { background:#be185d !important; }
body.tema-rosa .card-opcao { border-left-color:#db2777 !important; }
@media (max-width:600px){ .temas-configuracao{grid-template-columns:1fr;} }

/* ==========================================================
   MODAL DE CONFIRMAÇÃO DE EXCLUSÃO DE USUÁRIO
   ========================================================== */
.modal-excluir-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(2, 8, 23, 0.68);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-excluir-card {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  border-top: 6px solid #e52222;
  animation: modalExcluirEntrada .18s ease-out;
}

.modal-excluir-fechar {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #64748b;
  font-size: 25px;
  line-height: 1;
  border-radius: 50%;
}

.modal-excluir-fechar:hover {
  background: #f1f5f9;
  color: #334155;
}

.modal-excluir-icone {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 28px;
  font-weight: 800;
}

.modal-excluir-card h3 {
  margin-bottom: 12px;
  color: #1e293b;
  font-size: 22px;
}

.modal-excluir-card p {
  margin: 8px 0;
  color: #64748b;
  line-height: 1.5;
}

#modalExcluirNome {
  display: block;
  margin: 8px 0 14px;
  color: #0e5eb5;
  font-size: 17px;
  word-break: break-word;
}

.modal-excluir-aviso {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
}

.modal-excluir-acoes {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 22px;
}

.modal-excluir-acoes button {
  margin: 0;
}

.btn-excluir-cancelar {
  background: #64748b !important;
}

.btn-excluir-cancelar:hover {
  background: #475569 !important;
}

.btn-excluir-confirmar {
  background: #dc2626 !important;
}

.btn-excluir-confirmar:hover {
  background: #b91c1c !important;
}

@keyframes modalExcluirEntrada {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.tema-escuro .modal-excluir-card {
  background: #111827;
  border-top-color: #ef4444;
}

body.tema-escuro .modal-excluir-card h3 {
  color: #f8fafc;
}

body.tema-escuro .modal-excluir-card p {
  color: #cbd5e1;
}

body.tema-escuro .modal-excluir-aviso {
  background: #1f2937;
  border-color: #475569;
}

@media (max-width: 520px) {
  .modal-excluir-card { padding: 26px 20px; }
  .modal-excluir-acoes { grid-template-columns: 1fr; }
}
