:root {
  --green: #2f6b3a;
  --green-dark: #1f4a28;
  --bg: #f7f7f4;
  --card: #ffffff;
  --text: #222222;
  --muted: #666666;
  --border: #dddddd;
  --red: #b3261e;
  --red-bg: #fdecea;
  --orange: #a1590a;
  --orange-bg: #fdf1e0;
  --yellow: #7a6100;
  --yellow-bg: #fdf7d8;
  --gray-bg: #eef0ee;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

header {
  background: var(--green);
  color: #fff;
  padding: 20px 16px;
}
header h1 { margin: 0 0 4px; font-size: 1.4rem; }
header .tagline { margin: 0; font-size: 0.9rem; opacity: 0.92; }

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

footer {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

input[type="text"], input[type="number"], input[type="tel"], input[type="password"] {
  width: 100%;
  font-size: 1rem;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}

button {
  font-size: 1rem;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  width: 100%;
}
button:disabled { background: #a9c2ad; cursor: not-allowed; }
button:hover:not(:disabled) { background: var(--green-dark); }

button.secondary {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  margin-top: 10px;
}
button.secondary:hover { background: var(--gray-bg); }

.result-item {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  cursor: pointer;
}
.result-item:hover { background: var(--gray-bg); }
.result-item .sci-name { font-style: italic; font-weight: 600; }
.result-item .common-name { color: var(--muted); font-size: 0.9rem; }
.result-item .badges { margin-top: 4px; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge.status-prohibited, .badge.status-control_required { background: var(--red-bg); color: var(--red); }
.badge.status-permit_required, .badge.status-screening_required, .badge.status-restricted { background: var(--orange-bg); color: var(--orange); }
.badge.status-needs_manual_review { background: var(--yellow-bg); color: var(--yellow); }
.badge.status-not_required, .badge.status-not_applicable, .badge.status-compliant { background: var(--gray-bg); color: #3a3a3a; }

.overall-banner {
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 700;
  text-align: center;
}
.overall-banner.risk-high { background: var(--red-bg); color: var(--red); }
.overall-banner.risk-medium { background: var(--orange-bg); color: var(--orange); }
.overall-banner.risk-needs_manual_review { background: var(--yellow-bg); color: var(--yellow); }
.overall-banner.risk-low { background: var(--gray-bg); color: var(--green-dark); }

.question-block { margin-bottom: 18px; }
.question-block label.question-text {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
.option-row {
  display: flex;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
}
.option-row:last-child { border-bottom: none; }
.option-row input { margin-right: 10px; width: auto; }
.option-row label { flex: 1; }

.section-title { font-weight: 700; margin: 0 0 6px; font-size: 1rem; }
.section-summary { margin: 0 0 8px; }
.section-detail { font-size: 0.85rem; color: var(--muted); background: var(--gray-bg); padding: 8px 10px; border-radius: 6px; margin-bottom: 8px; white-space: pre-wrap; }
.warning-list { margin: 8px 0 0; padding-left: 18px; font-size: 0.88rem; color: var(--orange); }
.contact-box { font-size: 0.85rem; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.contact-box .label { font-weight: 600; }

.disclaimer-box {
  background: var(--yellow-bg);
  border: 1px solid #e6d98a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--yellow);
  margin-bottom: 16px;
}

.loading, .empty-state { color: var(--muted); padding: 12px 0; }
.error-box { background: var(--red-bg); color: var(--red); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 0.9rem; }

.species-header { margin-bottom: 12px; }
.species-header .sci-name { font-style: italic; font-size: 1.1rem; font-weight: 700; }
.species-header .common-name { color: var(--muted); }

.actions-row { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.actions-row button { width: 100%; }

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}
.account-bar-balance { font-weight: 700; color: var(--green-dark); }
.btn-sm { width: auto; padding: 6px 10px; font-size: 0.78rem; margin-top: 0; }

.report-meta { display: none; }

@media print {
  body { background: #fff; }
  header .tagline, footer, .print-hide { display: none !important; }
  header { background: #fff; color: #000; padding: 0 0 10px; border-bottom: 2px solid #000; }
  main { max-width: none; padding: 0; }
  .report-meta { display: block; margin-bottom: 10px; font-size: 0.8rem; color: #444; }
  .card, .disclaimer-box, .overall-banner { border: 1px solid #999; box-shadow: none; background: #fff !important; color: #000 !important; }
  .badge { border: 1px solid #666; background: #fff !important; color: #000 !important; }
  .section-detail { background: #f2f2f2 !important; color: #000 !important; }
}

.company-info {
  margin-top: 6px;
  font-size: 0.72rem;
  opacity: 0.75;
}
