/* =========================================================
   云锄牧 · Premium visual refinement
   Loaded after the base system styles.
   ========================================================= */

:root {
  --forest: #153b2b;
  --forest-deep: #0d2b1e;
  --moss: #3a5b46;
  --gold: #c7a05a;
  --gold-soft: #f0e3c6;
  --cream: #f5f1e6;
  --paper: #fdfbf5;
  --white: #fffefa;
  --line: rgba(26, 49, 37, 0.11);
  --line-strong: rgba(26, 49, 37, 0.19);
  --shadow-sm: 0 1px 2px rgba(22, 45, 32, 0.04), 0 8px 24px rgba(22, 45, 32, 0.05);
  --shadow-md: 0 22px 60px rgba(22, 45, 32, 0.11);
  --maxw: 1280px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

body {
  font-size: 15.5px;
  letter-spacing: 0.004em;
}

::selection {
  background: var(--gold-soft);
  color: var(--forest-deep);
}

/* ---------- public shell ---------- */

.site-nav {
  background: rgba(250, 247, 239, 0.9);
  border-bottom-color: rgba(26, 49, 37, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.nav-inner {
  height: 84px;
  gap: 44px;
}

.nav-links {
  gap: 30px;
}

.nav-links a,
.nav-links button {
  font-size: 12.5px;
  letter-spacing: 0.035em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.brand-word strong {
  font-size: 21px;
  letter-spacing: 0.1em;
}

.hero {
  padding: 68px 0 100px;
  gap: clamp(44px, 6vw, 96px);
  min-height: calc(100vh - 118px);
}

.hero h1 {
  font-size: clamp(52px, 6vw, 92px);
  line-height: 1.045;
  letter-spacing: -0.05em;
}

.hero-lede {
  max-width: 480px;
  font-size: 16px;
  line-height: 2;
  color: #465548;
}

.hero-actions {
  margin-top: 38px;
  gap: 14px;
}

.hero-image-frame {
  border-radius: 36px;
  aspect-ratio: 4 / 4.75;
  box-shadow: 0 36px 90px rgba(21, 59, 43, 0.2);
}

.hero-live-card,
.hero-weather-card,
.hero-crop-card {
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(21, 45, 31, 0.16);
}

.btn {
  letter-spacing: 0.045em;
  font-weight: 600;
}

.btn-dark {
  box-shadow: 0 8px 22px rgba(21, 59, 43, 0.18);
}

.btn-dark:hover {
  box-shadow: 0 12px 28px rgba(21, 59, 43, 0.24);
}

.eyebrow {
  letter-spacing: 0.2em;
}

.section-head h2,
.section-title h2 {
  letter-spacing: -0.025em;
}

/* ---------- dashboard shell ---------- */

.app-layout {
  grid-template-columns: 264px minmax(0, 1fr);
  background:
    radial-gradient(circle at 88% 2%, rgba(199, 160, 90, 0.08), transparent 26%),
    #f3efe4;
}

.sidebar {
  border-right: 1px solid rgba(26, 49, 37, 0.08);
  background: #faf7ee;
}

.sidebar-top {
  padding-top: 22px;
}

.side-link {
  min-height: 44px;
  border-radius: 10px;
  font-size: 12px;
  letter-spacing: 0.015em;
}

.side-link .icon {
  width: 17px;
  height: 17px;
}

.side-link.is-active {
  box-shadow: 0 10px 22px rgba(21, 59, 43, 0.2);
}

.side-label {
  letter-spacing: 0.16em;
}

.sidebar-help {
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(21, 59, 43, 0.06);
}

.app-topbar {
  height: 72px;
  background: rgba(250, 247, 239, 0.88);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom-color: rgba(26, 49, 37, 0.08);
}

.app-main {
  max-width: 1500px;
  padding: 36px 40px 84px;
}

.page-heading h1 {
  font-size: 36px;
  letter-spacing: -0.035em;
}

/* ---------- admin / management surfaces ---------- */

.admin-management,
.admin-goods-page,
.admin-goods-orders-page,
.farmer-applications-page {
  gap: 20px;
}

.panel {
  border-radius: 18px;
  border-color: rgba(26, 49, 37, 0.1);
  box-shadow: 0 16px 42px rgba(26, 49, 37, 0.045);
}

.panel-head h2,
.panel-head-inline h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.admin-summary {
  gap: 14px;
}

.admin-summary > div {
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(26, 49, 37, 0.035);
}

.admin-summary span {
  font-size: 10px;
  letter-spacing: 0.04em;
}

.admin-summary strong {
  margin: 10px 0 3px;
  font-size: 27px;
  letter-spacing: -0.02em;
}

.admin-summary em {
  font-size: 9.5px;
}

.admin-management .admin-hint,
.payment-config-note,
.panel .admin-hint {
  font-size: 10.5px;
  line-height: 1.8;
}

.data-table th {
  padding-top: 13px;
  padding-bottom: 13px;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.data-table td {
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 12px;
}

.data-table td small {
  font-size: 10px;
  line-height: 1.6;
}

.data-table .table-product img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

/* ---------- cost pages: calmer proportions ---------- */

.cost-table {
  table-layout: fixed;
}

.cost-table th:nth-child(1) {
  width: 30%;
}

.cost-table th:nth-child(2) {
  width: 14%;
}

.cost-table th:nth-child(3) {
  width: 34%;
}

.cost-table th:nth-child(4) {
  width: 11%;
}

.cost-table th:nth-child(5) {
  width: 11%;
}

.cost-product-row > td {
  padding: 15px 16px;
  background: rgba(253, 251, 245, 0.72);
}

.cost-product-row .muted {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding-left: 2px;
  color: #7a8478;
  font-size: 11px;
  letter-spacing: 0.01em;
}

.cost-spec-row > td {
  padding: 8px 14px 14px;
  background: #fbf8ef;
  border-top: 1px solid rgba(26, 49, 37, 0.07);
}

.spec-cost-list {
  gap: 0;
  padding: 5px 0 0 14px;
  border-left: 1px solid rgba(199, 160, 90, 0.55);
}

.spec-cost-head {
  gap: 12px;
  margin-bottom: 7px;
  padding: 0 2px;
}

.spec-cost-head span {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a32;
}

.spec-cost-head small {
  color: #8a9387;
  font-size: 9.5px;
}

.spec-cost-item {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) 100px 130px 118px 145px;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border: 1px solid rgba(26, 49, 37, 0.07);
  border-radius: 9px;
  background: rgba(255, 254, 250, 0.78);
}

.spec-cost-item + .spec-cost-item {
  margin-top: 6px;
}

.spec-cost-item > strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.spec-cost-item > span {
  color: #7a8478;
  font-size: 10px;
}

.spec-cost-item label {
  gap: 6px;
  font-size: 10px;
  color: #8a9387;
}

.spec-cost-item input {
  width: 100%;
  height: 30px;
  padding: 5px 8px;
  border-radius: 6px;
  border-color: rgba(26, 49, 37, 0.12);
  background: #fffefa;
  font-size: 11px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.spec-cost-item input:focus {
  outline: none;
  border-color: rgba(199, 160, 90, 0.8);
  box-shadow: 0 0 0 3px rgba(199, 160, 90, 0.12);
}

.spec-cost-item .spec-settlement {
  margin-left: 0;
  justify-self: end;
  color: #69766b;
  font-size: 10px;
  white-space: nowrap;
}

.spec-cost-item .spec-settlement strong {
  color: var(--forest);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
}

.spec-cost-item .btn {
  display: none;
}

.bulk-profit {
  padding: 12px 16px;
  border: 1px solid rgba(26, 49, 37, 0.08);
  border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(253, 251, 245, 0.7);
}

.panel-head-actions {
  gap: 12px;
}

.panel-head-actions .inline-field {
  padding: 4px 5px 4px 12px;
  border: 1px solid rgba(26, 49, 37, 0.1);
  border-radius: 9px;
  background: #fffefa;
}

.panel-head-actions .inline-field select {
  border: 0;
  background: transparent;
  font-size: 11px;
}

.panel-head-actions .btn {
  min-height: 38px;
  padding-inline: 18px;
  border-radius: 9px;
}

/* ---------- mobile proportions ---------- */

@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-main {
    padding: 24px 22px 64px;
  }

  .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-table {
    table-layout: auto;
  }

  .cost-table th:nth-child(n) {
    width: auto;
  }

  .spec-cost-item {
    grid-template-columns: minmax(120px, 1.2fr) 90px 112px 105px 130px;
    gap: 8px;
    padding: 9px 8px;
  }

  .spec-cost-item > span:first-of-type {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    height: 72px;
  }

  .hero {
    padding: 38px 0 64px;
    min-height: 0;
  }

  .hero h1 {
    font-size: clamp(40px, 10vw, 58px);
  }

  .app-main {
    padding: 20px 16px 56px;
  }

  .admin-summary > div {
    padding: 16px;
  }

  .admin-summary strong {
    font-size: 23px;
  }

  .panel {
    border-radius: 14px;
  }

  .spec-cost-list {
    padding-left: 9px;
  }

  .spec-cost-item {
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    align-items: end;
  }

  .spec-cost-item > strong,
  .spec-cost-item > span {
    grid-column: 1 / -1;
  }

  .spec-cost-item > span:first-of-type {
    display: none;
  }

  .spec-cost-item .spec-settlement {
    justify-self: start;
  }

  .spec-cost-item label {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
  }

  .spec-cost-item label input {
    grid-column: 2;
  }

  .panel-head-actions {
    width: 100%;
  }
}

/* ---------- login + farmer onboarding entry ---------- */

.nav-farmer-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid rgba(199, 160, 90, 0.45);
  border-radius: 999px;
  background: rgba(240, 227, 198, 0.38);
  color: #7d5c24 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.03em;
}

.nav-farmer-link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 160, 90, 0.16);
}

.nav-farmer-link:hover {
  border-color: rgba(199, 160, 90, 0.7);
  background: rgba(240, 227, 198, 0.65);
}

.hero-farmer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(199, 160, 90, 0.55);
  color: #7d5c24;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.hero-farmer-link .icon {
  width: 14px;
  height: 14px;
}

