:root {
  --bt-green: #0a4520;
  --bt-green-mid: #0a4520;
  --bt-green-dark: #062a14;
  --bt-green-light: #0d5529;
  --bt-accent: #8ad41d;
  --bt-text: #1a3d24;
  --bt-text-muted: #3d5240;
  --bt-text-body: #2a4a32;
  --bt-navbar-bg: #083d1c;
  --bt-navbar-bg-dark: #062a14;
  --bt-gradient: linear-gradient(155deg, #0d5529 0%, #0a4520 48%, #062a14 100%);
  --bt-gradient-header: #083d1c;
  --bt-glass-bg: rgba(255, 255, 255, 0.82);
  --bt-glass-border: rgba(255, 255, 255, 0.95);
  --bt-radius-xl: 22px;
  --bt-radius-lg: 16px;
  --bt-radius-md: 12px;
  --bt-shadow-tray: 0 8px 32px rgba(43, 127, 31, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  --bt-shadow-card: 0 6px 18px rgba(30, 98, 22, 0.14);
  --bt-shadow-lift: 0 22px 44px rgba(43, 127, 31, 0.28);
  --bt-ease: cubic-bezier(0.34, 1.4, 0.64, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  background-color: #eef6ec;
  overscroll-behavior: none;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  min-height: 100%;
  min-height: 100dvh;
  background: transparent;
  color: var(--bt-text-body);
  line-height: 1.65;
  overflow-x: clip;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(138, 212, 29, 0.12), transparent 50%),
    linear-gradient(180deg, #eef6ec 0%, #f4faf3 45%, #f8fbf7 100%);
}

body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  top: 100%;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background: #f8fbf7;
}

body > main {
  position: relative;
  z-index: 0;
  min-height: calc(100dvh - 102px - env(safe-area-inset-top, 0px));
  background: transparent;
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding-left: max(15px, env(safe-area-inset-left, 0px));
  padding-right: max(15px, env(safe-area-inset-right, 0px));
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

.top-header {
  background: var(--bt-gradient-header);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  width: 100%;
  padding-top: calc(15px + env(safe-area-inset-top, 0px));
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 24px;
  box-shadow:
    0 6px 24px rgba(30, 98, 22, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: visible;
}

.top-header::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 100vh;
  background: var(--bt-gradient-header);
  pointer-events: none;
}

/* Homepage / main header: logo left edge, bell right edge */
.top-header:not(.top-header--history)>.container.nav-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 72px;
}

.top-header:not(.top-header--history) .brand {
  position: absolute;
  left: max(14px, env(safe-area-inset-left, 0px));
  top: 0;
  bottom: 0;
  height: max-content;
  margin-top: auto;
  margin-bottom: auto;
  z-index: 2;
  max-width: calc(100% - 72px - max(14px, env(safe-area-inset-left, 0px)) - max(14px, env(safe-area-inset-right, 0px)));
}

.top-header:not(.top-header--history) .header-notif {
  position: absolute;
  right: max(14px, env(safe-area-inset-right, 0px));
  top: 50%;
  margin-top: -24px;
  height: auto;
  z-index: 160;
}

.top-header:not(.top-header--history) .header-notif-panel {
  right: max(14px, env(safe-area-inset-right, 0px));
  left: auto;
}

/* Never show panel/backdrop while they live inside the header flex row */
.top-header .header-notif-panel,
.top-header .header-notif-backdrop,
.nav-wrapper .header-notif-panel,
.nav-wrapper .header-notif-backdrop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body > .header-notif-panel[hidden],
body > .header-notif-backdrop[hidden] {
  display: none !important;
}

body > .header-notif-panel:not([hidden]) {
  display: flex;
  visibility: visible;
  pointer-events: auto;
}

body > .header-notif-backdrop:not([hidden]) {
  display: block;
  visibility: visible;
  pointer-events: auto;
}

.top-header:not(.top-header--history) + main {
  padding-top: calc(102px + env(safe-area-inset-top, 0px));
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  overflow: visible;
}

.top-header--history + main {
  padding-top: calc(106px + env(safe-area-inset-top, 0px));
}

.top-header--history + .profiles-page {
  margin-top: 0;
  padding-top: calc(146px + env(safe-area-inset-top, 0px));
}

.top-header--history + .pi-main {
  padding-top: calc(154px + env(safe-area-inset-top, 0px));
}

.top-header--history + .transaction-main {
  padding-top: calc(146px + env(safe-area-inset-top, 0px));
}

.top-header--history .nav-title {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.6px;
  font-size: clamp(1.05rem, 4.2vw, 1.75rem);
  line-height: 1.25;
  text-align: center;
  flex: 1;
  min-width: 0;
  padding: 0 6px;
}

.top-header--history .nav-wrapper {
  min-height: 76px;
}

.nav-wrapper--history {
  justify-content: center;
  align-items: center;
  padding-left: clamp(52px, 14vw, 64px);
  padding-right: clamp(52px, 14vw, 64px);
}

/* Back + notif pin to full header edges (not the centered .container box) */
.top-header--history .nav-back {
  position: absolute;
  left: max(10px, env(safe-area-inset-left, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50%;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.top-header--history .nav-back:hover {
  background: rgba(255, 255, 255, 0.14);
}

.top-header--history .header-notif {
  position: absolute;
  right: max(10px, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.top-header--history .header-notif-panel {
  right: max(10px, env(safe-area-inset-right, 0px));
  left: auto;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  padding: 10px;
  border-radius: 50%;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.nav-back:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-back-icon {
  width: clamp(20px, 5vw, 24px);
  height: clamp(20px, 5vw, 24px);
  display: block;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .top-header:not(.top-header--history) .brand {
    left: max(20px, env(safe-area-inset-left, 0px));
  }

  .top-header:not(.top-header--history) .header-notif,
  .top-header:not(.top-header--history) .header-notif-panel {
    right: max(20px, env(safe-area-inset-right, 0px));
  }

  .top-header--history .nav-back {
    left: max(18px, env(safe-area-inset-left, 0px));
    width: 48px;
    height: 48px;
  }

  .top-header--history .header-notif {
    right: max(18px, env(safe-area-inset-right, 0px));
  }

  .top-header--history .header-notif-panel {
    right: max(18px, env(safe-area-inset-right, 0px));
  }
}

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

.brand-greeting {
  color: #ffffff;
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
}

.brand-logo-image {
  width: 58px;
  height: 58px;
  object-fit: contain;
  transform: scale(1.85);
  transform-origin: left center;
  margin-right: 44px;
}

.report-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.3px;
  transition: opacity 0.2s ease;
}

.report-link:hover {
  opacity: 0.85;
}

.report-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.report-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

.report-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 36px));
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-page-shell {
  width: min(1140px, calc(100% - 20px));
  margin-top: 24px;
  margin-bottom: 48px;
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(10px, env(safe-area-inset-right, 0px));
}

.report-chat--page {
  position: static;
  right: auto;
  bottom: auto;
  width: min(860px, 100%);
  height: min(70vh, 680px);
  margin: 0 auto;
}

.report-sheet {
  width: 100%;
  margin: 0 auto;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.report-sheet-header {
  padding: 18px 20px 14px;
  border-bottom: none;
  border-radius: var(--bt-radius-xl);
  background: var(--bt-gradient-header);
  box-shadow: none;
}

.report-sheet-header h2 {
  font-size: 26px;
  color: #ffffff;
  margin-bottom: 6px;
}

.report-sheet-header p {
  color: rgba(255, 255, 255, 0.78);
}

.report-reasons {
  padding: 0;
}

.report-reason {
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.report-reason:hover {
  background: rgba(43, 127, 31, 0.08);
  box-shadow: inset 3px 0 0 var(--bt-accent);
}

.report-reason.is-selected {
  background: rgba(43, 127, 31, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  cursor: default;
}

.report-reason.is-selected .report-reason-sub {
  display: none;
}

.report-reason.is-selected .report-reason-title {
  color: #2b7f1f;
}

.report-reason.is-selected + .report-details {
  border-top: 2px solid rgba(43, 127, 31, 0.18);
}

.report-details {
  padding: 14px 18px 18px;
  background: #f5f7f5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    max-height 0.34s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.28s ease,
    transform 0.34s cubic-bezier(0.32, 0.72, 0, 1),
    padding 0.34s ease;
  padding-top: 0;
  padding-bottom: 0;
}

.report-details.is-open {
  max-height: 2400px;
  opacity: 1;
  transform: translateY(0);
  padding: 14px 18px 18px;
}

.report-details[hidden] {
  display: none !important;
}

.report-reason-title {
  font-weight: 800;
  color: #111;
  font-size: 18px;
  margin-bottom: 3px;
}

.report-reason-sub {
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  line-height: 1.35;
}

.report-reason-chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(43, 127, 31, 0.1);
  color: #2b7f1f;
  font-size: 0;
  line-height: 1;
  transition:
    background 0.2s ease,
    transform 0.28s ease;
}

.report-reason-chevron::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}

.report-reason.is-selected .report-reason-chevron {
  cursor: pointer;
  background: rgba(43, 127, 31, 0.16);
}

.report-reason.is-selected .report-reason-chevron::before {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.report-reason.is-selected .report-reason-chevron:hover {
  background: rgba(43, 127, 31, 0.24);
}

.report-details:not(.is-open) .report-chat--embed {
  pointer-events: none;
}

.report-quick-options {
  margin-bottom: 10px;
}

.report-quick-options--in-chat {
  padding: 10px 12px 6px;
  margin-bottom: 0;
  background: transparent;
}

.report-quick-hint {
  font-weight: 800;
  color: rgba(0, 0, 0, 0.62);
  margin-bottom: 8px;
}

.report-quick-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-quick-btn {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  color: #2b7f1f;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.report-quick-btn:hover {
  background: #ffffff;
  border-color: rgba(43, 127, 31, 0.35);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.1);
}

.report-chat-send:disabled,
.report-chat-input:disabled {
  cursor: not-allowed;
}

.report-reporter-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.report-reporter-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  font-size: 0.95rem;
}

.report-farmer-label {
  margin: 4px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2b7f1f;
}

.report-farmer-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.report-farmer-hint {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.35;
}

.report-chat--embed {
  position: static;
  width: 100%;
  height: min(360px, 52vh);
  min-height: 240px;
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.report-chat-header {
  background: #2b7f1f;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-chat-title {
  font-weight: 800;
  letter-spacing: 0.3px;
}

.report-chat-close {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.report-chat-body {
  padding: 14px;
  overflow: auto;
  flex: 1;
  background: #f5f7f5;
}

.report-chat-row {
  display: flex;
  margin-bottom: 10px;
}

.report-chat-row.bot {
  justify-content: flex-start;
}

.report-chat-row.user {
  justify-content: flex-end;
}

.report-chat-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.report-chat-row.bot .report-chat-bubble {
  background: #ffffff;
  color: #21421a;
}

.report-chat-row.user .report-chat-bubble {
  background: #2b7f1f;
  color: #ffffff;
  border-color: rgba(0, 0, 0, 0);
}

.report-chat-form {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.report-chat-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 999px;
  padding: 10px 12px;
  outline: none;
}

.report-chat-input:focus {
  border-color: #2b7f1f;
  box-shadow: 0 0 0 3px rgba(43, 127, 31, 0.18);
}

.report-chat-send {
  border: none;
  background: #2b7f1f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.header-notif {
  position: relative;
  flex-shrink: 0;
  z-index: 160;
}

.header-notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--bt-navbar-bg);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  overflow: visible;
  flex-shrink: 0;
}

.header-notif-btn:hover,
.header-notif-btn:focus-visible {
  background: var(--bt-navbar-bg-dark);
  border-color: #ffffff;
  outline: none;
}

.header-notif-btn--pulse {
  animation: header-notif-pulse 0.45s ease-in-out 2;
}

@keyframes header-notif-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

.header-notif-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
  pointer-events: none;
}

.header-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e53935;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  border: 2px solid var(--bt-navbar-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2;
}

.header-notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 4990;
  border: none;
  padding: 0;
  margin: 0;
}

.header-notif-backdrop[hidden] {
  display: none !important;
}

body.notif-panel-open {
  overflow: hidden;
}

.header-notif-panel {
  position: fixed;
  top: calc(72px + env(safe-area-inset-top, 0px) + 8px);
  right: max(14px, env(safe-area-inset-right, 0px));
  left: auto;
  width: min(380px, calc(100vw - 28px));
  max-height: min(440px, calc(100dvh - 100px - env(safe-area-inset-top, 0px)));
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid #d8e8d6;
  z-index: 5000;
}

.header-notif-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
}

.header-notif-panel.is-open {
  animation: notifPanelIn 0.22s ease;
}

.header-notif-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(360px, calc(100dvh - 200px));
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: rgba(43, 127, 31, 0.35) transparent;
  -webkit-overflow-scrolling: touch;
}

.header-notif-group {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.header-notif-group:last-child {
  margin-bottom: 0;
}

.header-notif-group-label {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7f6d;
}

.header-notif-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-notif-panel[hidden] {
  display: none !important;
}

@keyframes notifPanelIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notifPanelMobileIn {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bt-navbar-bg);
  flex-shrink: 0;
}

.header-notif-panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.header-notif-mark-read {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.header-notif-mark-read:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  text-decoration: none;
}

.header-notif-list::-webkit-scrollbar {
  width: 6px;
}

.header-notif-list::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.header-notif-list::-webkit-scrollbar-thumb {
  background: rgba(43, 127, 31, 0.28);
  border-radius: 999px;
}

.header-notif-list::-webkit-scrollbar-thumb:hover {
  background: rgba(43, 127, 31, 0.45);
}

.header-notif-item {
  margin-bottom: 10px;
}

.header-notif-item:last-child {
  margin-bottom: 0;
}

.header-notif-item-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #d8dce0;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

a.header-notif-item-card {
  cursor: pointer;
}

.header-notif-item.is-unread .header-notif-item-card {
  background: #fafffe;
  border-color: #c5dcc0;
}

a.header-notif-item-card:hover,
a.header-notif-item-card:focus-visible {
  background: #f4faf3;
  border-color: #8ad41d;
  box-shadow: 0 2px 10px rgba(43, 127, 31, 0.08);
  outline: none;
}

.header-notif-item-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.header-notif-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.header-notif-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #3d2817;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.header-notif-item-status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
}

