/* Pantau Pangan theme */
:root {
  --green-900: #0b6033;
  --green-700: #1c8241;
  --green-500: #4ea44b;
  --green-300: #9cce58;
  --gold-500: #d69f2a;
  --text-dark: #0f2f1d;
  --text-muted: #4f6a57;
  --bg: #f4f8f2;
  --card: #ffffff;
  --shadow-lg: 0 28px 60px -28px rgba(12, 60, 35, 0.55);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --ring: rgba(15, 47, 29, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100%;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg);
  background-image:
    radial-gradient(at 10% 20%, rgba(76, 164, 75, 0.15), transparent 45%),
    radial-gradient(at 90% 10%, rgba(214, 159, 42, 0.18), transparent 50%),
    linear-gradient(140deg, rgba(11, 96, 51, 0.18) 0%, rgba(76, 164, 75, 0.14) 40%, rgba(156, 206, 88, 0.12) 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.background-ornament {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.background-ornament::before,
.background-ornament::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.65;
  transform: translateZ(0);
}

.background-ornament::before {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -120px;
  background: rgba(76, 164, 75, 0.35);
}

.background-ornament::after {
  width: 540px;
  height: 540px;
  right: -140px;
  bottom: -160px;
  background: rgba(214, 159, 42, 0.32);
}

.content-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(16px);
  background: rgba(244, 248, 242, 0.75);
  border-bottom: 1px solid rgba(15, 47, 29, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand img {
  width: clamp(140px, 22vw, 240px);
  height: auto;
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logout-form {
  margin: 0;
}

.brand-name {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-tagline {
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 400;
  color: var(--text-muted);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 500;
  color: #ffffff;
  background: linear-gradient(120deg, var(--green-700), var(--green-500));
  box-shadow: 0 12px 22px -14px rgba(12, 60, 35, 0.54);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cta-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 600;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px rgba(12, 60, 35, 0.66);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(130deg, var(--green-700), var(--green-500));
  box-shadow: 0 16px 32px -20px rgba(12, 60, 35, 0.7);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px -18px rgba(12, 60, 35, 0.75);
}

.btn.ghost {
  background: #fff;
  border-color: rgba(15, 47, 29, 0.12);
  color: var(--text-dark);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -22px rgba(12, 60, 35, 0.45);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Main content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: min(6vw, 70px) 0 60px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(30px, 6vw, 60px);
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero-copy h1 span {
  color: var(--green-700);
}

.hero-copy p {
  margin: 0;
  max-width: 520px;
  font-size: clamp(14px, 2.4vw, 17px);
  color: var(--text-muted);
}

.hero-image {
  justify-self: center;
  margin: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 18px 48px -22px rgba(12, 60, 35, 0.25);
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 320px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.form-section {
  position: relative;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--ring);
  overflow: hidden;
}

.form-card__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 4vw, 26px);
  background: linear-gradient(135deg, rgba(11, 96, 51, 0.14), rgba(78, 164, 75, 0.12));
  border-bottom: 1px solid rgba(15, 47, 29, 0.06);
}

.form-card__head h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 600;
}

.form-card__head p {
  margin: 0;
  max-width: 640px;
  font-size: clamp(13px, 2.2vw, 15px);
  color: var(--text-muted);
}

.form-block {
  padding: clamp(24px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-block__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  margin: 0;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
}


.form-alert {
  margin: clamp(18px, 4vw, 24px) clamp(20px, 4vw, 36px) 0;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: rgba(76, 164, 75, 0.12);
  border: 1px solid rgba(76, 164, 75, 0.24);
  color: var(--green-700);
  font-size: 0.9rem;
  display: none;
}

.form-alert.error {
  background: rgba(214, 71, 56, 0.16);
  border-color: rgba(214, 71, 56, 0.3);
  color: #9e1c0f;
}

.form {
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
}

.form-divider {
  height: 1px;
  margin: 0 clamp(24px, 4vw, 36px);
  background: rgba(15, 47, 29, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(24px, 4vw, 32px);
}

.form-grid.full-column {
  grid-template-columns: 1fr;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-field.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-field label,
.field-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.form-field label span,
.field-label span {
  color: var(--gold-500);
}

.form-field input,
.form-field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 47, 29, 0.12);
  padding: 12px 14px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  transition: border 160ms ease, box-shadow 160ms ease;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: rgba(28, 130, 65, 0.75);
  box-shadow: 0 0 0 3px rgba(76, 164, 75, 0.25);
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 47, 29, 0.12);
  border-radius: 14px;
  overflow: hidden;
}

.input-with-prefix .prefix {
  padding: 0 14px;
  font-weight: 500;
  color: var(--green-700);
  background: rgba(76, 164, 75, 0.08);
  border-right: 1px solid rgba(15, 47, 29, 0.12);
}

.input-with-prefix input {
  border: 0;
  flex: 1;
  padding: 12px 14px;
  background: transparent;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 47, 29, 0.12);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: border 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.option-item input {
  accent-color: var(--green-700);
  width: 16px;
  height: 16px;
}

.option-item span {
  font-size: 0.9rem;
}

.option-item:hover,
.option-item:has(input:checked) {
  border-color: rgba(28, 130, 65, 0.6);
  background: rgba(76, 164, 75, 0.12);
  box-shadow: 0 6px 20px -16px rgba(12, 60, 35, 0.45);
}

.market-summary {
  margin: 0 clamp(24px, 4vw, 36px);
  padding: 18px clamp(18px, 4vw, 24px);
  border-radius: var(--radius-lg);
  background: rgba(244, 248, 242, 0.9);
  border: 1px solid rgba(15, 47, 29, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.market-summary__empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.summary-list {
  margin: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.summary-list div {
  display: grid;
  gap: 6px;
}

.summary-list dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.summary-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-dark);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
}

.form-privacy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 47, 29, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 24px 60px -28px rgba(12, 60, 35, 0.55);
  max-width: min(420px, 90vw);
  text-align: center;
  display: grid;
  gap: 18px;
}

.modal-card h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
}

.modal-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal-card .modal-btn {
  align-self: center;
  min-width: 160px;
}

/* Footer */
footer.site-footer {
  padding: 24px 0 40px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Auth */
.auth-body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(76, 164, 75, 0.18), transparent 55%),
    radial-gradient(at 90% 10%, rgba(214, 159, 42, 0.18), transparent 55%),
    linear-gradient(140deg, rgba(11, 96, 51, 0.16) 0%, rgba(76, 164, 75, 0.12) 40%, rgba(156, 206, 88, 0.10) 100%);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 6vw, 48px);
}

.auth-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 48px);
  box-shadow: 0 24px 60px -30px rgba(12, 60, 35, 0.55);
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: center;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.auth-logo {
  width: clamp(160px, 40vw, 220px);
  height: auto;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 600;
}

.auth-brand p {
  margin: 0;
  max-width: 320px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.auth-alert {
  background: rgba(214, 71, 56, 0.12);
  border: 1px solid rgba(214, 71, 56, 0.28);
  color: #9e1c0f;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
}

.auth-submit {
  margin-top: 8px;
}

.auth-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive tweaks */
@media (max-width: 960px) {
  header.site-header {
    position: static;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-card {
    order: -1;
    text-align: center;
  }

  .cta-button {
    align-self: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand img {
    width: min(210px, 70vw);
  }

  .brand-meta {
    align-items: flex-start;
  }

  .cta-button {
    width: 100%;
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .logout-form {
    width: 100%;
  }

  .logout-form .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-image {
    display: none;
  }
}

@media (max-width: 420px) {
  .header-inner {
    align-items: stretch;
  }

  .brand {
    width: 100%;
  }

  .brand img {
    width: min(180px, 60vw);
  }

  .form-card__head {
    padding: 18px;
  }

  .form {
    padding: 22px;
  }
}

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