/* ====================================
   1. Estilos Gerais e Tipografia
   ==================================== */

body {
  font-family: 'Roboto', Arial, sans-serif;
  margin: 20px;
  background-color: #e0f2f1; /* Azul claro */
}

h1 {
  color: #0A2246;
}

mark {
  background-color: #f1c40f; /* Amarelo */
  color: black;
  padding: 2px;
  border-radius: 4px;
}

/* ====================================
   2. Formulários e Filtros
   ==================================== */

form {
  margin-bottom: 20px;
}

input, button, select {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background-color: #c9e4e2;
  color: black;
}

.filter-container {
  display: flex;
  gap: 15px;
  align-items: flex-end; /* Alinha itens na parte inferior */
  margin-bottom: 20px;
  background-color: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  /* flex-grow removido para não esticar */
}

.filter-group:first-child {
  width: 40%; /* Garante que o campo de busca seja maior */
}

.filter-group label {
  margin-bottom: 4px;
  font-size: 0.9em;
  font-weight: 500;
  color: #333;
}

.filter-container input,
.filter-container select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto; /* Empurra os botões para a direita */
  padding-bottom: 1px; /* Ajuste fino de alinhamento */
}

/* ====================================
   3. Botões
   ==================================== */

.btn {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background-color: #00A69F;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #016a65;
}

/* ====================================
   4. Tabela
   ==================================== */

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid #3b3b3b;
  border-radius: 12px;
  overflow: hidden;
  table-layout: fixed;
  resize: horizontal;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

thead {
  background-color: #0A2246;
  color: white;
}

th, td {
  border: 1px solid #dee2e6;
  padding: 12px 15px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.col-check      { width: 5%; }
.col-priority   { width: 10%; }
.col-title      { width: 25%; }
.col-date       { width: 15%; }
.col-description{ width: 25%; }
.col-actions    { width: 5%; }

tbody tr:nth-child(even) {
  background-color: #f8f9fa; /* Um cinza muito claro */
}

tbody tr:hover {
  background-color: #e9ecef; /* Um cinza um pouco mais escuro */
}

.completed {
  text-decoration: line-through;
  color: gray;
}

.detailsRow td {
  padding: 0 !important;
  background-color: #e8f1f9;
  box-shadow: inset 0 4px 8px -4px rgba(0,0,0,0.1);
}

.resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
}

/* ====================================
   5. Indicadores e Efeitos
   ==================================== */

.priority-indicator {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  display: inline-block;
}

.priority-baixa { background-color: #28a745; }
.priority-media { background-color: #ffc107; }
.priority-alta { background-color: #dc3545; }

.flash-save {
  animation: flash-green 1s ease-out;
}

@keyframes flash-green {
  0% {
    background-color: #d4edda;
  }
  100% {
    background-color: transparent;
  }
}

/* ====================================
   6. Menus e Pop-ups
   ==================================== */

.settingsMenuContainer {
  position: relative;
  display: inline-block;
}

.settingsIcon {
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.settingsMenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 5px;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.settingsMenu button {
  display: block;
  width: 100%;
  padding: 6px 12px;
  margin: 2px 0;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.settingsMenu button:hover {
  background-color: #ddd;
}

/* ====================================
   7. Elementos Flutuantes
   ==================================== */

#fixed-logo {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

#fixed-logo img {
  width: 80px;
  height: auto;
  opacity: 0.7;
  transition: all 0.3s ease;
}

/* ====================================
   8. Estilos do Novo Formulário
   ==================================== */

.form-container {
  background-color: #f0f5fa; /* Cor de fundo alterada para branco azulado */
  padding: 15px; /* Padding Reduzido */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

#taskForm {
  display: flex;
  flex-direction: column;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.gc-1 { grid-column: span 1; }
.form-group.gc-3 { grid-column: span 3; }
.form-group.gc-5 { grid-column: span 5; }
.form-group.gc-6 { grid-column: span 6; }

.form-group label {
  margin-bottom: 4px;
  font-size: 0.9em;
  font-weight: 500;
  color: #333;
}

#taskForm input[type="text"],
#taskForm input[type="date"],
#taskForm select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f8f9fa;
  color: #333;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#taskForm input:focus,
#taskForm select:focus {
  outline: none;
  border-color: #00A69F;
  box-shadow: 0 0 0 3px rgba(0, 166, 159, 0.2);
}

.button-group {
  display: flex;
  gap: 10px;
  grid-column: span 6;
  justify-content: flex-end;
}

#taskForm .btn-primary {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  font-weight: 500;
}

/* ====================================
   9. Estilos da Visualização de Detalhes (v2)
   ==================================== */

.detailsRow > td {
  background: #f0f5fa;
  padding: 20px 30px !important;
  box-shadow: inset 0 5px 5px -5px rgba(0,0,0,0.1), inset 0 -5px 5px -5px rgba(0,0,0,0.1);
}

.details-wrapper dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 30px;
  margin: 0;
}

.detail-pair dt {
  font-size: 0.85em;
  font-weight: 500;
  color: #556270;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-pair dd {
  font-size: 1em;
  color: #0A2246;
  margin-left: 0;
  font-weight: 400;
  line-height: 1.4;
}

.detail-pair.description-pair {
  grid-column: 1 / -1;
}