.header-notif-item-status.is-new {
  background: #e8f5e6;
  color: #2b7f1f;
}

.header-notif-item-status.is-read-label {
  background: #f1f3f1;
  color: #8a948a;
}

.header-notif-item-kind {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7f6d;
}

.header-notif-item-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5a5a5a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.header-notif-item-time {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9aa09a;
  font-weight: 500;
  line-height: 1.3;
}

.header-notif-empty {
  margin: 0;
  padding: 32px 20px;
  text-align: center;
  font-size: 14px;
  color: #7a8f7c;
  line-height: 1.5;
  background: #ffffff;
}

.header-auth-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-link {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.header-link--login {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.header-link--login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.header-link--signup {
  background: #ffffff;
  color: #2b7f1f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-link--signup:hover {
  background: #f0f7ef;
  transform: translateY(-2px);
}

.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 24px max(16px, env(safe-area-inset-right, 0px)) 30px max(16px, env(safe-area-inset-left, 0px));
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(43, 127, 31, 0.14);
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: hero-slide-fade 25s infinite;
}

.hero-slide:nth-child(1) {
  animation-delay: 0s;
}

.hero-slide:nth-child(2) {
  animation-delay: -5s;
}

.hero-slide:nth-child(3) {
  animation-delay: -10s;
}

.hero-slide:nth-child(4) {
  animation-delay: -15s;
}

.hero-slide:nth-child(5) {
  animation-delay: -20s;
}

@keyframes hero-slide-fade {
  0% {
    opacity: 0;
  }

  4% {
    opacity: 1;
  }

  20% {
    opacity: 1;
  }

  24% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.4);
}

.hero-content {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
    opacity: 0;
  }

  .hero-slide:first-child {
    opacity: 1;
  }
}

