/*
 * Estilos básicos para o sistema de controle de contas.
 * O objetivo é oferecer uma interface limpa, responsiva e fácil de usar.
 */

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f9fafb;
  color: #333;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

h1, h2 {
  text-align: center;
  margin-top: 0;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.logout {
  background-color: #e53935;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

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

.card {
  background-color: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

button[type="submit"] {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

button[type="submit"]:hover {
  background-color: #0069d9;
}

table {
  width: 100%;
  border-collapse: collapse;
}

/* Estilo para total do mês */
.total-month {
  font-weight: bold;
  margin: 0.5rem 0;
  text-align: right;
}

th, td {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

th {
  background-color: #f1f1f1;
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

tbody tr:hover {
  background-color: #f5f5f5;
}

.action-btn {
  background-color: #4caf50;
  color: #fff;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.action-btn:hover {
  background-color: #43a047;
}

/* Calendar styles */
#calendarControls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}

#calendarControls button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

#calendarControls span {
  margin: 0 1rem;
  font-weight: bold;
  font-size: 1.1rem;
}

#calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.calendar-day {
  min-height: 80px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
}

.calendar-day header {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.calendar-day .bills {
  margin-top: auto;
  font-size: 0.8rem;
}

.calendar-day.today {
  background-color: #e3f2fd;
  border-color: #64b5f6;
}

.calendar-day.has-bills {
  background-color: #fff8e1;
  border-color: #ffeb3b;
}

.error-message {
  color: #e53935;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  #calendar {
    grid-template-columns: repeat(3, 1fr);
  }
}