:root {
  --primary-color: #4a6da7;
  --primary-light: #6b8cbe;
  --primary-dark: #2d4d7c;
  --secondary-color: #f9a826;
  --secondary-light: #ffbc55;
  --secondary-dark: #e08e00;
  --background-color: #f5f7fa;
  --card-color: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --danger-color: #f44336;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

.dark-theme {
  --background-color: #1a1a2e;
  --card-color: #16213e;
  --text-color: #e6e6e6;
  --text-light: #b0b0b0;
  --border-color: #2a2a4a;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: "Nunito", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  text-align: center;
}

.logo-container {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-bottom: 12px;
}

.logo {
  width: 120px;
  height: auto;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

h1 {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.date-display {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

section {
  background-color: var(--card-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 8px;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

.btn-icon {
  width: 24px;
  height: 24px;
}

.primary {
  background-color: var(--primary-color);
  color: white;
}

.primary:hover {
  background-color: var(--primary-dark);
}

.secondary {
  background-color: var(--secondary-color);
  color: white;
}

.secondary:hover {
  background-color: var(--secondary-dark);
}

.danger {
  background-color: var(--danger-color);
  color: white;
}

.danger:hover {
  background-color: #d32f2f;
}

.report {
  background-color: var(--card-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-light);
}

.report:hover {
  background-color: var(--primary-light);
  color: white;
}

/* Food Log */
.food-log {
  min-height: 200px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--text-light);
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  opacity: 0.5;
  margin-bottom: 16px;
}

.food-list {
  list-style: none;
}

.food-list li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.food-list li:last-child {
  border-bottom: none;
}

.food-time {
  font-weight: 700;
  color: var(--primary-color);
  min-width: 60px;
}

.food-type {
  font-weight: 600;
  color: var(--secondary-dark);
  margin-right: 8px;
}

.food-category {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-style: italic;
}

.food-details {
  flex: 1;
  margin: 0 12px;
}

.food-actions {
  display: flex;
  gap: 8px;
}

.btn-icon-only {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-only:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.btn-delete {
  color: var(--danger-color);
}

/* Reports Section */
.report-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

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

.modal-content {
  background-color: var(--card-color);
  margin: 20px auto;
  padding: 24px;
  border-radius: var(--border-radius);
  max-width: 500px;
  position: relative;
  box-shadow: var(--shadow);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}

.close-btn:hover {
  color: var(--danger-color);
}

/* Form Elements */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  background-color: var(--card-color);
  color: var(--text-color);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Suggestions List */
.suggestions-list {
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
}

.suggestions-list li {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.suggestions-list li:last-child {
  border-bottom: none;
}

.suggestion-category {
  font-size: 0.8rem;
  background-color: var(--primary-light);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
}

/* Footer */
footer {
  margin-top: 32px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-icon {
  width: 24px;
  height: 24px;
}

/* Responsive */
@media (max-width: 600px) {
  .action-buttons,
  .report-buttons {
    flex-direction: column;
  }

  .modal-content {
    margin: 10px;
    width: calc(100% - 20px);
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  animation: fadeIn 0.3s ease;
}

.food-list li {
  animation: fadeIn 0.5s ease;
}

/* Adicionar estilo para o botão inline de adicionar alimento: */
.add-food-inline {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.9rem;
}

.btn-icon-sm {
  width: 16px;
  height: 16px;
}

/* Botão de tema */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 100;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background-color: var(--primary-dark);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
}

/* Estilos específicos para o tema escuro */
.dark-theme .category-table th {
  background-color: var(--primary-dark);
}

.dark-theme .category-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .day-separator::before {
  background: var(--border-color);
}

.dark-theme .day-separator span {
  background: var(--background-color);
}