.hero-content h2 {
  font-size: clamp(52px, 8vw, 100px);
  color: var(--bt-green);
  font-weight: 900;
  text-shadow: 0 4px 0 #ffffff;
  -webkit-text-stroke: 0;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.tagline {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 50px;
  background: var(--bt-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 16px rgba(30, 98, 22, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quick-cards-grid {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  margin-bottom: 48px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  flex-wrap: nowrap;
  padding: 18px 20px;
  background: var(--bt-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--bt-radius-xl);
  border: 1px solid var(--bt-glass-border);
  box-shadow: var(--bt-shadow-tray);
}

.quick-cards-grid .card {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 112px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--bt-radius-lg);
  background: var(--bt-gradient);
  box-shadow:
    0 6px 18px rgba(10, 69, 32, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.4s var(--bt-ease),
    box-shadow 0.35s ease,
    border-color 0.3s ease,
    background 0.35s ease;
}

.quick-cards-grid .card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 42%,
      rgba(0, 0, 0, 0.06) 100%);
  pointer-events: none;
}

.quick-cards-grid .mission-vision-card h3 {
  font-size: clamp(8px, 0.9vw, 11px);
  letter-spacing: 0.04em;
}

.quick-cards-grid .card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(9px, 1vw, 12px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.06em;
  word-wrap: break-word;
  text-decoration: none !important;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: letter-spacing 0.3s ease;
}

.quick-cards-grid .card-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(0, 0, 0, 0.08);
  object-fit: contain;
  color: #ffffff;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1),
    background 0.3s ease,
    box-shadow 0.3s ease;
}

@media (hover: hover) {
  .quick-cards-grid .card:hover {
    transform: translateY(-12px) scale(1.03);
    background: #ffffff;
    border-color: var(--bt-green);
    box-shadow:
      var(--bt-shadow-lift),
      0 0 0 1px rgba(10, 69, 32, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .quick-cards-grid .card:hover::before {
    opacity: 0;
  }

  .quick-cards-grid .card:hover h3 {
    color: var(--bt-green) !important;
    letter-spacing: 0.1em;
    text-shadow: none;
  }

  .quick-cards-grid .card:hover .card-icon {
    transform: scale(1.14) translateY(-3px);
    background: var(--bt-green);
    color: #ffffff !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      0 8px 16px rgba(10, 69, 32, 0.28);
    filter: none;
  }
}

.quick-cards-grid .card:active {
  transform: translateY(-5px) scale(1.01);
  transition-duration: 0.12s;
}

.quick-cards-grid .card:focus-visible {
  outline: 3px solid var(--bt-accent);
  outline-offset: 3px;
}

/* ── Unified surfaces (homepage quick-card language) ── */
.home-history-card,
.farmer-profiles-card,
.pickup-details-card,
.pi-card,
.governor-panel,
.governor-section-alt,
.history-topic,
.liberica-history,
.portal-page .portal-button-card,
.fb-embed-wrap,
.report-chat {
  background: var(--bt-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--bt-glass-border);
  box-shadow: var(--bt-shadow-tray);
}

.home-history-card,
.farmer-profiles-card {
  border-radius: var(--bt-radius-xl);
  padding: clamp(28px, 5vw, 44px);
}

.home-history-card::before,
.farmer-profiles-card::before {
  display: none;
}

.history-topic,
.liberica-history,
.pickup-details-card,
.pi-card,
.governor-section-alt {
  border-radius: var(--bt-radius-lg);
}

.governor-panel {
  border-radius: var(--bt-radius-xl);
  padding: clamp(32px, 5vw, 48px);
  border: 1px solid var(--bt-glass-border);
}

.home-history-title,
.farmer-grid-title,
.connect-with-us h3,
.form-section h3,
.history-topic h2 {
  color: var(--bt-green);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.home-history-text p,
.history-topic p,
.portal-button-card p {
  color: var(--bt-text-muted);
}

.home-history-bottom-text {
  background: rgba(43, 127, 31, 0.06);
  border-left: 4px solid var(--bt-green);
  border-right: none;
  border-radius: var(--bt-radius-md);
}

.mv-page-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mv-intro {
  margin: 0;
  max-width: 42rem;
  color: var(--bt-text-muted);
  font-size: 1rem;
  line-height: 1.65;
  text-align: center;
  align-self: center;
}

.history-topic.mv-panel {
  text-align: center;
  background: #eef6ec;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(43, 127, 31, 0.1);
  box-shadow: var(--bt-shadow-tray);
}

.history-topic.mv-panel h2 {
  text-align: center;
  color: #00441b;
}

.history-topic.mv-panel p {
  margin-left: auto;
  margin-right: auto;
  max-width: 40rem;
  color: #00441b;
}

.history-section-nav {
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 20px;
  background: var(--bt-glass-bg);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  border: 1px solid var(--bt-glass-border);
  box-shadow: var(--bt-shadow-tray);
  width: fit-content;
  max-width: 100%;
}

.history-section-nav a {
  background: var(--bt-gradient);
  color: #fff;
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(30, 98, 22, 0.2);
  transition: transform 0.3s var(--bt-ease), box-shadow 0.3s ease, border-color 0.25s ease;
}

@media (hover: hover) {
  .history-section-nav a:hover {
    transform: translateY(-3px);
    border-color: var(--bt-accent);
    box-shadow: var(--bt-shadow-card);
  }
}

.history-topic {
  padding: clamp(22px, 4vw, 32px);
  margin-bottom: 16px;
}

.history-topic h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.portal-button-card {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--bt-radius-lg);
  background: var(--bt-gradient);
  color: #fff;
  box-shadow: 0 6px 18px rgba(30, 98, 22, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.4s var(--bt-ease), box-shadow 0.35s ease, border-color 0.3s ease;
}

.portal-button-card h3,
.portal-button-card p {
  color: #fff;
}

.portal-button-card p {
  opacity: 0.88;
}

.button-icon-wrap {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

@media (hover: hover) {
  .portal-button-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(138, 212, 29, 0.85);
    box-shadow: var(--bt-shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  .farmer-profile-item:hover .home-circle {
    transform: scale(1.05);
    border-color: var(--bt-accent);
    box-shadow: 0 16px 36px rgba(43, 127, 31, 0.22);
  }
}

.header-notif-btn {
  background: var(--bt-navbar-bg);
  box-shadow: 0 4px 14px rgba(18, 114, 49, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header-notif-panel-head {
  background: var(--bt-gradient-header);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.custom-select {
  border-radius: var(--bt-radius-md);
  border-color: rgba(43, 127, 31, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.custom-select:focus {
  border-color: var(--bt-green);
  box-shadow: 0 0 0 3px rgba(138, 212, 29, 0.25);
  background: #f8fcf7;
}

.submit-btn:not(.status-waiting):not(.status-approved) {
  background: var(--bt-gradient);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--bt-radius-md);
  box-shadow: 0 6px 18px rgba(30, 98, 22, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.35s var(--bt-ease), box-shadow 0.3s ease;
}

.submit-btn:not(.status-waiting):not(.status-approved):hover {
  transform: translateY(-4px);
  border-color: var(--bt-accent);
  box-shadow: var(--bt-shadow-lift);
}

.order-again-btn {
  border-radius: 999px;
  transition: transform 0.3s var(--bt-ease), box-shadow 0.3s ease, border-color 0.25s ease;
}

.order-again-btn:hover {
  transform: translateY(-3px);
  border-color: var(--bt-accent);
  box-shadow: var(--bt-shadow-card);
}

.report-chat-header {
  background: var(--bt-gradient-header);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.report-quick-btn {
  border-color: rgba(43, 127, 31, 0.2);
  color: var(--bt-green);
  transition: transform 0.3s var(--bt-ease), box-shadow 0.25s ease, border-color 0.2s ease;
}

.report-quick-btn:hover {
  border-color: var(--bt-accent);
  transform: translateY(-2px);
  box-shadow: var(--bt-shadow-card);
}

/* Portal Page Styles */
.portal-page {
  padding: 40px 0;
}

.governor-portal-card {
  text-align: center;
  margin-bottom: 40px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.portal-button-card {
  padding: 30px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-button-card.disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.portal-button-card.disabled:hover {
  transform: none;
  box-shadow: 0 6px 18px rgba(30, 98, 22, 0.25);
}

.button-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.button-icon-wrap img {
  width: 40px;
  height: 40px;
}

.portal-button-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.connect-with-us-home {
  margin: 40px auto 60px;
}

.quick-icons-row {
  margin-top: 26px;
}

.quick-icon-buttons {
  display: flex;
  justify-content: center;
  gap: 96px;
}

.quick-cards a.card {
  text-decoration: none;
}

.liberica-history {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 32px);
  color: var(--bt-text-body);
}

.history-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bt-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(30, 98, 22, 0.2);
}

.liberica-history h2 {
  text-align: center;
  margin-bottom: 14px;
  color: #234f35;
  letter-spacing: 0.8px;
}

.liberica-history h3 {
  margin-top: 16px;
  margin-bottom: 8px;
  color: #234f35;
}

.liberica-history p {
  line-height: 1.7;
  margin-bottom: 10px;
}

.history-hero-image {
  width: min(100%, 620px);
  display: block;
  margin: 18px auto;
  border: 1px solid #d8d8d8;
}

.history-page-shell {
  margin-top: 24px;
  margin-bottom: 48px;
}

.history-section-nav {
  display: flex;
  flex-wrap: wrap;
}

.history-section-nav a {
  text-decoration: none;
  font-weight: 700;
}

.history-topic {
  scroll-margin-top: 18px;
}

.history-topic h2 {
  text-align: center;
  margin-bottom: 12px;
}

.history-topic p {
  line-height: 1.75;
  margin-bottom: 10px;
}

.history-media-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  align-items: start;
  margin: 12px 0;
}

.history-topic-photo {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
}

.history-wide-image {
  width: min(100%, 980px);
  display: block;
  margin: 16px auto;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
}

.history-bottom-image,
.liberica-types-image {
  width: min(100%, 760px);
  display: block;
  margin: 14px auto;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
}

.types-liberica-title {
  text-align: center;
  letter-spacing: 3px;
}

.types-liberica-subtitle {
  color: #234f35;
  margin-top: 18px;
  margin-bottom: 8px;
}

/* History: image right, text wraps left — same layout on desktop and mobile */
.types-liberica-wrap {
  overflow: hidden;
  margin: 10px 0 14px;
}

.types-liberica-wrap::after {
  content: "";
  display: table;
  clear: both;
}

.types-liberica-figure {
  float: right;
  width: min(clamp(118px, 36vw, 280px), 38%);
  max-width: 280px;
  margin: 0 0 12px clamp(12px, 3vw, 20px);
}

.types-liberica-text p:last-child {
  margin-bottom: 0;
}

.types-liberica-wrap .types-liberica-photo {
  width: 100%;
  display: block;
  margin: 0;
  border-radius: var(--bt-radius-md);
  border: 1px solid rgba(43, 127, 31, 0.12);
  box-shadow: 0 6px 18px rgba(43, 127, 31, 0.1);
  object-fit: cover;
  object-position: center;
}

.types-liberica-wrap--media-left .types-liberica-figure {
  float: left;
  margin: 0 clamp(12px, 3vw, 20px) 12px 0;
}

.barako-split {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.barako-split--text-only {
  grid-template-columns: 1fr;
}

.barako-image {
  width: min(100%, 320px);
  border-radius: 8px;
  border: 1px solid #d8d8d8;
  justify-self: center;
}

.home-history {
  margin-top: 40px;
  margin-bottom: 60px;
}

.home-history-card {
  position: relative;
  overflow: hidden;
}

.home-history-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-transform: uppercase;
}

/* Text wraps beside floated images; below the images, text runs full width */
.home-history-flow {
  overflow: hidden;
}

.home-history-flow::after {
  content: '';
  display: table;
  clear: both;
}

.home-history-media--top {
  float: right;
  width: min(320px, 36%);
  max-width: 100%;
  margin: 0 0 18px clamp(14px, 3vw, 28px);
}

.home-history-media--compare {
  float: left;
  width: min(320px, 38%);
  max-width: 100%;
  margin: 4px clamp(14px, 3vw, 28px) 18px 0;
  padding: 0;
  border: none;
}

.home-history-media--compare .home-history-image,
.home-history-media--top .home-history-image {
  width: 100%;
}

.home-history-text--lead,
.home-history-text--body {
  width: auto;
}

.home-history-text p {
  line-height: 1.8;
  margin-bottom: 24px;
  font-size: 17px;
  text-align: left;
}

.home-history-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  border: none;
  object-fit: contain;
  object-position: center top;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.home-history-image:hover {
  transform: scale(1.03);
}

.home-history-bottom-text {
  margin-top: 30px;
  padding: 24px 28px;
  font-style: italic;
  line-height: 1.8;
}

.home-history-wide-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  display: block;
  margin: 40px auto 0;
  border-radius: 25px;
  border: none;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.mini-icon-item {
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #174a13;
  padding: 4px 2px;
  text-decoration: none;
}

.mini-icon-item.active {
  color: #2f7d1a;
}

.mini-icon {
  width: 34px;
  height: 34px;
  display: block;
}

.info-panels {
  margin-top: 10px;
}

.profiles-page {
  margin-top: 40px;
  padding-bottom: 60px;
}

/* Farmer profiles — blurred coffee beans bg + white profile card */
body.farmer-profiles-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background-color: #3a4532;
  overflow-x: hidden;
  overscroll-behavior: none;
}

html:has(body.farmer-profiles-page) {
  background-color: #3a4532;
}

body.farmer-profiles-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url('../images/background_pic.jpg') center center / cover no-repeat;
  filter: blur(22px);
  transform: scale(1.08);
  transform-origin: center center;
  will-change: transform;
}

body.farmer-profiles-page::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,
      rgba(18, 32, 14, 0.48) 0%,
      rgba(28, 48, 22, 0.52) 50%,
      rgba(22, 38, 18, 0.55) 100%);
}

body.farmer-profiles-page .farmer-profiles-card {
  position: relative;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.farmer-profiles-card {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
}

.governor-section-alt {
  padding: 40px;
  margin-bottom: 50px;
}

.farmer-grid-section {
  padding: 0;
}

.farmer-grid-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-transform: uppercase;
}

.farmer-demo-banner {
  margin: 0 auto 24px;
  max-width: 720px;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #234f35;
  background: #f0f9ef;
  border: 1px solid #c5e6c0;
  border-radius: 12px;
}

.farmer-demo-banner code {
  font-size: 0.85em;
  color: #166534;
}

.info-panel {
  display: none;
}

.info-panel.active {
  display: block;
}

.history-card {
  background: #ffffff;
  border: 1px solid #cfcfcf;
  padding: 20px;
  color: #2f5f07;
}

.history-card h4 {
  font-size: 26px;
  margin-bottom: 10px;
}

.history-card p {
  line-height: 1.6;
}

.governor-section {
  margin: 60px auto 100px;
}

.governor-panel {
  padding: 60px 40px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.avatar-wrap {
  width: 260px;
  height: 260px;
  margin: 0 auto 30px;
  border-radius: 50%;
  border: 12px solid #8ad41d;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(138, 212, 29, 0.2);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.governor-panel h3 {
  color: #2b7f1f;
  font-size: 36px;
  font-weight: 900;
  margin-top: 10px;
  letter-spacing: -0.5px;
}

.governor-panel .label {
  font-size: 16px;
  font-weight: 800;
  color: #8ad41d;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.connect-with-us {
  margin: 60px auto 0;
  width: 100%;
  /* Facebook Page plugin supports 180–500px width */
  max-width: min(500px, 100%);
}

.connect-with-us h3 {
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin-bottom: 30px;
  position: relative;
  text-transform: uppercase;
}

.connect-with-us h3::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: #8ad41d;
  margin: 10px auto 0;
  border-radius: 2px;
}

.fb-embed-wrap {
  overflow: hidden;
  border-radius: var(--bt-radius-xl);
  width: 100%;
  height: 620px;
  margin: 0;
  line-height: 0;
  transition: transform 0.35s var(--bt-ease), box-shadow 0.35s ease;
}

.fb-embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 620px;
  border: 0;
}

.fb-embed-wrap:hover {
  transform: translateY(-8px);
  box-shadow: var(--bt-shadow-lift);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
}

.feature {
  min-height: 160px;
  border: 1px solid #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bt-gradient);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  padding: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.farmer-circles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  justify-items: center;
  margin-top: 40px;
}

/* Governor Section Styles */
.governor-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 2px dashed rgba(138, 212, 29, 0.2);
}

.governor-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 10px solid #8ad41d;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
  background: #fff;
}

.governor-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.governor-label {
  color: #8ad41d;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 1px;
}

.governor-name {
  color: #2b7f1f;
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 5px;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .governor-circle {
    width: 150px;
    height: 150px;
  }

  .governor-name {
    font-size: 24px;
  }

  .governor-label {
    font-size: 16px;
  }
}

.farmer-profile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 200px;
}

.home-circle {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 10px solid #8ad41d;
  background: #f9fdf8;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.default-user-icon {
  width: 60%;
  height: 60%;
  color: #333;
  opacity: 0.8;
  flex-shrink: 0;
}

.default-user-icon[hidden] {
  display: none !important;
}

.home-circle:has(> img.farmer-circle-photo)>.default-user-icon {
  display: none !important;
}

.home-circle img.farmer-circle-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.farmer-info-bottom {
  text-align: center;
  width: 100%;
}

.farmer-profile-item .farmer-name {
  color: #2b7f1f;
  font-weight: 800;
  font-size: clamp(14px, 2vw, 18px);
  margin-top: 5px;
  line-height: 1.2;
  display: block;
}

.farmer-profile-item:hover .farmer-name {
  color: var(--bt-accent);
}

/* Personal Information Page */
body.pi-page {
  margin: 0;
  background: transparent;
}

.pi-header {
  background: var(--bt-gradient-header);
  padding-top: calc(15px + env(safe-area-inset-top, 0px));
  padding-bottom: 15px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 24px;
  box-shadow: 0 6px 24px rgba(30, 98, 22, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pi-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pi-main {
  padding: 48px 0 56px;
}

.pi-demo-notice {
  max-width: 600px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff8e6;
  border: 1px solid #e6d9a8;
  color: #6b5a1e;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.pi-error-notice {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.pi-card {
  padding: clamp(32px, 5vw, 48px);
  max-width: 1040px;
  margin: 0 auto;
}

.pi-resume-head {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 40px);
  padding-bottom: 28px;
  margin-bottom: 12px;
  border-bottom: 2px solid rgba(43, 127, 31, 0.15);
}

.pi-resume-head--reg {
  flex-direction: column;
  text-align: center;
  border-bottom: none;
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.pi-section-block {
  background: rgba(248, 252, 247, 0.85);
  border: 1px solid rgba(43, 127, 31, 0.1);
  border-radius: 16px;
  padding: 20px 18px 22px;
  margin-bottom: 16px;
}

.pi-section-block .pi-section-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: #000;
  padding-bottom: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pi-section-block .pi-section-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8ad41d;
  flex-shrink: 0;
}

.pi-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.pi-grid-2--spaced {
  margin-top: 12px;
}

.pi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 20px;
  margin-top: 12px;
}

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

.pi-field--spaced {
  margin-top: 12px;
}

.pi-avatar {
  width: 168px;
  height: 168px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 10px solid #8ad41d;
  overflow: hidden;
  background: #f8faf7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(43, 127, 31, 0.12);
}

.pi-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-avatar .default-user-icon {
  width: 55%;
  height: 55%;
  color: #333;
  opacity: 0.85;
}

.pi-avatar:has(> img)>.default-user-icon {
  display: none !important;
}

.pi-resume-identity {
  flex: 1;
  min-width: 0;
}

.pi-resume-name {
  margin: 6px 0 0;
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  font-weight: 800;
  color: #2b7f1f;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: none;
}

.pi-resume-reg {
  margin: 10px 0 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 700;
  color: #5a8f52;
  letter-spacing: 0.04em;
}

.pi-resume-section {
  padding: 24px 0 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.pi-resume-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.pi-section-title {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2b7f1f;
  padding-bottom: 8px;
  border-bottom: 3px solid #8ad41d;
  display: inline-block;
}

.pi-resume-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
}

.pi-field {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.pi-label {
  font-size: 13px;
  color: #000;
  margin: 0 0 8px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.pi-value {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 16px;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.pi-value--cap {
  text-transform: capitalize;
}

.pi-transaction-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.pi-transaction-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2b7f1f;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.pi-transaction-link:hover {
  color: #1f5c16;
}

.pi-transaction-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pi-transaction-link:hover .pi-transaction-arrow {
  transform: translateX(4px);
}

.status-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #475569;
}

.status-tag.active {
  background: #dcfce7;
  color: #166534;
}

.status-tag.pending {
  background: #fef9c3;
  color: #854d0e;
}

@media (max-width: 768px) {
  .quick-cards-grid {
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 20px;
    margin-top: -20px;
  }

  .quick-cards-grid .card {
    flex: 1 1 calc(33.333% - 12px);
    min-width: 96px;
    min-height: 100px;
    padding: 14px 8px 12px;
  }

  .quick-cards-grid .card-icon {
    width: 36px;
    height: 36px;
    padding: 7px;
    margin-bottom: 8px;
  }

  .transaction-card {
    grid-column: auto;
    width: 100%;
    max-width: none;
  }

  .home-history-media--top {
    width: min(260px, 36%);
    margin-left: 16px;
  }

  .home-history-media--compare {
    width: min(260px, 38%);
    margin-right: 16px;
  }

  .home-history-image {
    border-radius: 14px;
  }

  .home-history-text p {
    font-size: 15px;
  }

  .home-history-card,
  .farmer-profiles-card {
    padding: 30px 20px;
  }

  .hero-content h2 {
    font-size: 40px;
  }

  .governor-panel {
    padding: 40px 20px;
  }

  .avatar-wrap {
    width: 180px;
    height: 180px;
  }

  .governor-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .top-header {
    border-bottom-right-radius: 14px;
    border-bottom-left-radius: 14px;
  }

  .nav-wrapper {
    min-height: 64px;
  }

  .top-header:not(.top-header--history)>.container.nav-wrapper {
    min-height: 64px;
  }

  .top-header:not(.top-header--history) + main {
    padding-top: calc(94px + env(safe-area-inset-top, 0px));
  }

  body > main {
    min-height: calc(100dvh - 94px - env(safe-area-inset-top, 0px));
  }

  .report-link {
    font-size: 18px;
  }

  .report-icon {
    width: 22px;
    height: 22px;
  }

  .brand-logo-image {
    width: 46px;
    height: 46px;
  }

  .quick-cards {
    margin-top: 16px;
    margin-bottom: 4px;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 10px;
  }

  .quick-icons-row {
    margin-top: 18px;
  }

  .quick-icon-buttons {
    gap: 30px;
  }

  .report-sheet-header h2 {
    font-size: 20px;
  }

  .report-reason-title {
    font-size: 16px;
  }

  .report-reason-sub {
    font-size: 13px;
  }

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

  .farmer-circles-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
  }

  .home-circle {
    border-width: 6px;
    margin-bottom: 10px;
  }

  .farmer-profile-item .farmer-name {
    font-size: 13px;
  }

  .connect-with-us h3 {
    font-size: 34px;
  }

  .fb-embed-wrap {
    height: 560px;
  }

  .fb-embed-frame {
    min-height: 560px;
  }

  .quick-cards-grid {
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px 14px;
    border-radius: 18px;
  }

  .quick-cards-grid .card {
    min-height: 92px;
    border-radius: 14px;
  }

  .quick-cards-grid .card h3 {
    font-size: clamp(10px, 2.6vw, 12px);
    letter-spacing: 0.04em;
  }

  .history-media-row {
    grid-template-columns: 1fr;
  }

  .barako-split {
    grid-template-columns: 1fr;
  }

  /* Personal Info Responsiveness */
  .pi-header h2 {
    font-size: 18px;
  }

  .pi-card {
    padding: 20px;
    margin: 0 10px;
  }

  .pi-resume-head {
    flex-direction: column;
    text-align: center;
  }

  .pi-grid-2,
  .pi-grid-3,
  .pi-grid-affiliation {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .txn-qty-row {
    grid-template-columns: 1fr;
  }

  .txn-qty-unit {
    width: 100%;
  }

  .pi-resume-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pi-avatar {
    width: 132px;
    height: 132px;
  }

  .pi-resume-name {
    font-size: 1.5rem;
  }

  .pi-value {
    font-size: 17px;
  }
}

@media (max-width: 430px) {
  .quick-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Transaction Page Styles */
.transaction-page {
  background: #ffffff;
  min-height: 100vh;
}

html:has(body.transaction-page) {
  background-color: #ffffff;
}

body.transaction-page::before,
body.transaction-page::after {
  background: #ffffff;
}

.transaction-main {
  padding: 40px 0 80px;
  background: #ffffff;
}

/* Report page — match transaction / app styling */
.report-page {
  background: #ffffff;
  min-height: 100vh;
}

html:has(body.report-page) {
  background-color: #ffffff;
}

body.report-page::before,
body.report-page::after {
  background: #ffffff;
}

.transaction-header {
  text-align: center;
  margin-bottom: 40px;
}

.transaction-header h2 {
  color: #2b7f1f;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}

.transaction-header .notice {
  color: #d32f2f;
  font-weight: 600;
  font-size: 16px;
  background: #ffebee;
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
}

.transaction-form {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  max-width: 800px;
  margin: 0 auto;
  border: none;
}

.form-section h3 {
  color: #2b7f1f;
  font-size: 24px;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #8ad41d;
  display: inline-block;
}

.form-group {
  margin-bottom: 25px;
  min-width: 0;
}

.form-group label {
  display: block;
  font-weight: 700;
  color: #000;
  margin-bottom: 8px;
  font-size: 15px;
}

.txn-qty-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.txn-prod-section {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  padding: 16px 14px 18px;
}

.txn-prod-section-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.txn-prod-section-title::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8ad41d;
  flex-shrink: 0;
}

.txn-variety-block {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 14px;
  margin-top: 14px;
}

.txn-variety-block:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.txn-variety-block .form-group {
  margin-bottom: 14px;
}

.txn-variety-block .form-group:last-child {
  margin-bottom: 0;
}

.txn-variety-name {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: #000;
}

.txn-qty-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  color: #174a13;
  min-height: 48px;
  box-sizing: border-box;
}

.txn-price-hint {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #2b7f1f;
}

.txn-qty-help {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.txn-qty-unit {
  min-width: 84px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  background: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  color: #174a13;
  box-sizing: border-box;
  min-height: 48px;
  line-height: 1.35;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

/* Custom File Input Styling */
.form-group input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
  background: #ffffff;
  color: #174a13;
}

.form-group input[type="file"]::file-selector-button {
  background: #2b7f1f;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  margin-right: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-group input[type="file"]::file-selector-button:hover {
  background: #1e5214;
}

/* Custom Date Input Styling */
.form-group input[type="date"] {
  cursor: pointer;
  position: relative;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  background: transparent;
  bottom: 0;
  color: transparent;
  cursor: pointer;
  height: auto;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
  z-index: 1;
}

/* Add a themed calendar icon via pseudo-element or background */
.form-group input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

.form-group input[type="text"]:hover:not(:disabled):not(:focus),
.form-group input[type="password"]:hover:not(:disabled):not(:focus),
.form-group input[type="email"]:hover:not(:disabled):not(:focus),
.form-group input[type="number"]:hover:not(:disabled):not(:focus),
.form-group input[type="date"]:hover:not(:disabled):not(:focus),
.form-group input[type="file"]:hover:not(:disabled):not(:focus),
.form-group select:hover:not(:disabled):not(:focus),
.form-group .custom-select:hover:not(:disabled):not(:focus),
.form-group #pickup-date:hover:not(:disabled):not(:focus) {
  border-color: #2b7f1f;
  background-color: #f8fcf7;
  box-shadow: 0 0 0 3px rgba(43, 127, 31, 0.1);
}

.form-group select:hover:not(:disabled):not(:focus),
.form-group .custom-select:hover:not(:disabled):not(:focus) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.form-group .custom-select:hover:not(:disabled):not(:focus) {
  background-position: right 12px center;
}

.form-group input[type="date"]:hover:not(:disabled):not(:focus),
.form-group #pickup-date:hover:not(:disabled):not(:focus) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

.form-group #pickup-date:hover:not(:disabled):not(:focus) {
  background-position: right 16px center;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #2b7f1f;
  background-color: #f0f7ef;
  box-shadow: 0 0 0 4px rgba(43, 127, 31, 0.1);
}

.form-group select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.form-group input:disabled,
.form-group select:disabled {
  background-color: #f0f0f0;
  color: #999;
  border-color: #eee;
  cursor: not-allowed;
  opacity: 0.7;
}

.form-help {
  font-size: 13px;
  color: #666;
  margin-top: 5px;
}

/* Pick up Section Styles */
.payment-icon-brand {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-icon-brand.pickup {
  background: #f0f7ef;
  color: #2b7f1f;
}

.payment-icon-brand svg {
  width: 24px;
  height: 24px;
}

.txn-farmer-selected-wrap .form-help {
  margin-top: 6px;
  color: #4a6b52;
}

.txn-farmer-name-input {
  font-weight: 800;
  font-size: 1.1rem;
  color: #234f35;
  background: #f0f9ef;
  border: 2px solid #2b7f1f;
  cursor: default;
  width: 100%;
  box-sizing: border-box;
}

.txn-farmer-select {
  width: 100%;
}

.form-group select.txn-farmer-select.custom-select.txn-farmer-select--invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.txn-farmer-select-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.55);
}

.txn-seller-source {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.txn-seller-source__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  color: #174a13;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.txn-seller-source__btn:hover {
  border-color: #8ad41d;
  background: #f9fdf8;
}

.txn-seller-source__btn.is-selected {
  border-color: #2b7f1f;
  background: #f0f7ef;
  box-shadow: 0 0 0 3px rgba(43, 127, 31, 0.12);
}

.txn-seller-source__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2b7f1f;
  line-height: 1.3;
}

.txn-seller-source__btn:not(.is-selected) .txn-seller-source__name {
  color: #4a6b52;
}

@media (max-width: 520px) {
  .txn-seller-source {
    grid-template-columns: 1fr;
  }
}

.txn-admin-contact {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px 16px;
  background: #f0f7ef;
  border: 1.5px solid #2b7f1f;
  border-radius: 12px;
}

.txn-admin-contact__name {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #174a13;
}

.txn-admin-contact__list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.txn-admin-contact__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  align-items: start;
}

.txn-admin-contact__row dt {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a6b52;
}

.txn-admin-contact__row dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #174a13;
  word-break: break-word;
}