.hero-farmer-link span {
  font-family: var(--font-num);
  font-size: 14px;
  transition: transform 0.2s var(--ease);
}

.hero-farmer-link:hover span {
  transform: translateX(3px);
}

.mobile-menu-panel .mobile-farmer-link {
  margin: 7px 0;
  padding: 12px 14px;
  border: 1px solid rgba(199, 160, 90, 0.35);
  border-radius: 10px;
  background: rgba(240, 227, 198, 0.55);
  color: #6e5222;
  font-weight: 600;
}

.auth-modal {
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 620px;
}

.auth-panel {
  padding: 42px 46px 34px;
}

.auth-brand {
  margin-bottom: 20px;
}

.auth-panel h2 {
  font-size: 34px;
  line-height: 1.2;
}

.auth-sub {
  margin: 8px 0 18px;
  font-size: 11.5px;
  line-height: 1.75;
}

.auth-farmer-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(199, 160, 90, 0.42);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(240, 227, 198, 0.72), rgba(255, 253, 248, 0.88));
  box-shadow: 0 8px 22px rgba(199, 160, 90, 0.08);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.auth-farmer-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(199, 160, 90, 0.7);
  box-shadow: 0 12px 28px rgba(199, 160, 90, 0.14);
}

.auth-farmer-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--forest);
  color: var(--lime);
}

