:root {
  --bg-color: #f8fafc;
  --surface: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #cbd5e1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f172a;
    --surface: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --border: #334155;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
}

.app-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.header { text-align: center; margin-bottom: 2rem; }
.badge {
  display: inline-block;
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.header p { color: var(--text-secondary); }

.calculator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group label {
  display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem;
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toggle-group.vertical {
  flex-direction: column;
}

.toggle-group input[type="radio"] {
  display: none;
}

.btn-toggle {
  flex: 1;
  text-align: center;
  padding: 0.8rem;
  background: var(--bg-color);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 0.9rem;
  min-width: 100px;
}

.toggle-group input[type="radio"]:checked + .btn-toggle {
  background: rgba(245, 158, 11, 0.15); /* Mango background */
  border-color: #f59e0b; /* Mango border */
  color: #d97706;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); /* Mango glow */
}

@media (prefers-color-scheme: dark) {
  .toggle-group input[type="radio"]:checked + .btn-toggle {
    color: #fcd34d;
  }
}

.main-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 1.2rem;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 2rem;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); /* Permanent Mango Glow */
}
.main-btn:hover, .main-btn:active {
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

.result-card {
  margin-top: 2.5rem; padding-top: 2rem; border-top: 1px dashed var(--border); text-align: center;
}
.risk-circle {
  width: 120px; height: 120px; border-radius: 50%; border: 6px solid var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem auto; font-size: 3rem; font-weight: bold; color: var(--success); transition: all 0.5s;
}
.result-card h3 { font-size: 1.5rem; margin-bottom: 0.8rem; transition: color 0.5s; }
.advice { background: var(--bg-color); padding: 1rem; border-radius: 8px; font-size: 0.95rem; font-weight: 600; border: 1px solid var(--border); }

.footer-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- CSS DE REFERÊNCIAS --- */
.references { margin-top: 2rem; padding: 1.5rem; background: rgba(15,23,42,0.05); border-radius: 8px; font-size: 0.9rem; text-align: left; }
.references h3 { margin-top: 0; font-size: 1rem; color: var(--text-primary, #17202a); margin-bottom: 0.5rem; }
.references p { margin-bottom: 1rem; color: var(--text-secondary, #475569); }
.references ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.references li { margin-bottom: 0.5rem; color: var(--text-secondary, #475569); }
.references a { color: #0ea5e9; text-decoration: none; font-weight: bold; }
.references .disclaimer { margin-top: 1rem; font-style: italic; color: #64748b; font-size: 0.85rem; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 0.8rem; }