.txn-admin-contact__row a {
  color: #2b7f1f;
  text-decoration: none;
}

.txn-admin-contact__row a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .txn-admin-contact__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.pickup-details-card.txn-tutorial-highlight {
  border-radius: 18px;
}

.pickup-details-card {
  padding: clamp(24px, 4vw, 32px);
  margin-top: 0;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(43, 127, 31, 0.12);
  box-shadow: 0 8px 28px rgba(23, 74, 19, 0.06);
}

.pickup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(43, 127, 31, 0.12);
  min-width: 0;
}

.pickup-title {
  font-size: clamp(1.05rem, 4.6vw, 1.35rem);
  font-weight: 800;
  color: #3d2817;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.txn-tutorial-replay--inline {
  margin-left: auto;
  flex-shrink: 0;
}

.pickup-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

#txn-order-fields {
  display: contents;
}

#txn-order-fields[hidden] {
  display: none !important;
}

.txn-phone-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.txn-phone-row input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .txn-phone-row {
    flex-direction: column;
  }

  .txn-otp-btn {
    min-height: 48px;
    width: 100%;
  }
}

.txn-otp-btn {
  flex-shrink: 0;
  min-width: 118px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: #2b7f1f;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.txn-otp-btn:hover:not(:disabled) {
  background: #1e5214;
}

