/* SeedShield design system. Palette follows Seed Co's brand greens with maize gold. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/static/assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --green: #02A64F;        /* Seed Co brand green: fills, icons, marks */
  --green-600: #028D43;
  --green-700: #04693C;    /* text-safe green, primary buttons */
  --forest: #00311B;       /* deepest brand green: nav, hero */
  --forest-2: #0A4A2B;
  --mint: #E7F6EC;
  --gold: #FCB900;         /* maize */
  --gold-ink: #8A5A00;     /* text-safe gold */
  --gold-soft: #FFF4D1;
  --red: #D7261E;          /* alarm */
  --red-ink: #B11D16;
  --red-soft: #FDECEA;
  --blue: #2F5D8A;         /* farmer reports */
  --blue-soft: #E8EFF7;

  --bg: #F4F7F3;
  --surface: #FFFFFF;
  --surface-2: #F8FAF7;
  --line: #E1E7E0;
  --line-strong: #CBD5CA;
  --ink: #0F2418;
  --ink-2: #33473A;
  --muted: #5B6B61;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 36, 24, .06);
  --shadow: 0 1px 2px rgba(15, 36, 24, .05), 0 6px 20px -8px rgba(15, 36, 24, .14);
  --shadow-lg: 0 24px 60px -18px rgba(0, 49, 27, .35);
  --focus: 0 0 0 3px rgba(252, 185, 0, .55);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
a { color: var(--green-700); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* icons */
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 26px; height: 26px; }
.ic-xl { width: 44px; height: 44px; }

/* brand lockup */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 34px; height: 34px; display: block; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; line-height: 1; }
.brand-name b { color: var(--green); font-weight: 800; }
.brand-sub { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-top: 3px; }
.on-dark .brand-name b { color: #4BD58A; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 14.5px; text-decoration: none; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s ease;
  white-space: nowrap; min-height: 42px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--forest-2); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(15, 36, 24, .06); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-lg { padding: 15px 20px; font-size: 16.5px; border-radius: 12px; min-height: 54px; }
.btn-block { width: 100%; }
.icon-btn { padding: 8px; min-height: 38px; min-width: 38px; }

/* form controls */
.input, .select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); min-height: 42px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: var(--green-700); box-shadow: var(--focus); outline: none; }
.field-label { display: block; font-weight: 700; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }

/* cards, pills, badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.pill-gold { background: var(--gold-soft); border-color: #F5DD8F; color: var(--gold-ink); }
.pill-green { background: var(--mint); border-color: #BFE7CE; color: var(--green-700); }
.pill-red { background: var(--red-soft); border-color: #F6C5C1; color: var(--red-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 2000; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 12px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow-lg);
  animation: toast-in .28s cubic-bezier(.2, .8, .2, 1);
}
.toast[data-tone="bad"] { border-left-color: var(--red); }
.toast[data-tone="warn"] { border-left-color: var(--gold); }
.toast[data-tone="info"] { border-left-color: var(--blue); }
.toast .ic { margin-top: 1px; }
.toast[data-tone="bad"] .ic { color: var(--red); }
.toast[data-tone="warn"] .ic { color: var(--gold-ink); }
.toast[data-tone="good"] .ic { color: var(--green-700); }
.toast-t { font-weight: 700; font-size: 14px; }
.toast-d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.toast button { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 25, 14, .55); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 3000; padding: 16px; animation: fade .2s ease;
}
.modal { width: min(440px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px; }
.modal h2 { font-size: 20px; margin: 14px 0 6px; }
.modal p { color: var(--muted); margin: 0 0 18px; }
.modal-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--mint); color: var(--green-700); }
.modal-icon.danger { background: var(--red-soft); color: var(--red); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.form-error { color: var(--red-ink); font-size: 13px; font-weight: 600; margin-top: 8px; min-height: 1em; }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