.auth-farmer-icon .icon {
  width: 17px;
  height: 17px;
}

.auth-farmer-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.auth-farmer-copy strong {
  color: #5f481d;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.auth-farmer-copy small {
  color: #8a7959;
  font-size: 9.5px;
  line-height: 1.5;
}

.auth-farmer-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: #7d5c24;
  font-size: 9.5px;
  white-space: nowrap;
}

.auth-farmer-arrow .icon {
  width: 12px;
  height: 12px;
}

.auth-tabs button {
  padding: 9px 8px;
  font-size: 11.5px;
}

.auth-panel .field {
  margin-bottom: 12px;
}

.auth-panel .field > span {
  font-size: 10px;
  letter-spacing: 0.03em;
}

.auth-panel .field input {
  min-height: 44px;
  font-size: 12.5px;
}

.auth-panel .btn-block {
  min-height: 48px;
  font-size: 12.5px;
}

.auth-legal {
  font-size: 8.5px;
  line-height: 1.8;
}

.auth-visual-copy p {
  font-size: 24px;
  line-height: 1.45;
}

.auth-visual-copy small {
  font-size: 9px;
}

@media (max-width: 900px) {
  .auth-modal {
    min-height: 0;
  }

  .auth-panel {
    padding: 34px 26px 26px;
  }

  .auth-panel h2 {
    font-size: 28px;
  }

  .auth-farmer-entry {
    padding: 11px 12px;
  }
}