.txn-otp-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.txn-otp-verify[hidden] {
  display: none !important;
}

.txn-otp-verify:not([hidden]) {
  display: block;
  margin-top: 16px;
  padding: 14px 14px 12px;
  border: 1.5px solid #d7ead3;
  border-radius: 14px;
  background: #f7fbf6;
  animation: txnOtpReveal 0.22s ease;
}

@keyframes txnOtpReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.txn-otp-verify label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.txn-otp-verify .form-help {
  margin: 8px 0 0;
}

.txn-otp-status {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  min-height: 1.2em;
}

.txn-otp-status.is-ok {
  color: #2b7f1f;
  font-weight: 700;
}

.txn-otp-status.is-err {
  color: #dc2626;
  font-weight: 600;
}

.txn-phone-verified #client-phone {
  border-color: #2b7f1f;
  background: #f0f7ef;
  font-weight: 700;
  color: #174a13;
}

body.transaction-page--admin-contact .form-footer,
body.transaction-page--admin-contact #txn-status-panel,
body.transaction-page--admin-contact #txn-receipt-ready-card {
  display: none !important;
}

body.transaction-page--submitted .pickup-fields input,
body.transaction-page--submitted .pickup-fields select,
body.transaction-page--submitted .pickup-fields textarea,
body.transaction-page--submitted .txn-select-btn,
body.transaction-page--submitted .txn-seller-source__btn,
body.transaction-page--submitted .txn-otp-btn,
body.transaction-page--submitted .clickable-payment-method {
  pointer-events: none;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.custom-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  color: #174a13;
  transition: all 0.2s ease;
}

.custom-select:hover:not(:disabled):not(:focus) {
  border-color: #2b7f1f;
  background-color: #f8fcf7;
  box-shadow: 0 0 0 3px rgba(43, 127, 31, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

.custom-select:focus {
  border-color: #2b7f1f;
  background-color: #f0f7ef;
  box-shadow: 0 0 0 4px rgba(43, 127, 31, 0.1);
  outline: none;
}

.custom-select:disabled {
  background-color: #f0f0f0;
  color: #999;
  border-color: #e8e8e8;
  cursor: not-allowed;
  opacity: 0.85;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

.txn-select-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.txn-select-wrap[hidden] {
  display: none !important;
}

.txn-select-wrap .txn-select-native,
.txn-select-wrap select.custom-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.txn-select-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 42px 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.3;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  color: #174a13;
  text-align: left;
  font-family: inherit;
}

.txn-select-wrap.is-open .txn-select-btn,
.txn-select-btn:hover:not(:disabled) {
  border-color: #2b7f1f;
  background-color: #f8fcf7;
  box-shadow: 0 0 0 3px rgba(43, 127, 31, 0.1);
}

.txn-select-wrap.is-disabled .txn-select-btn,
.txn-select-btn:disabled {
  background-color: #f0f0f0;
  color: #999;
  border-color: #e8e8e8;
  cursor: not-allowed;
  opacity: 0.85;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.txn-select-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  max-height: min(240px, 45vh);
  overflow-x: hidden;
  overflow-y: auto;
  background: #f4faf3;
  border: 1.5px solid #2b7f1f;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(23, 74, 19, 0.14);
  box-sizing: border-box;
}

.txn-select-wrap.is-open .txn-select-menu {
  display: block;
}

.txn-select-option {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 11px 14px;
  color: #174a13;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
}

.txn-select-option:hover,
.txn-select-option.is-selected {
  background: #e8f5e4;
}

.pickup-details-card {
  overflow: visible;
}

.txn-qty-input:disabled {
  background-color: #f0f0f0;
  color: #999;
  border-color: #e8e8e8;
  cursor: not-allowed;
  opacity: 0.85;
}

.payment-method-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.payment-method-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.clickable-payment-method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  color: #2b7f1f;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 48px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.clickable-payment-method:hover {
  border-color: #8ad41d;
  background: #f9fdf8;
}

.clickable-payment-method.selected {
  border-color: #2b7f1f;
  background: #f0f7ef;
  box-shadow: none;
}

.clickable-payment-method svg {
  width: 20px;
  height: 20px;
  color: #2b7f1f;
}

.clickable-payment-method--gcash {
  color: #0057e7;
}

.clickable-payment-method--gcash:hover {
  border-color: #0072ce;
  background: #f3f8ff;
}

.clickable-payment-method--gcash.selected {
  border-color: #0057e7;
  background: #eef5ff;
  color: #0057e7;
}

.clickable-payment-method--lalamove {
  color: #ff6200;
}

.clickable-payment-method--lalamove:hover {
  border-color: #ff8a3d;
  background: #fff6f0;
}

.clickable-payment-method--lalamove.selected {
  border-color: #ff6200;
  background: #fff1e8;
  color: #d45300;
}

.lalamove-delivery-logo {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
}

.gcash-qr-modal {
  z-index: 12040;
}

.gcash-qr-modal__card {
  width: min(92vw, 420px);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 18px 18px;
  border: 1.5px solid #0057e7;
  border-radius: 18px;
  background: #f7fbff;
  text-align: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  animation: popUpModal 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.gcash-qr-modal__done {
  margin-top: 8px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: #0057e7;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.gcash-qr-modal__done:hover {
  background: #0046bb;
}

.receipt-modal-overlay.lalamove-selected-modal {
  z-index: 12050;
}

.lalamove-selected-modal__card {
  position: relative;
  width: min(92vw, 420px);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 22px 24px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  animation: popUpModal 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.lalamove-selected-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.lalamove-selected-modal__close:hover {
  color: #475569;
}

.lalamove-selected-modal__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f26522;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
}

.lalamove-selected-modal__brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.lalamove-selected-modal__title {
  margin: 8px 0 0;
  color: #1e293b;
  font-size: 1.35rem;
  font-weight: 800;
}

.lalamove-selected-modal__text {
  margin: 0;
  max-width: 280px;
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.45;
}

.lalamove-selected-modal__ok {
  margin-top: 12px;
  min-width: 160px;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  background: #3aa4b5;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.lalamove-selected-modal__ok:hover {
  background: #2f8c9b;
}

.gcash-proof-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gcash-proof-group[hidden] {
  display: none;
}

.gcash-proof-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1.5px dashed #c5d0e0;
  border-radius: 12px;
  background: #f7f9fc;
  color: #64748b;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.gcash-proof-drop:hover,
.gcash-proof-drop.is-dragging {
  border-color: #8aa0c2;
  background: #eef3f9;
}

.gcash-proof-drop__icon {
  width: 28px;
  height: 28px;
  color: #94a3b8;
}

.gcash-proof-drop__title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  line-height: 1.2;
}

.gcash-proof-drop__hint {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.gcash-proof-preview {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gcash-proof-preview[hidden] {
  display: none;
}

.gcash-proof-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d6e4ff;
}

.gcash-proof-remove {
  border: none;
  background: transparent;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}

.gcash-pay-panel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0b3b86;
}

.gcash-pay-panel__qr {
  width: min(220px, 70vw);
  height: auto;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
}

.gcash-pay-panel__number-label {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #4a6288;
}

.gcash-pay-panel__number {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0057e7;
}

.payment-dropdown-field {
  background: #f0f7ef;
  border: 1.5px solid #2b7f1f;
  border-radius: 12px;
  padding: 15px;
  animation: slideDownAmount 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  z-index: 5;
}

.payment-dropdown-field label {
  font-size: 13px;
  margin-bottom: 6px;
  color: #174a13;
  opacity: 0.8;
}

.txn-fixed-price-display {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1.5px solid rgba(43, 127, 31, 0.25);
  border-radius: 12px;
  background: #f8faf8;
  color: #2b7f1f;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.txn-fixed-price-display:not(:empty):not([data-empty="true"]) {
  background: #f0f7ef;
}

.txn-price-pay-help {
  margin-top: 8px;
  margin-bottom: 0;
}

#payment-amount {
  font-size: 18px;
  font-weight: 700;
  color: #2b7f1f;
  padding: 10px 15px;
  border: 1.5px solid rgba(43, 127, 31, 0.2);
  border-radius: 8px;
  background: #f8faf8;
  transition: all 0.3s ease;
  width: 100%;
  cursor: default;
}

