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

body {
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: #fff;
  line-height: 1.6;
}

.dark-mode {
  background-color: #121212;
  color: white;
}

.container {
  /* Estilo base para login/conteúdo centralizado (Desktop) */
  max-width: 600px;
  margin: 20px auto;
  padding: 15px;
  text-align: center;
  background: #003366;
  color: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

.logo {
  width: 80px; /* Será ajustado para 100% no mobile */
  height: auto;
  margin-bottom: 15px;
}

.header {
  text-align: center;
  padding: 15px;
  background: #003366;
  color: white;
  border-bottom: 2px solid #0066cc;
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

/* Estilos para as tabelas em desktop */
.folgas-table, .summary-table {
  width: 98%;
  border-collapse: collapse;
  margin: 15px auto;
  font-size: 22px;
}

.folgas-table th, .folgas-table td,
.summary-table th, .summary-table td {
  border: 3px solid #ccc;
  padding: 6px;
  text-align: center;
}

.folgas-table th {
  background-color: #003366;
  color: white;
}

.folgas-table .nome-func {
  background-color: #1e1e1e;
  color: white;
}

.folgas-table .domingo {
  background-color: #b30000;
  color: white;
}

.folga { color: green; font-weight: bold; }
.atestado { color: orange; font-weight: bold; }
.falta { color: red; font-weight: bold; }
.folga-default { color: #0066cc; }

/* Container responsivo para tabela */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 15px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 15px;
}

.stat-item {
  background: #003366;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.stat-item h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.footer {
  text-align: center;
  margin-top: 20px;
  padding: 0 10px;
}

.actions {
  text-align: center;
  margin: 30px 0;
  padding: 0 10px;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- AJUSTES DE RESPONSIVIDADE (MOBILE) --- */

/* Ajustes Gerais para dispositivos Mobile */
@media (max-width: 768px) {
  body {
    font-size: 16px; 
  }

  /* 1. Container de Login/Conteúdo Principal (Forçando preenchimento) */
  .container {
    max-width: 100% !important; 
    width: 100% !important; 
    margin: 0 !important; 
    padding: 20px 10px !important; 
    border-radius: 0 !important;
  }
  
  /* Inputs e Selects maiores e amigáveis para touch */
  input[type="text"], input[type="password"], select, textarea,
  .container input[type="text"], .container input[type="password"] { /* Seleção forte para o login */
      padding: 15px !important; 
      font-size: 1.1em !important;
      height: auto !important;
      width: 100% !important; 
      min-width: 0;
      box-sizing: border-box;
      margin-bottom: 15px; 
  }
  
  /* Botões e Ações grandes */
  button[type="submit"], .actions button, .actions a {
      padding: 15px !important;
      font-size: 1.1em !important;
      min-height: 48px;
      width: 100%;
      display: block;
      margin-bottom: 10px;
      box-sizing: border-box;
      margin-left: 0 !important;
      margin-right: 0 !important;
  }

  /* 2. Botões de Navegação e Ações (Maiores e mais fáceis de tocar) */
  .nav {
    flex-direction: column; 
    gap: 10px;
  }

  .nav a {
    padding: 12px 15px; 
    font-size: 16px; 
    min-height: 48px; 
    display: block; 
    text-align: center;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .actions {
      display: flex;
      flex-direction: column; 
      gap: 15px; 
      margin: 30px 10px;
  }
  
  /* 3. Tabela Responsiva (Mantém o scroll, ajusta fontes) */
  .folgas-table, .summary-table {
    font-size: 14px;
    min-width: 700px; /* Garante o scroll horizontal */
    margin: 15px 0;
    width: auto;
  }
  
  .folgas-table th, 
  .folgas-table td,
  .summary-table th, 
  .summary-table td {
    padding: 6px; 
  }
  
  .folgas-table .nome-func {
    font-size: 1.5em !important; 
    min-width: 150px;
    position: sticky;
    left: 0;
    z-index: 10; 
  }
  
  .folgas-table th {
    position: sticky;
    top: 0;
    z-index: 11;
  }
  
  /* Remove margens e paddings desnecessários em telas muito pequenas */
  .folgas-table, .summary-table {
      margin-left: 0 !important;
      margin-right: 0 !important;
  }
}