/*
 * Estilo escuro inspirado no design minimalista da Apple.
 * As cores são predominantemente escuras com contraste suave
 * para garantir legibilidade sem abrir mão da elegância.
 */

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #0b0d10;
  color: #f5f5f5;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 4rem;
}

/* Header */
.page-header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(90deg, #0d1117 0%, #0b0d10 100%);
  border-bottom: 1px solid #1a1d23;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.page-header .subtitle {
  font-size: 1rem;
  color: #9ca3af;
}

/* Section styling */
.section {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: #111418;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

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

.section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

/* Grid helper classes */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Form elements */
.form-control {
  display: flex;
  flex-direction: column;
}

.form-control label {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: #a1a1aa;
}

.form-control input {
  padding: 0.6rem 0.8rem;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background-color: #1a1d23;
  color: #f5f5f5;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-control input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.4);
}

/* Items container */
.items-container {
  display: grid;
  gap: 1rem;
}

.item-card {
  padding: 1rem;
  border: 1px solid #1f2937;
  border-radius: 10px;
  background-color: #13171d;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.item-card .fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* Summary list */
.summary-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid #1f2937;
  color: #e5e7eb;
}

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

.summary-list strong {
  font-weight: 600;
}

.text-negative {
  color: #f87171;
}

.text-positive {
  color: #34d399;
}

/* Charts layout */
.charts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.charts canvas {
  width: 100% !important;
  max-width: 500px;
  height: 300px !important;
  background-color: #0b0d10;
  border: 1px solid #1f2937;
  border-radius: 10px;
}

/* Buttons */
.primary-btn, .secondary-btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  margin-right: 0.6rem;
}

.primary-btn {
  background-color: #2563eb;
  color: #ffffff;
  border: 1px solid transparent;
}

.primary-btn:hover {
  background-color: #1e40af;
}

.secondary-btn {
  background-color: #1f2937;
  color: #f5f5f5;
  border: 1px solid #374151;
}

.secondary-btn:hover {
  background-color: #374151;
}

/* Actions area */
.actions {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  text-align: right;
}

@media (min-width: 768px) {
  .charts {
    flex-direction: row;
    justify-content: center;
  }
  .charts canvas {
    flex: 1;
    margin: 0 1rem;
  }
}