#payment-amount:focus {
  border-color: #2b7f1f;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(43, 127, 31, 0.1);
  outline: none;
}

#payment-amount::placeholder {
  color: #ccc;
  font-weight: 400;
  font-size: 15px;
}

/* Remove arrows from number input for cleaner look */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

@keyframes slideDownAmount {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.txn-tutorial-replay {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  vertical-align: middle;
}

.txn-tutorial-replay:hover {
  background: #f5f5f5;
}

@media (max-width: 992px) {
  .transaction-main {
    padding: 28px 0 64px;
  }

  .transaction-form {
    max-width: 100%;
    padding: 0 12px;
  }

  .pickup-details-card {
    padding: 20px 18px;
  }
}

@media (max-width: 900px) {
  .pickup-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .transaction-main {
    padding: 20px 0 56px;
  }

  .transaction-form {
    padding: 0 8px;
  }

  .pickup-header {
    margin-bottom: 18px;
  }

  .pickup-title {
    font-size: 1.15rem;
  }

  .txn-status-panel {
    margin-left: 8px;
    margin-right: 8px;
  }

  .transaction-page .form-footer {
    padding-left: 8px;
    padding-right: 8px;
  }

  .form-group input[type="text"],
  .form-group input[type="number"],
  .custom-select {
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .pickup-details-card {
    padding: 16px 14px;
    border-radius: 14px;
  }

}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500 !important;
  color: #333 !important;
}

.radio-label input,
.checkbox-label input {
  width: 20px;
  height: 20px;
  accent-color: #2b7f1f;
}

.checkbox-group {
  background: #f9fbf8;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(43, 127, 31, 0.05);
}

.form-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.transaction-page .form-footer {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.transaction-page .txn-status-panel {
  margin-top: 12px;
}

.transaction-page .form-section {
  margin-bottom: 0;
}

.form-info {
  font-style: italic;
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}

.txn-status-panel {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #d1e7c5;
  background: #f4faf1;
  box-sizing: border-box;
}

.txn-status-panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #eef2f3;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.txn-status-panel__badge::before {
  content: "◷";
  font-size: 1rem;
  line-height: 1;
}

.txn-status-panel--approved .txn-status-panel__badge {
  background: #dcfce7;
  color: #166534;
}

.txn-status-panel--approved .txn-status-panel__badge::before {
  content: "✓";
}

.txn-status-panel--dismissed .txn-status-panel__badge {
  background: #fef3c7;
  color: #92400e;
}

.txn-status-panel--dismissed .txn-status-panel__badge::before {
  content: "!";
}

.txn-status-panel__ref {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: #374151;
  word-break: break-all;
}

.txn-status-panel__hint {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4b5563;
}

.txn-status-panel--pending .txn-status-panel__badge {
  background: #eef2f3;
  color: #4b5563;
}

.txn-status-panel--pending .txn-status-panel__badge::before {
  content: "◷";
}

.txn-status-details {
  margin: 0.75rem 0 0.85rem;
}

.txn-status-details__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
}

.txn-status-details__row {
  margin: 0;
}

.txn-status-details__row dt {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.txn-status-details__row dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f2937;
  word-break: break-word;
}

.txn-status-panel__status-line {
  margin: 0.85rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed #c5dcc0;
  font-size: 0.95rem;
  color: #374151;
}

.txn-status-panel__status-line strong {
  color: #166534;
}

.txn-status-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.txn-status-panel__actions[hidden],
.txn-status-details[hidden] {
  display: none !important;
}

.txn-status-panel__actions .txn-receipt-action-btn {
  flex: 1 1 140px;
  min-width: 0;
}

.txn-waiting-modal {
  z-index: 12050;
}

.txn-waiting-modal__card {
  width: min(92vw, 380px);
  margin: auto;
  padding: 1.5rem 1.35rem 1.25rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #d1e7c5;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.txn-waiting-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf3;
  color: #166534;
}

.txn-waiting-modal__icon svg {
  width: 28px;
  height: 28px;
}

.txn-waiting-modal__title {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  color: #1a5f3f;
}

.txn-waiting-modal__text {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.5;
}

.txn-waiting-modal__ref {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  color: #334155;
}

.txn-waiting-modal__ref strong {
  color: #1a5f3f;
  word-break: break-word;
}

.txn-waiting-modal__btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: #1a5f3f;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.txn-waiting-modal__btn:hover {
  background: #134830;
}

/* Receipt Ready card — shown only after farmer sends receipt */
.txn-receipt-ready-card {
  width: 100%;
  margin-top: 1.25rem;
  padding: 1.5rem 1.25rem 1.35rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e8ece8;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  text-align: center;
}

.txn-receipt-ready-hero {
  margin-bottom: 0.5rem;
}

.txn-receipt-ready-icon {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.txn-receipt-ready-icon__check {
  position: absolute;
  left: 14px;
  top: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.35);
}

.txn-receipt-ready-icon__check svg {
  width: 18px;
  height: 18px;
}

.txn-receipt-ready-icon__doc {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  border: 1px solid #c8e6c9;
}

.txn-receipt-ready-icon__doc svg {
  width: 22px;
  height: 22px;
}

.txn-receipt-ready-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #1f2937;
  letter-spacing: -0.02em;
}

.txn-receipt-ready-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 500;
}

.txn-receipt-ready-rule {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 1.1rem 0;
}

.txn-receipt-ready-ref-block {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  text-align: left;
  padding: 0 0.15rem;
}

.txn-receipt-ready-ref-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.txn-receipt-ready-ref-label {
  display: block;
  font-size: 0.78rem;
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.txn-receipt-ready-ref-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #111827;
  word-break: break-all;
  line-height: 1.35;
}

.txn-receipt-ready-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.txn-receipt-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.txn-receipt-action-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.txn-receipt-action-btn--primary {
  border: none;
  background: linear-gradient(165deg, #1b5e20 0%, #2e7d32 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(46, 125, 50, 0.28);
}

.txn-receipt-action-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(46, 125, 50, 0.34);
}

.txn-receipt-action-btn--outline {
  border: 2px solid #2e7d32;
  background: #ffffff;
  color: #2e7d32;
}

.txn-receipt-action-btn--outline:hover {
  background: #f1f8f2;
  transform: translateY(-1px);
}

.txn-receipt-order-again-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.txn-receipt-order-again-btn svg {
  width: 18px;
  height: 18px;
}

.txn-receipt-order-again-btn:hover {
  color: #2e7d32;
}

#status-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}

.submit-btn {
  color: #ffffff;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.submit-btn.status-waiting {
  background: #f0f0f0;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  width: 100%;
  max-width: 320px;
}

.submit-btn.status-approved {
  background: linear-gradient(165deg, #0f4a15 0%, #1d7a2a 100%);
  color: #ffffff;
  cursor: default;
  box-shadow: 0 8px 20px rgba(43, 127, 31, 0.25);
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  width: 100%;
  max-width: 320px;
  font-weight: 800;
}

#status-container .view-receipt-btn {
  display: none;
}

#status-container.status-receipt-ready .submit-btn {
  display: none !important;
}

#status-container.status-receipt-ready .view-receipt-btn {
  display: inline-flex !important;
}

.order-again-wrap {
  margin-top: 16px;
  text-align: center;
  width: 100%;
}

.order-again-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 12px 28px;
  border: 2px solid #2b7f1f;
  border-radius: 999px;
  background: #ffffff;
  color: #2b7f1f;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.order-again-btn:hover {
  background: #2b7f1f;
  color: #ffffff;
  transform: translateY(-1px);
}

.txn-status-panel--receipt .txn-status-panel__badge {
  background: #e8f4e6;
  color: #1d5c16;
}

.txn-status-panel--receipt .txn-status-panel__badge::before {
  content: '🧾 ';
}

.status-spinner {
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
}

.approval-sign {
  display: none;
}

/* View Receipt — clear action (not a generic checkmark) */
.view-receipt-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 16px 24px;
  background: linear-gradient(165deg, #0f4a15 0%, #1d7a2a 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(43, 127, 31, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  animation: popIn 0.45s ease forwards;
}

.view-receipt-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(165deg, #0d3f12 0%, #236819 100%);
  box-shadow: 0 14px 30px rgba(43, 127, 31, 0.4);
}

.view-receipt-btn:active {
  transform: translateY(0);
}

.view-receipt-btn__icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.view-receipt-btn__label {
  line-height: 1.2;
}

