:root {
  --ag-green: #1F7A3A;
  --ag-green-dark: #0E4D24;
  --ag-leaf: #3CB54A;
  --ag-gold: #F5B301;
  --ag-red: #CE1126;
  --ag-cream: #F4F8F2;
  --ag-ink: #173022;
  --ag-muted: #5E7364;
  --ag-line: #E1EBDF;
  --ag-card: #ffffff;
  --shadow: 0 12px 30px rgba(14, 77, 36, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.agrofy-app {
  margin: 0;
  font-family: "Segoe UI", "Nunito Sans", "Noto Sans", sans-serif;
  color: var(--ag-ink);
  background:
    radial-gradient(900px 280px at 90% -10%, rgba(245, 179, 1, 0.18), transparent 50%),
    linear-gradient(180deg, #f7fbf4 0%, #eef6ea 100%);
  min-height: 100vh;
}
a { color: var(--ag-green); text-decoration: none; }
img, video { max-width: 100%; }
.ag-header, .ag-main, .ag-footer { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.ag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.ag-brand { display: flex; gap: 10px; align-items: center; color: inherit; }
.ag-brand strong { display: block; font-size: 1.15rem; }
.ag-brand small { color: var(--ag-muted); }
.ag-mark { width: 46px; height: 46px; display: grid; place-items: center; background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.ag-mark svg { width: 34px; height: 34px; }
.ag-logo-img { width: 120px; height: 42px; object-fit: contain; background: #fff; border-radius: 10px; }
.ag-nav { display: flex; gap: 14px; align-items: center; font-weight: 700; }
.ag-main { padding-bottom: 110px; }
.ag-hero, .ag-card, .ag-product, .ag-steps article, .ag-paybox {
  background: var(--ag-card);
  border: 1px solid var(--ag-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ag-hero {
  display: grid;
  gap: 12px;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(31, 122, 58, 0.95), rgba(14, 77, 36, 0.92)),
    #1F7A3A;
  color: white;
  margin-bottom: 22px;
}
.ag-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; margin: 0; }
.ag-hero p, .ag-kicker { margin: 0; }
.ag-kicker { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; font-weight: 800; color: var(--ag-gold); }
.ag-hero .ag-kicker { color: #ffe08a; }
.ag-search, .ag-filters, .ag-inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--ag-line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: var(--ag-ink);
}
textarea { min-height: 90px; }
label { display: grid; gap: 6px; font-weight: 700; margin: 10px 0; }
.ag-btn, button.ag-btn {
  border: 0;
  background: var(--ag-green);
  color: white;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ag-btn-ghost { background: #e8f5ea; color: var(--ag-green-dark); }
.ag-hero .ag-btn { background: var(--ag-gold); color: #3a2a00; }
.ag-grid, .ag-steps, .ag-split, .ag-stats { display: grid; gap: 14px; }
.ag-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 16px 0 28px; }
.ag-steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 10px 0 30px; }
.ag-split { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ag-stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.ag-stats div, .ag-steps article, .ag-card, .ag-product { padding: 16px; }
.ag-stats div { background: white; border-radius: 16px; border: 1px solid var(--ag-line); }
.ag-stats strong { display: block; font-size: 1.3rem; }
.ag-product { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.ag-thumb { aspect-ratio: 4/3; background: linear-gradient(160deg, #d9f0dc, #fff7d6); display: grid; place-items: center; }
.ag-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ag-ph { font-size: 2rem; font-weight: 800; color: var(--ag-green); }
.ag-product-body { padding: 14px; display: grid; gap: 6px; }
.ag-price { color: var(--ag-green-dark); font-size: 1.15rem; font-weight: 800; }
.ag-help, .ag-note { color: var(--ag-muted); }
.ag-alert { background: #fff1f1; color: #8d1d2c; padding: 12px 14px; border-radius: 12px; }
.ag-ok { background: #e9f8ec; color: #146232; padding: 12px 14px; border-radius: 12px; }
.ag-line { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ag-line); }
.ag-line input, .ag-line select { max-width: 140px; }
.ag-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ag-chip { background: white; border-radius: 999px; padding: 8px 12px; border: 1px solid var(--ag-line); font-weight: 700; }
.ag-hero .ag-chip { background: rgba(255,255,255,0.14); color: white; border-color: transparent; }
.ag-paybox { margin-top: 14px; padding: 16px; background: #fffaf0; }
.ag-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.ag-detail img, .ag-video { border-radius: 18px; background: #111; width: 100%; }
.ag-farm-hero { padding: 8px 0 18px; }
.ag-footer { display: flex; justify-content: space-between; gap: 12px; align-items: end; color: var(--ag-muted); padding-bottom: 24px; }
.ag-tabbar {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 20px));
  background: #12331f;
  color: white;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 22px;
  padding: 8px;
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.ag-tabbar a { color: #d7eadc; text-align: center; font-size: 0.82rem; font-weight: 700; padding: 8px 0; border-radius: 14px; }
.ag-tabbar a.is-active, .ag-tabbar a:hover { background: var(--ag-green); color: white; }
.ag-auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 640px; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 60px rgba(14, 77, 36, 0.16); background: white; margin: 8px 0 28px; }
.ag-auth-visual { background: linear-gradient(165deg, #146232, #0c3d1d 60%, #1d6b34); color: white; padding: 42px 36px; display: flex; align-items: flex-end; }
.ag-auth-visual h2 { font-size: 2.2rem; margin: 14px 0 8px; }
.ag-auth-visual ul { padding-left: 18px; line-height: 1.8; }
.ag-auth-logo { width: 92px; height: 92px; object-fit: contain; background: white; border-radius: 22px; padding: 8px; }
.ag-auth-panel { padding: 36px 32px; }
.ag-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f3f7f2; border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.ag-auth-tabs a { text-align: center; padding: 10px; border-radius: 999px; font-weight: 800; color: var(--ag-muted); }
.ag-auth-tabs a.is-on { background: white; color: var(--ag-green-dark); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.ag-auth-form input, .ag-auth-form select { background: #f7faf6; border-color: transparent; }
.ag-auth-form input:focus, .ag-auth-form select:focus { outline: 2px solid #b7e0c0; background: white; }
.ag-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ag-btn-wide { width: 100%; margin-top: 8px; padding: 14px; }
@media (max-width: 800px) {
  .ag-nav { display: none; }
  .ag-detail, .ag-stats, .ag-auth, .ag-auth-row { grid-template-columns: 1fr; }
  .ag-auth-visual { min-height: 220px; align-items: center; }
  .ag-header { padding-top: 10px; }
}
@media (max-width: 560px) {
  .ag-stats, .ag-detail { grid-template-columns: 1fr; }
  .ag-hero { padding: 22px; }
}
