:root {
  --primary-color: #6a1b9a;
  --secondary-color: #9c27b0;
  --accent-color: #ff9800;
  --dark-color: #11003c;
  --light-color: #f5f5f5;
  --success-color: #4caf50;
  --danger-color: #f44336;
  --warning-color: #ffc107;
  --info-color: #2196f3;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--dark-color);
  color: #333;
  line-height: 1.6;
  padding: 0;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
  color: var(--light-color);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

header h1 i {
  color: var(--accent-color);
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 25px;
  margin-bottom: 30px;
}

.form-section {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(106, 27, 154, 0.2);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.summary-section h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  color: var(--primary-color);
  font-weight: 600;
}

.filter-group select {
  padding: 8px 12px;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
}

.btn-secondary {
  background-color: var(--light-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 8px 15px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
  text-align: center;
  border-top: 4px solid var(--primary-color);
}

.stat-card.total {
  border-top-color: var(--success-color);
}

.stat-card.monthly {
  border-top-color: var(--info-color);
}

.stat-card h3 {
  font-size: 1rem;
  color: #666;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
}

#chart-container {
  height: 300px;
  margin-bottom: 30px;
}

.expenses-list {
  margin-bottom: 30px;
}

.expenses-list ul {
  list-style: none;
}

.expenses-list li {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.expense-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.expense-category {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.expense-details {
  flex-grow: 1;
}

.expense-description {
  font-size: 0.9rem;
  color: #666;
}

.expense-value {
  font-weight: 700;
  color: var(--dark-color);
}

.expense-date {
  font-size: 0.8rem;
  color: #999;
}

.delete-btn {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 1rem;
  padding: 5px;
  transition: var(--transition);
}

.delete-btn:hover {
  transform: scale(1.2);
}

.actions {
  text-align: center;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-danger:hover {
  background-color: #d32f2f;
  transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .summary-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }
  
  .card {
    padding: 15px;
  }
  
  .form-group input,
  .form-group select {
    padding: 10px 12px;
  }
}