@keyframes pulseCheck {
  0% {
    box-shadow: 0 0 0 0 rgba(43, 127, 31, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(43, 127, 31, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(43, 127, 31, 0);
  }
}

.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.view-id-btn {
  background: #f0f7ef;
  color: #2b7f1f;
  border: 1.5px solid #2b7f1f;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.view-id-btn:hover {
  background: #2b7f1f;
  color: #ffffff;
}

.view-id-btn svg {
  width: 18px;
  height: 18px;
}

.image-preview-container {
  position: relative;
  width: min(92vw, 540px);
  max-height: calc(
    100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
  );
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  animation: popUpModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.image-preview-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  padding: 0 4px max(12px, env(safe-area-inset-bottom, 0px));
}

.image-preview-close {
  position: sticky;
  top: 0;
  align-self: flex-end;
  z-index: 2;
  flex-shrink: 0;
  margin: 0 0 8px;
}

.full-id-preview {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  object-fit: contain;
  background: #ffffff;
  padding: 10px;
  box-sizing: border-box;
}

/* Receipt Modal Overlay */
.receipt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    16px
    max(12px, env(safe-area-inset-bottom, 0px));
  animation: fadeIn 0.3s ease forwards;
}

.receipt-modal-shell {
  width: 100%;
  max-width: 420px;
  max-height: calc(
    100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
  );
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  animation: popUpModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.receipt-modal-topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-height: 52px;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(165deg, #1b5e20 0%, #2e7d32 100%);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.receipt-modal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.55rem 0.4rem 0.35rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.receipt-modal-back-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.receipt-modal-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.receipt-modal-topbar-title {
  flex: 1;
  text-align: center;
  margin-right: 2.5rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.receipt-modal-container {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  background: #f8faf8;
  border-radius: 0 0 14px 14px;
  padding: 0 0 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}

/* Official receipt — matches app Transaction History */
.receipt-modal-container .txn-receipt-card {
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 1.35rem 1.15rem 1.2rem;
  box-shadow: none;
}

.receipt-modal-container .txn-rcpt-brand {
  text-align: center;
  margin-bottom: 0.85rem;
}

.receipt-modal-container .txn-rcpt-logo {
  width: min(42vw, 128px);
  height: auto;
  max-height: 128px;
  margin: 0 auto 0.65rem;
  display: block;
  object-fit: contain;
}

.receipt-modal-container .txn-rcpt-brand-title {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 800;
  color: #1a2b4b;
  letter-spacing: -0.02em;
}

.receipt-modal-container .txn-rcpt-brand-sub {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.receipt-modal-container .txn-rcpt-rule {
  border: 0;
  margin: 0.85rem 0;
}

.receipt-modal-container .txn-rcpt-rule--solid {
  border-top: 1px solid #e2e8f0;
}

.receipt-modal-container .txn-rcpt-rule--dash {
  border-top: 1px dashed #cbd5e1;
}

.receipt-modal-container .txn-rcpt-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.receipt-modal-container .txn-rcpt-rows {
  display: grid;
  gap: 0.42rem;
}

.receipt-modal-container .txn-rcpt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.receipt-modal-container .txn-rcpt-label {
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}

.receipt-modal-container .txn-rcpt-value {
  color: #1a2b4b;
  font-weight: 800;
  text-align: right;
  word-break: break-word;
}

.receipt-modal-container .txn-rcpt-product-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.receipt-modal-container .txn-rcpt-product-name {
  color: #1a2b4b;
  font-weight: 700;
}

.receipt-modal-container .txn-rcpt-product-qty {
  color: #1a2b4b;
  font-weight: 800;
  white-space: nowrap;
}

.receipt-modal-container .txn-rcpt-thanks {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
}

.receipt-modal-container .client-receipt-actions {
  margin-top: 0;
  padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.receipt-modal-container .txn-receipt-download-btn {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(165deg, #0f4a15 0%, #2f7d44 100%);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 4px 14px rgba(47, 125, 68, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.receipt-modal-container .txn-receipt-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(47, 125, 68, 0.34);
}

.receipt-modal-container .txn-receipt-back-btn {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border: 2px solid #2e7d32;
  border-radius: 10px;
  background: #ffffff;
  color: #2e7d32;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.receipt-modal-container .txn-receipt-back-btn:hover {
  background: #f1f8f2;
  transform: translateY(-1px);
}

.close-receipt-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
  color: #2b7f1f;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3001;
  transition: all 0.2s ease;
}

.close-receipt-modal:hover {
  transform: scale(1.1);
  background: #f0f7ef;
}

#receipt-modal .close-receipt-modal {
  display: none;
}

@keyframes popUpModal {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.official-receipt {
  background: #ffffff;
  width: 100%;
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
  border: 1px solid #f0f0f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  text-align: center;
}

.receipt-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.receipt-header h2 {
  color: #1a202c;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.receipt-subtitle {
  color: #718096;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 30px;
}

.receipt-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 15px;
}

.receipt-row-main span {
  color: #4a5568;
  font-weight: 600;
}

.receipt-row-main strong {
  color: #1a202c;
  font-weight: 800;
}

.receipt-divider {
  height: 1px;
  border-top: 2px dotted #e2e8f0;
  margin: 24px 0;
}

.receipt-section-title {
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  color: #a0aec0;
  letter-spacing: 0.05em;
  margin: 20px 0 12px;
}

.receipt-footer-note {
  margin-top: 35px;
  color: #4a5568;
  font-weight: 700;
  font-size: 14px;
}

.receipt-actions {
  margin-top: 40px;
}

.print-receipt-btn {
  background: #2b7f1f;
  color: #ffffff;
  border: none;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.print-receipt-btn:hover {
  background: #246a1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 127, 31, 0.25);
}

.print-icon {
  width: 20px;
  height: 20px;
}

@media print {

  .receipt-modal-topbar,
  .client-receipt-actions,
  .txn-receipt-back-btn,
  .top-header,
  .transaction-form,
  .txn-status-panel,
  .form-footer {
    display: none !important;
  }

  .receipt-modal-overlay {
    position: static;
    background: none;
    padding: 0;
  }

  .receipt-modal-container .txn-receipt-card {
    box-shadow: none;
    border: 1px solid #ccc;
    margin: 0 auto;
  }
}

.approval-sign span {
  animation: pulse 1.5s infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.4;
  }
}

@media (max-width: 600px) {
  .transaction-form {
    padding: 25px 20px;
  }

  .transaction-header h2 {
    font-size: 24px;
  }
}

/* Auth Page Styles */
.auth-page {
  background: #f4f7f4;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 450px;
}

.auth-card {
  background: #ffffff;
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(138, 212, 29, 0.1);
  text-align: center;
}

.auth-card.signup-card {
  max-width: 550px;
}

.auth-header {
  margin-bottom: 35px;
}

.auth-logo img {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.auth-logo:hover img {
  transform: scale(1.1);
}

.auth-header h2 {
  color: #2b7f1f;
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}

.auth-header p {
  color: #666;
  font-size: 16px;
}

.auth-form {
  text-align: left;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #8ad41d;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 48px !important;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 14px;
}

.forgot-link {
  color: #2b7f1f;
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover {
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, #8ad41d 0%, #2b7f1f 100%);
  color: white;
  border: none;
  padding: 16px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(43, 127, 31, 0.2);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(43, 127, 31, 0.3);
}

.auth-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 15px;
  color: #666;
}

.auth-footer a {
  color: #2b7f1f;
  text-decoration: none;
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 500px) {
  .auth-card {
    padding: 30px 20px;
  }

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

/* Custom Calendar Modal Styles */
.receipt-modal-overlay.calendar-modal {
  z-index: 12050;
  align-items: center;
  justify-content: center;
  padding-top: calc(12px + env(safe-area-inset-top, 0px) + clamp(64px, 18vw, 96px));
  padding-right: clamp(12px, 4vw, 24px);
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-left: clamp(12px, 4vw, 24px);
}

.calendar-container {
  background: var(--bt-gradient-header);
  width: min(92vw, 400px);
  max-width: 400px;
  max-height: min(
    78dvh,
    calc(100dvh - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))
  );
  overflow: auto;
  border-radius: clamp(16px, 4vw, 28px);
  padding: clamp(10px, 2.8vw, 22px);
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-header h3 {
  font-size: clamp(14px, 4vw, 20px);
  font-weight: 800;
  margin: 0;
  color: #ffffff;
}

.calendar-close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.calendar-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.nav-arrow {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  width: clamp(28px, 8vw, 40px);
  height: clamp(28px, 8vw, 40px);
  border-radius: 10px;
  font-size: clamp(16px, 5vw, 24px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
}

.calendar-selectors {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.calendar-selectors select {
  flex: 1;
  min-width: 0;
  background: white;
  border: none;
  padding: clamp(6px, 1.8vw, 10px) clamp(8px, 2vw, 14px);
  border-radius: 12px;
  font-size: clamp(12px, 3.4vw, 16px);
  font-weight: 700;
  color: var(--bt-gradient-header);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23083d1c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
}

.calendar-grid-wrapper {
  background: var(--bt-green-dark);
  border-radius: 16px;
  padding: 10px 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 6px;
}

.calendar-weekdays span {
  font-size: clamp(10px, 2.8vw, 14px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: clamp(8px, 2vw, 12px);
  font-size: clamp(11px, 3.2vw, 16px);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: none;
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.calendar-day.empty {
  background: transparent;
  cursor: default;
}

.calendar-day.selected {
  background: white;
  color: var(--bt-gradient-header);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.calendar-day.today {
  border: 2px solid #8ad41d;
}

.calendar-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.calendar-day.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}

.calendar-day.disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
}

.calendar-ok-btn {
  background: white;
  color: var(--bt-gradient-header);
  border: none;
  padding: clamp(6px, 1.6vw, 12px) clamp(22px, 8vw, 48px);
  min-width: 0;
  width: auto;
  border-radius: 999px;
  font-size: clamp(12px, 3.4vw, 16px);
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.calendar-ok-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  background: #f4faf3;
}

/* Custom Date Wrapper Styling in Transaction Form */
.custom-date-wrapper {
  position: relative;
}

#pickup-date {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232b7f1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 45px;
}

/* Farmer profile transaction: form only, no guided tour */
body.transaction-page--from-farmer.txn-tutorial-active {
  overflow: auto;
}

body.transaction-page--from-farmer .txn-tutorial-replay {
  display: none !important;
}

/* Transaction form guided tutorial (homepage / menu entry only) */
body.txn-tutorial-active:not(.transaction-page--from-farmer) {
  overflow: hidden;
}

.txn-tutorial {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}

.txn-tutorial:not([hidden]) {
  pointer-events: auto;
}

.txn-tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.txn-tutorial-highlight {
  position: relative;
  z-index: 1;
  border-radius: 12px;
  outline: 2px solid rgba(0, 68, 27, 0.18);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92);
  background-color: #ffffff;
}

#submit-btn.txn-tutorial-highlight {
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92);
}

.txn-tutorial-bubble {
  position: fixed;
  z-index: 12002;
  width: min(340px, calc(100vw - 24px));
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: none;
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.16),
    0 8px 24px rgba(15, 23, 42, 0.08);
  pointer-events: auto;
  filter: none;
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
}

.txn-tutorial-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
}

.txn-tutorial-arrow--top {
  top: -10px;
  border-bottom: 10px solid rgba(0, 0, 0, 0.1);
}

.txn-tutorial-arrow--bottom {
  bottom: -10px;
  border-top: 10px solid rgba(0, 0, 0, 0.1);
}

.txn-tutorial-arrow--hidden {
  display: none;
}

.txn-tutorial-step {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.txn-tutorial-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.txn-tutorial-title--final {
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.2;
  margin-bottom: 12px;
}

.txn-tutorial-bubble--final {
  width: min(380px, calc(100vw - 24px));
  padding: 24px 22px 18px;
}

.txn-tutorial-text {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #64748b;
}

.txn-tutorial-checklist {
  margin: 0 0 20px;
  padding-left: 1.25rem;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #475569;
  list-style-type: disc;
}

.txn-tutorial-checklist strong {
  color: #0f172a;
  font-weight: 700;
}

.txn-tutorial-checklist li {
  margin-bottom: 6px;
}

.txn-tutorial-checklist li:last-child {
  margin-bottom: 0;
}

.txn-tutorial-bubble--overview {
  width: min(520px, calc(100vw - 32px));
}

.txn-tutorial-bubble--center {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) translateZ(0) !important;
  width: min(520px, calc(100vw - 32px));
  max-width: 520px;
  padding: 28px 28px 22px;
  border-radius: 18px;
}

.txn-tutorial-bubble--center .txn-tutorial-step {
  font-size: 11px;
  margin-bottom: 10px;
}

.txn-tutorial-bubble--center .txn-tutorial-title {
  font-size: clamp(1.28rem, 3.8vw, 1.45rem);
  margin-bottom: 12px;
}

.txn-tutorial-bubble--center .txn-tutorial-text {
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 14px;
}

.txn-tutorial-bubble--center .txn-tutorial-checklist {
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 22px;
  padding-left: 1.25rem;
}

.txn-tutorial-bubble--center .txn-tutorial-checklist li {
  margin-bottom: 8px;
}

.txn-tutorial-bubble--center .txn-tutorial-actions {
  margin-top: 2px;
  gap: 12px;
}

.txn-tutorial-bubble--center .txn-tutorial-skip,
.txn-tutorial-bubble--center .txn-tutorial-next {
  padding: 10px 20px;
  font-size: 0.92rem;
}

.txn-tutorial-final {
  margin: 0 0 16px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.txn-tutorial-final a {
  color: #222;
  font-size: clamp(1rem, 3.2vw, 1.1rem);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.txn-tutorial-final a:hover {
  color: #000;
}

.txn-tutorial-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.txn-tutorial-skip,
.txn-tutorial-next {
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.txn-tutorial-skip {
  border: none;
  background: transparent;
  color: #64748b;
}

.txn-tutorial-skip:hover {
  background: transparent;
  color: #334155;
}

.txn-tutorial-next {
  border: none;
  background: #00441b;
  color: #ffffff;
  min-width: 92px;
  box-shadow: 0 4px 14px rgba(0, 68, 27, 0.22);
}

.txn-tutorial-next:hover {
  background: #003516;
  color: #ffffff;
  transform: translateY(-1px);
}

.txn-tutorial-next:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .txn-tutorial-bubble {
    width: min(320px, calc(100vw - 20px));
    padding: 18px 18px 16px;
  }

  .txn-tutorial-bubble--center {
    width: min(calc(100vw - 24px), 520px);
    padding: 22px 20px 18px;
  }

  .txn-tutorial-bubble--center .txn-tutorial-title {
    font-size: 1.22rem;
  }
}

/* ========== Mobile / phone layout (matches desktop design, scaled) ========== */
@media (max-width: 640px) {
  .hero {
    min-height: clamp(220px, 42vw, 320px);
    margin: 16px max(12px, env(safe-area-inset-right, 0px)) 16px max(12px, env(safe-area-inset-left, 0px));
    border-radius: 20px;
  }

  .hero-content h2 {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .tagline {
    font-size: 12px;
    padding: 6px 16px;
  }

  .quick-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 12px;
    margin-top: -16px;
    margin-bottom: 28px;
    flex-wrap: unset;
  }

  .quick-cards-grid .card {
    flex: unset;
    min-width: 0;
    min-height: 86px;
    padding: 12px 6px 10px;
  }

  .quick-cards-grid .card-icon {
    width: 32px;
    height: 32px;
    padding: 6px;
    margin-bottom: 6px;
  }

  .quick-cards-grid .card h3 {
    font-size: clamp(9px, 2.8vw, 11px);
    letter-spacing: 0.03em;
  }

  .quick-cards-grid .mission-vision-card h3 {
    font-size: clamp(8px, 2.4vw, 10px);
  }

  .home-history {
    margin-top: 24px;
    margin-bottom: 40px;
  }

  /* Phone: cherries right / Arabica vs Robusta left; text wraps, then full width */
  .home-history-media--top {
    width: clamp(118px, 36vw, 172px);
    margin: 0 0 12px 12px;
  }

  .home-history-media--compare {
    width: clamp(118px, 36vw, 172px);
    margin: 0 12px 12px 0;
  }

  .home-history-text p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 16px;
    text-align: left;
  }

  .home-history-bottom-text {
    padding: 14px 12px;
    margin-top: 8px;
    font-size: 15px;
  }

  .home-history-image {
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  }

  .home-history-image:hover {
    transform: none;
  }

  .home-history-wide-image {
    margin-top: 20px;
    border-radius: 14px;
  }

  .home-history-title {
    margin-bottom: 20px;
    font-size: 1.25rem;
  }

  .home-history-card {
    padding: 18px 12px;
  }

  .home-history-bottom-text {
    padding: 16px;
    margin-top: 20px;
  }

  .home-history-card,
  .farmer-profiles-card {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .governor-section-alt {
    padding: 20px 12px;
    margin-bottom: 28px;
  }

  .governor-panel {
    padding: 28px 16px;
  }

  .governor-panel h3 {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }

  .farmer-circles-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px 6px;
    margin-top: 24px;
  }

  .farmer-profile-item {
    max-width: none;
  }

  .farmer-profile-item .home-circle {
    width: 100%;
    aspect-ratio: 1;
    border-width: 4px;
    margin-bottom: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .farmer-profile-item .farmer-name {
    font-size: clamp(8px, 2.35vw, 11px);
    line-height: 1.2;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }

  .farmer-profile-item .default-user-icon {
    width: 52%;
    height: 52%;
  }

  .report-page-shell {
    width: 100%;
    margin-top: 12px;
    margin-bottom: 32px;
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }

  .report-sheet-header h2 {
    font-size: clamp(1.1rem, 5vw, 1.35rem);
  }

  .report-sheet-header {
    padding: 14px 14px 10px;
  }

  .report-reason {
    padding: 12px 14px;
    gap: 10px;
  }

  .report-chat--page {
    height: min(65vh, 520px);
  }

  .report-chat-input,
  .report-reporter-input {
    font-size: 16px;
  }

  .pi-main {
    padding: 24px 0 40px;
  }

  .pi-card {
    padding: 20px 16px;
    margin: 0;
    border-radius: 18px;
  }

  .pi-transaction-link {
    font-size: 15px;
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f0f9ef;
    border: 1px solid rgba(43, 127, 31, 0.2);
  }

  .nav-wrapper--history {
    padding-left: 48px;
    padding-right: 48px;
  }

  .top-header--history + main {
    padding-top: calc(94px + env(safe-area-inset-top, 0px));
  }

  .top-header--history + .profiles-page {
    padding-top: calc(134px + env(safe-area-inset-top, 0px));
  }

  .top-header--history + .pi-main {
    padding-top: calc(142px + env(safe-area-inset-top, 0px));
  }

  .top-header--history + .transaction-main {
    padding-top: calc(134px + env(safe-area-inset-top, 0px));
  }

  .top-header--history .nav-title {
    font-size: clamp(0.95rem, 4.5vw, 1.15rem);
  }

  .header-notif-panel {
    position: fixed;
    top: calc(94px + env(safe-area-inset-top, 0px) + 6px);
    bottom: auto;
    right: max(14px, env(safe-area-inset-right, 0px));
    left: auto;
    width: min(360px, calc(100vw - 28px));
    max-width: none;
    max-height: min(420px, calc(100dvh - 110px - env(safe-area-inset-top, 0px)));
    border-radius: 14px;
    margin: 0;
    z-index: 5000;
    padding-bottom: 0;
  }

  .header-notif-panel.is-open {
    animation: notifPanelIn 0.22s ease;
  }

  .header-notif-list {
    max-height: min(320px, calc(100dvh - 180px - env(safe-area-inset-top, 0px)));
    padding: 10px 12px;
  }

  .header-notif-item-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .header-notif-item-title {
    font-size: 14px;
  }

  .header-notif-item-text {
    font-size: 13px;
    line-height: 1.45;
  }

  .header-notif-panel-head {
    padding: 12px 14px;
    min-height: 48px;
  }

  .header-notif-panel-head h3 {
    font-size: 15px;
  }

  .header-notif-mark-read {
    font-size: 11px;
    padding: 5px 10px;
  }

  .header-notif-btn {
    width: 40px;
    height: 40px;
    border-width: 1.5px;
  }

  .top-header:not(.top-header--history) .header-notif {
    margin-top: -20px;
  }

  .header-notif-icon {
    width: 20px;
    height: 20px;
  }

  .header-notif-badge {
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    line-height: 16px;
    padding: 0 4px;
  }

  .brand-logo-image {
    transform: scale(1.05);
    margin-right: 6px;
    width: 38px;
    height: 38px;
  }

  .brand-greeting {
    font-size: 0.95rem;
  }

  .top-header:not(.top-header--history) .brand {
    max-width: calc(100% - 56px - max(14px, env(safe-area-inset-left, 0px)) - max(14px, env(safe-area-inset-right, 0px)));
  }

  .transaction-main .container,
  .transaction-form {
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }

  .pickup-details-card {
    border-radius: 16px;
  }

  .txn-farmer-name-input {
    font-size: 1rem;
  }

  #status-container,
  .transaction-page .form-footer {
    align-items: stretch;
  }

  .submit-btn,
  .submit-btn.status-waiting,
  .submit-btn.status-approved,
  .order-again-btn,
  .view-receipt-btn {
    width: 100%;
    max-width: none;
    min-height: 48px;
  }

  .view-id-btn,
  .report-chat-send,
  .txn-tutorial-next,
  .txn-tutorial-skip {
    min-height: 44px;
  }

  .calendar-container {
    width: min(94vw, 360px);
    max-width: 360px;
  }

  .receipt-modal-shell {
    max-width: calc(100vw - 16px);
    max-height: calc(
      100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
    );
  }

  .receipt-modal-container {
    width: 100%;
    margin: 0;
  }

  .image-preview-container {
    width: calc(100vw - 16px);
    max-height: calc(
      100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
    );
  }

  .fb-embed-wrap,
  .fb-embed-frame {
    height: min(480px, 70vh);
    min-height: 360px;
  }
}

@media (max-width: 380px) {
  .quick-cards-grid {
    gap: 8px;
    padding: 12px 10px;
  }

  .quick-cards-grid .card {
    min-height: 78px;
  }

  .farmer-circles-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px 4px;
  }

  .farmer-profile-item .home-circle {
    border-width: 3px;
    margin-bottom: 4px;
  }

  .farmer-profile-item .farmer-name {
    font-size: 8px;
  }

  .home-history-media--top {
    width: clamp(108px, 34vw, 148px);
    margin-left: 10px;
  }

  .home-history-media--compare {
    width: clamp(108px, 34vw, 148px);
    margin-right: 10px;
  }

  .home-history-text p {
    font-size: 14px;
    margin-bottom: 14px;
  }
}

/* ── Page loading overlay ── */
.page-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.page-loading[hidden] {
  display: none !important;
}

.page-loading.is-visible {
  display: flex;
}

.page-loading__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  text-align: center;
}

.page-loading__bean {
  width: clamp(72px, 18vw, 96px);
  height: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  animation: page-loading-bean-pulse 1.15s ease-in-out infinite;
}

.page-loading__text {
  margin: 0;
  font-size: clamp(15px, 3.8vw, 17px);
  font-weight: 400;
  line-height: 1.5;
  color: #7a8a9a;
  letter-spacing: 0.01em;
}

@keyframes page-loading-bean-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.06);
    opacity: 0.94;
  }
}