@media (max-width: 640px) {
  .nav-farmer-link {
    display: none;
  }

  .auth-panel {
    padding: 28px 20px 22px;
  }

  .auth-panel h2 {
    font-size: 26px;
  }

  .auth-farmer-copy small {
    max-width: 190px;
  }

  .auth-farmer-arrow {
    font-size: 0;
  }

  .auth-farmer-arrow .icon {
    width: 15px;
    height: 15px;
  }
}

/* ---------- homepage farm pantry ---------- */

.home-goods-section {
  position: relative;
  padding-top: 26px;
}

.home-goods-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 160, 90, 0.45), transparent);
}

.home-goods-section .section-head {
  margin-bottom: 28px;
}

.home-goods-grid {
  gap: 18px;
}

.home-goods-grid .goods-card {
  background: #fffefa;
  border-color: rgba(26, 49, 37, 0.09);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(26, 49, 37, 0.045);
}

.home-goods-grid .goods-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(26, 49, 37, 0.1);
}

.home-goods-grid .goods-body {
  padding: 16px 17px 18px;
}

.home-goods-grid .goods-body h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.home-goods-grid .goods-sub {
  min-height: 34px;
}

.home-goods-grid .goods-foot strong {
  font-size: 20px;
}

@media (max-width: 980px) {
  .home-goods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .home-goods-grid {
    gap: 12px;
  }

  .home-goods-grid .goods-body {
    padding: 13px 13px 15px;
  }

  .home-goods-grid .goods-body h3 {
    font-size: 17px;
  }

  .home-goods-grid .goods-sub {
    display: none;
  }
}

/* ---------- final proportion pass: calmer hero/section scale ---------- */

.nav-inner {
  height: 76px;
}

.hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(34px, 4.5vw, 64px);
  padding: 36px 0 58px;
  min-height: 0;
}

