:root {
  --forest-950: #0d160c;
  --forest-900: #132012;
  --forest-850: #182416;
  --forest-800: #1b2f18;
  --olive-700: #314327;
  --olive-600: #415633;
  --sand-50: #f6f2e8;
  --sand-100: #eee7d9;
  --panel: rgba(255, 251, 243, 0.8);
  --line: rgba(31, 49, 24, 0.12);
  --text: #132314;
  --muted: #62705e;
  --radius-lg: 24px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: #f1ebdf; }
body.admin-open { background: linear-gradient(180deg, #f5efe3 0%, #ece4d6 100%); }
body.app-route .landing-stage { display: none; }
body.app-route .admin-shell { padding-top: 24px; }
button, input, a { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.page-shell { min-height: 100vh; }
.landing-stage { position: relative; min-height: 100vh; overflow: hidden; background: #121a10; }
.photo-scene { position: absolute; inset: -4%; transform: scale(1.04); }
.scene-layer { position: absolute; inset: 0; will-change: transform; }
.scene-photo {
  background-image: url('/harvestor_landing.jpeg');
  background-size: cover;
  background-position: center center;
  filter: saturate(1.06) contrast(1.02) brightness(0.72);
  animation: photoDrift 26s ease-in-out infinite;
}
.scene-paint {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 226, 154, 0.38) 0%, rgba(255, 226, 154, 0.08) 22%, transparent 40%),
    linear-gradient(135deg, rgba(25, 32, 14, 0.60) 0%, rgba(59, 74, 28, 0.20) 40%, rgba(227, 177, 78, 0.16) 100%),
    linear-gradient(180deg, rgba(33, 53, 17, 0.14) 0%, rgba(33, 53, 17, 0.08) 38%, rgba(18, 28, 11, 0.44) 100%);
  mix-blend-mode: screen;
  animation: paintDrift 20s ease-in-out infinite;
}
.scene-light {
  background:
    linear-gradient(160deg, rgba(216, 173, 88, 0.18) 0 22%, transparent 22% 100%),
    linear-gradient(172deg, transparent 0 66%, rgba(114, 152, 49, 0.14) 66% 75%, transparent 75%),
    radial-gradient(circle at 12% 10%, rgba(255,255,255,0.08) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 90%, rgba(255,255,255,0.06) 0 1px, transparent 2px);
  background-size: auto, auto, 10px 10px, 10px 10px;
  opacity: 0.65;
  animation: lightDrift 18s ease-in-out infinite;
}
.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0,0,0,0.24), rgba(0,0,0,0.32)),
    radial-gradient(circle at center, rgba(0,0,0,0) 26%, rgba(0,0,0,0.18) 68%, rgba(0,0,0,0.52) 100%),
    linear-gradient(180deg, rgba(6, 10, 7, 0.08) 0%, rgba(9, 14, 10, 0.34) 100%);
}
.scene-grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(rgba(255,255,255,0.9) 0.7px, transparent 0.8px);
  background-size: 7px 7px;
}
@keyframes photoDrift {
  0% { transform: scale(1.06) translate3d(0, 0, 0); }
  50% { transform: scale(1.11) translate3d(-1.2%, -0.6%, 0); }
  100% { transform: scale(1.06) translate3d(0, 0, 0); }
}
@keyframes paintDrift {
  0% { transform: scale(1.02) translate3d(0, 0, 0); }
  50% { transform: scale(1.06) translate3d(1%, 0.5%, 0); }
  100% { transform: scale(1.02) translate3d(0, 0, 0); }
}
@keyframes lightDrift {
  0% { transform: translate3d(0, 0, 0); opacity: 0.55; }
  50% { transform: translate3d(-0.6%, 0.6%, 0); opacity: 0.72; }
  100% { transform: translate3d(0, 0, 0); opacity: 0.55; }
}
.landing-overlay { position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.landing-center { width: min(100%, 560px); display: grid; justify-items: center; gap: 22px; }
.lang-switch {
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.82);
  padding: 10px 15px;
  border-radius: 999px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.lang-btn.active { background: rgba(255,255,255,0.88); color: #1b3017; }
.glass-panel {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(35,45,25,0.58), rgba(20,28,16,0.68));
  box-shadow: 0 20px 60px rgba(0,0,0,0.30);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.intro-reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  animation: revealCard 900ms cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: 500ms;
}
@keyframes revealCard {
  0% { opacity: 0; transform: translateY(28px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card { width: 100%; padding: 34px 36px 30px; color: white; }
.logo-stack { display: grid; justify-items: center; gap: 0; margin-bottom: 26px; text-align: center; }
.logo-image {
  display: block;
  width: 340px;
  max-width: min(78vw, 340px);
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.20));
  mix-blend-mode: normal;
}
.logo-badge { filter: drop-shadow(0 10px 25px rgba(0,0,0,0.25)); }
.logo-image-hero {
  width: clamp(280px, 35vw, 360px);
  max-width: min(78vw, 360px);
}
.login-form { display: grid; gap: 12px; }
.login-form-compact { max-width: 440px; margin: 0 auto; gap: 14px; }
.mini-intro { margin-bottom: 2px; }
.mini-line { margin: 0; text-align: center; color: rgba(255,255,255,0.84); line-height: 1.45; font-size: 0.92rem; }
label, .stack-form { display: grid; gap: 10px; }
label span { color: rgba(255,255,255,0.84); font-size: 0.88rem; font-weight: 700; margin-top: 2px; }
input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  color: #162415;
  font-size: 1rem;
}
.primary, button[type="submit"] {
  border: 0;
  padding: 16px 18px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 10px 24px rgba(20,180,90,0.25);
  font-weight: 700;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}
.primary:hover, button[type="submit"]:hover { transform: translateY(-1px); filter: brightness(1.04); }
.secondary {
  border: 1px solid rgba(28, 49, 19, 0.14);
  padding: 15px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.landing-status { min-height: 24px; margin: 4px 0 0; text-align: center; color: rgba(255,255,255,0.68); font-size: 0.9rem; }
.eyebrow { margin: 0 0 12px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(204, 230, 139, 0.9); }
.admin-shell {
  position: relative;
  padding: 28px 28px 44px;
}
.admin-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  background: linear-gradient(135deg, rgba(53, 73, 35, 0.18), rgba(225, 180, 79, 0.12));
  pointer-events: none;
}
.workspace-frame {
  position: relative;
  z-index: 1;
  max-width: 1420px;
  margin: 0 auto;
}
.admin-panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.64);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(18, 29, 17, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
}
.workspace-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(249,244,233,0.68)),
    radial-gradient(circle at top right, rgba(221, 184, 95, 0.22), transparent 36%);
  margin-bottom: 18px;
}
.workspace-hero-copy {
  max-width: 720px;
}
.workspace-hero h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
  color: #152413;
}
.workspace-copy {
  margin: 12px 0 0;
  color: #4d5b47;
  max-width: 62ch;
  line-height: 1.55;
}
.workspace-hero-side {
  min-width: 320px;
  display: grid;
  gap: 14px;
  align-content: space-between;
}
.account-card {
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(40, 58, 28, 0.92), rgba(24, 35, 19, 0.96));
  color: white;
  box-shadow: 0 20px 40px rgba(17, 24, 13, 0.22);
  display: grid;
  gap: 8px;
}
.account-card strong { font-size: 1.18rem; }
.account-card span:last-child { color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(38, 74, 31, 0.08);
  color: #254728;
  font-weight: 700;
}
.badge-role {
  width: fit-content;
  background: rgba(130, 219, 109, 0.16);
  color: #d7f6c4;
}
.admin-layout { display: grid; grid-template-columns: 290px 1fr; gap: 18px; }
.admin-sidebar {
  height: fit-content;
  position: sticky;
  top: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(247,241,230,0.82));
}
.sidebar-header { margin-bottom: 20px; }
.nav { display: grid; gap: 10px; }
.nav-link {
  border: 1px solid rgba(18, 32, 18, 0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  color: var(--text);
  padding: 13px 14px;
  text-align: left;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease;
}
.nav-link:hover { transform: translateX(1px); }
.nav-link.active {
  color: white;
  background: linear-gradient(135deg, #2e4928 0%, #1d311c 100%);
  box-shadow: 0 16px 28px rgba(31, 52, 28, 0.20);
}
.admin-main { display: grid; gap: 18px; }
.admin-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hidden-view { display: none; }
.span-2 { grid-column: span 2; }
.panel-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.panel-kicker {
  margin: 0 0 6px;
  color: #657659;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel-head h3,
.info-panel h3,
.admin-panel h3 {
  margin: 0;
  font-size: 1.18rem;
  color: #182517;
}
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(240,235,224,0.88));
  border: 1px solid rgba(255,255,255,0.78);
}
.stat strong { font-size: 1.5rem; color: #1b2e17; }
.compact-form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; gap: 10px; margin-bottom: 18px; }
.stack-form { margin-bottom: 18px; }
.info-panel { display: flex; flex-direction: column; justify-content: center; }
.muted { color: var(--muted); line-height: 1.55; }
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
th, td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: #53624d; font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 1160px) {
  .workspace-hero,
  .admin-layout,
  .admin-grid,
  .stats,
  .compact-form { grid-template-columns: 1fr; }
  .workspace-hero { display: grid; }
  .span-2 { grid-column: auto; }
  .admin-sidebar { position: static; }
}
@media (max-width: 760px) {
  .landing-overlay,
  .admin-shell { padding: 18px; }
  .login-card { padding: 24px 20px 22px; }
  .logo-image, .logo-image-hero { width: min(76vw, 300px); max-width: 300px; }
  .workspace-hero-side { min-width: 0; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-layer, .intro-reveal { animation: none !important; }
  .intro-reveal { opacity: 1; transform: none; }
}