body.page-loading-active {
  overflow: hidden;
}

/* Keep every module inside the viewport without changing page logic. */
.container,
.transaction-form,
.pickup-details-card,
.pickup-fields,
.gcash-qr-modal__card,
.lalamove-selected-modal__card,
.txn-waiting-modal__card,
.calendar-container,
.pi-card,
.report-sheet,
.history-list,
.profiles-page {
  max-width: 100%;
}

.pickup-fields > *,
.payment-method-choices > *,
.txn-seller-source > * {
  min-width: 0;
}

.custom-select,
.form-group input,
.form-group textarea,
.form-group select {
  max-width: 100%;
}

iframe,
embed,
object {
  max-width: 100%;
}

.receipt-modal-overlay.gcash-qr-modal,
.receipt-modal-overlay.lalamove-selected-modal,
.receipt-modal-overlay.txn-waiting-modal {
  padding-top: max(16px, calc(env(safe-area-inset-top, 0px) + 72px));
  padding-left: clamp(12px, 4vw, 24px);
  padding-right: clamp(12px, 4vw, 24px);
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 360px) {
  .clickable-payment-method {
    gap: 6px;
    padding: 10px 8px;
    font-size: 0.88rem;
  }
}

@media (max-height: 560px) {
  .receipt-modal-overlay.calendar-modal {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    align-items: flex-end;
  }

  .calendar-container {
    max-height: min(70dvh, calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)));
  }
}