.hero-eyebrow {
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 em::after {
  height: 8px;
  bottom: 3px;
}

.hero-lede {
  max-width: 455px;
  margin-top: 20px;
  font-size: 14.5px;
  line-height: 1.85;
}

.hero-actions {
  margin-top: 26px;
  gap: 10px;
}

.hero-actions .btn {
  min-height: 44px;
  padding-inline: 20px;
  font-size: 12.5px;
}

.hero-farmer-link {
  margin-top: 14px;
  font-size: 11.5px;
}

.hero-proof {
  margin-top: 28px;
}

.hero-visual {
  padding: 8px 4px 22px 12px;
}

.hero-image-frame {
  aspect-ratio: 4 / 4.45;
  max-height: 500px;
  border-radius: 28px;
}

.hero-season {
  top: 16px;
  right: 16px;
  font-size: 10px;
}

.hero-live-card,
.hero-weather-card,
.hero-crop-card {
  transform: scale(0.92);
  transform-origin: right bottom;
}

.section-head {
  gap: 44px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.18;
}

.section-head-side {
  max-width: 300px;
}

.section-head-side p,
.section-head-note {
  font-size: 12.5px;
  line-height: 1.75;
}

.page-heading h1 {
  font-size: 32px;
}

.farmer-apply-main {
  padding-top: 42px;
  padding-bottom: 64px;
}

.farmer-apply-intro h1 {
  font-size: clamp(32px, 3.8vw, 48px);
}

@media (max-width: 900px) {
  .hero {
    gap: 28px;
    padding: 28px 0 48px;
  }

  .hero h1 {
    font-size: clamp(38px, 7.2vw, 52px);
  }

  .hero-image-frame {
    max-height: 420px;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    height: 70px;
  }

  .hero {
    padding: 24px 0 42px;
  }

  .hero h1 {
    font-size: clamp(36px, 9.5vw, 48px);
  }

  .hero-lede {
    font-size: 13.5px;
    margin-top: 16px;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-actions .btn {
    min-height: 42px;
    font-size: 12px;
  }

  .hero-proof {
    margin-top: 22px;
  }

  .hero-image-frame {
    aspect-ratio: 4 / 3.9;
    max-height: 360px;
  }

  .section-head {
    gap: 18px;
    margin-bottom: 26px;
  }

  .section-head h2 {
    font-size: 32px;
  }
}

/* ---------- support: edge tab instead of floating pill ---------- */

.nav-support {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(26, 49, 37, 0.1);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.6);
  color: var(--moss);
  font-size: 11px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.nav-support:hover {
  border-color: rgba(199, 160, 90, 0.5);
  background: var(--gold-soft);
}

.nav-support .icon {
  width: 14px;
  height: 14px;
}

.support-fab {
  position: fixed;
  right: 10px;
  bottom: 112px;
  z-index: 900;
  width: 44px;
  min-height: 96px;
  padding: 12px 6px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: rgba(21, 59, 43, 0.92);
  color: #f7f2e7;
  box-shadow: -6px 10px 28px rgba(21, 59, 43, 0.18);
  opacity: 0.92;
  backdrop-filter: blur(12px);
  transition: right .2s var(--ease), opacity .2s var(--ease), background .2s var(--ease);
}

.support-fab:hover {
  right: 0;
  opacity: 1;
  background: var(--forest);
}

.support-fab .icon {
  width: 17px;
  height: 17px;
  color: var(--lime);
}

.support-fab span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

@media (max-width: 1100px) {
  .nav-support span {
    display: none;
  }

  .nav-support {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .nav-support {
    display: none;
  }

  .support-fab {
    right: 8px;
    bottom: 82px;
    width: 40px;
    min-height: 88px;
    padding: 10px 5px 12px;
    border-radius: 12px 0 0 12px;
  }

  .support-fab span {
    font-size: 10px;
  }
}

/* ---------- homepage phone preview follows account ---------- */

.pm-btn {
  text-decoration: none;
  justify-content: center;
  cursor: pointer;
}

.pm-order {
  align-items: flex-start;
  margin-top: 10px;
}

.pm-order > div {
  min-width: 0;
}

.pm-order strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-progress {
  height: 4px;
  margin: 9px 2px 7px;
  border-radius: 99px;
  background: rgba(21, 59, 43, 0.1);
  overflow: hidden;
}

.pm-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moss), var(--leaf));
}

.pm-order-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 2px 10px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.6;
}

.pm-order-note .icon {
  width: 10px;
  height: 10px;
  color: var(--moss);
}
