/* ===== AGRI CIRCULAR-PM — Diagnóstico Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --green-dark: #1a3c1e;
  --green-mid: #2c5f2d;
  --green-light: #4a8b4c;
  --green-accent: #aed581;
  --green-pale: #e8f5e9;
  --cream: #f5f2eb;
  --white: #ffffff;
  --text: #2d2d2d;
  --text-light: #666;
  --red: #e53935;
  --red-light: #ffebee;
  --blue: #1565c0;
  --shadow: rgba(0,0,0,.1);
  --radius: 12px;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #e8f5e9 0%, #f5f2eb 50%, #e8f5e9 100%);
  color: var(--text);
  min-height: 100vh;
}

/* ---- Top Bar ---- */
.top-bar {
  background: var(--green-dark);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px var(--shadow);
}
.top-bar h1 {
  font-size: 1.3em;
  font-weight: 700;
  letter-spacing: .5px;
}
.top-bar a {
  color: var(--green-accent);
  text-decoration: none;
  font-size: .9em;
  font-weight: 500;
  transition: opacity .3s;
}
.top-bar a:hover { opacity: .8; }

/* ---- Progress ---- */
.progress-wrapper {
  max-width: 900px;
  margin: 24px auto 0;
  padding: 0 20px;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: .85em;
  color: var(--text-light);
  margin-bottom: 6px;
  font-weight: 500;
}
.progress-track {
  width: 100%;
  height: 10px;
  background: #d5d5d5;
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green-mid), var(--green-accent));
  border-radius: 10px;
  transition: width .5s ease;
}

/* ---- Section Tabs ---- */
.section-tabs {
  max-width: 900px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 8px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: #d5d5d5;
  color: var(--text-light);
  font-family: inherit;
  font-size: .75em;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.tab-btn.active {
  background: var(--white);
  color: var(--green-mid);
  box-shadow: 0 -2px 8px var(--shadow);
}
.tab-btn.completed {
  background: var(--green-pale);
  color: var(--green-mid);
}

/* ---- Card Container ---- */
.card {
  max-width: 900px;
  margin: 0 auto 30px;
  background: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
  padding: 32px 28px;
  animation: fadeUp .4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--green-pale);
}
.card-header .icon {
  width: 44px; height: 44px;
  background: var(--green-mid);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.2em;
  flex-shrink: 0;
}
.card-header h2 {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--green-dark);
}
.card-header span {
  font-size: .8em;
  color: var(--text-light);
  font-weight: 400;
}

/* ---- Question Row ---- */
.question-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background .2s;
}
.question-row:hover { background: #fafafa; }

.question-number {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green-mid);
  font-weight: 700;
  font-size: .8em;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.question-text {
  flex: 1;
  font-size: .92em;
  line-height: 1.5;
}
.answer-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-sim, .btn-nao {
  padding: 8px 18px;
  border: 2px solid #ccc;
  border-radius: 20px;
  background: var(--white);
  font-family: inherit;
  font-size: .82em;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
}
.btn-sim:hover { border-color: var(--green-mid); color: var(--green-mid); }
.btn-nao:hover { border-color: var(--red); color: var(--red); }
.btn-sim.selected {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: var(--white);
}
.btn-nao.selected {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ---- Navigation Footer ---- */
.nav-footer {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.nav-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 25px;
  font-family: inherit;
  font-size: .95em;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s;
}
.nav-btn.prev {
  background: #e0e0e0;
  color: var(--text);
}
.nav-btn.prev:hover { background: #ccc; }
.nav-btn.next {
  background: var(--green-mid);
  color: var(--white);
}
.nav-btn.next:hover { background: var(--green-light); transform: scale(1.03); }
.nav-btn.pdf {
  background: var(--blue);
  color: var(--white);
}
.nav-btn.pdf:hover { background: #1976d2; transform: scale(1.03); }
.nav-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
}

.hidden { display: none !important; }

/* ---- Counter Badge ---- */
.answer-counter {
  font-size: .82em;
  color: var(--text-light);
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .top-bar h1 { font-size: 1.05em; }
  .card { padding: 20px 16px; }
  .question-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .answer-btns { align-self: flex-end; }
  .tab-btn { min-width: 80px; font-size: .65em; padding: 8px 4px; }
  .section-tabs { gap: 4px; }
}
