/* Styles for the Farming Aura website and dashboard */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --terracotta-sidebar: #dd976e;
  --sand-main: #e5b486;
  --brown-dark: #8f4419;
  --brown-deep: #6b3110;
  --brown-card: #bd6533;
  --brown-button: #87431d;
  --brown-button-hover: #723615;
  --brown-backdrop: rgba(62, 31, 10, 0.84);
  --cream-popover: #f4efe6;
  --green-forest: #183925;
  --green-pill: #2e8b46;
  --orange-pill: #d97324;
  --red-pill: #c93b3b;
  --ochre-bar: #c2a875;
  --text-white: #ffffff;
  --text-cream: #f8efe6;
  --text-muted-cream: rgba(255, 245, 235, 0.82);
  --text-brown: #8f4419;
  --text-brown-soft: #ba622f;
  --text-dark: #232323;
  --border-soft: rgba(143, 68, 25, 0.25);
  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: #2c190d;
  color: var(--text-white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* View transition system for switching between pages */
.app-view {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  min-height: 100vh;
}

.app-view.active-view {
  display: block;
}

.app-view.visible-view {
  opacity: 1;
  transform: translateY(0);
}

/* Shared top navbar on onboarding and landing screens */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  position: relative;
  z-index: 20;
}

.brand-block {
  cursor: pointer;
  user-select: none;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #12331f;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.7);
}

.brand-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #1a442a;
  margin-top: 3px;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.brand-subtitle-caps {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a442a;
  margin-top: 3px;
}

/* White and clear brand text on Screen 2 and Screen 3 over dark crop rows */
.onboarding-bg .brand-title {
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.9);
}

.onboarding-bg .brand-subtitle {
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.9);
}

.onboarding-bg .brand-subtitle-caps {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.9);
}

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

.top-nav-link {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(18, 51, 31, 0.18);
  color: #12331f;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.top-nav-link:hover {
  background-color: #12331f;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 51, 31, 0.2);
}

/* Screen 1: Landing + Login scroll view */
.landing-wrapper {
  background-image: url('assets/farmland-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  min-height: 200vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.landing-hero-section {
  min-height: 95vh;
  display: flex;
  flex-direction: column;
}

.hero-center-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 60px;
}

.hero-glass-card {
  width: 100%;
  max-width: 1020px;
  min-height: 560px;
  background: rgba(188, 99, 46, 0.72);
  backdrop-filter: blur(2px);
  padding: 72px 56px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.hero-heading {
  font-family: var(--font-sans);
  font-size: clamp(46px, 6vw, 76px);
  font-weight: 200;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #e9e7dc;
  margin-bottom: 36px;
}

.hero-heading .word-past {
  color: #074722;
  font-weight: 300;
}

.hero-heading .word-future {
  color: #1d2b3e;
  font-weight: 300;
}

.hero-login-btn {
  background-color: #8c461e;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 13px 34px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  margin-bottom: 54px;
}

.hero-login-btn:hover {
  background-color: #733714;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.hero-mission-box {
  position: relative;
  max-width: 820px;
  width: 100%;
  padding: 28px 48px;
  border-left: 4px solid rgba(255, 255, 255, 0.92);
  border-right: 4px solid rgba(255, 255, 255, 0.92);
}

.hero-mission-title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400;
  color: #f4f1e8;
  margin-bottom: 16px;
}

.hero-mission-text {
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 400;
  line-height: 1.45;
  color: #f4f1e8;
  max-width: 680px;
  margin: 0 auto;
}

/* Credits section on lower half of landing screen */
.landing-login-section {
  min-height: 105vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 72px;
}

.login-outer-card {
  width: 100%;
  max-width: 1210px;
  background-color: #bd6533;
  padding: 26px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.login-left-panel {
  background-color: #8c471e;
  border-radius: 3px;
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-photo-wrap {
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 32px;
  aspect-ratio: 3 / 2;
  background-color: #5a2c10;
}

.login-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-left-quote {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 48px;
}

.login-left-footer {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 240, 225, 0.85);
}

.login-right-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 36px 24px 12px;
}

.login-welcome-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 8px;
}

.login-welcome-sub {
  font-size: 15px;
  color: rgba(255, 245, 235, 0.92);
  margin-bottom: 24px;
}

.team-credits-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  max-width: 440px;
  margin-bottom: 26px;
}

.team-credit-item {
  background-color: rgba(140, 71, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  padding: 11px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
}

.login-submit-btn {
  width: 100%;
  max-width: 440px;
  height: 44px;
  margin-top: 6px;
  background-color: #8c471e;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  padding: 0 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.login-submit-btn:hover {
  background-color: #703614;
  transform: translateX(2px);
}

/* Screen 2: Select your location */
.onboarding-bg {
  background-image: url('assets/farmland-bg.jpg');
  background-size: cover;
  background-position: center 78%;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.location-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 36px 48px;
}

.location-backdrop-shell {
  width: 100%;
  max-width: 1280px;
  background: rgba(66, 33, 10, 0.84);
  padding: 28px 36px 38px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.location-step-heading {
  font-family: var(--font-sans);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 22px;
  padding-left: 96px;
}

.location-grid {
  display: grid;
  grid-template-columns: 1.58fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.schematic-map-frame {
  background-color: #9e5026;
  padding: 18px;
  border-radius: 4px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.schematic-map-canvas {
  position: relative;
  width: 100%;
  height: 540px;
  background-color: #d6e3c8;
  border-radius: 3px;
  overflow: hidden;
  user-select: none;
}

.schematic-svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.28s ease;
  transform-origin: center center;
}

.map-search-box {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 310px;
  max-width: calc(100% - 90px);
  z-index: 10;
}

.map-search-input {
  width: 100%;
  height: 42px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background-color: #ffffff;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #243328;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  outline: none;
}

.map-zoom-controls {
  position: absolute;
  top: 20px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.map-zoom-btn {
  width: 34px;
  height: 36px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background-color: #ffffff;
  color: #243328;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.map-zoom-btn:hover {
  background-color: #f3f7ef;
  transform: scale(1.04);
}

/* City pin markers on schematic map */
.city-pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transform: translate(-14px, -50%);
  z-index: 8;
  transition: transform 0.2s ease;
}

.city-pin:hover {
  transform: translate(-14px, -50%) scale(1.05);
}

.city-pin-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2.5px solid #1a3826;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.city-pin-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #1a3826;
  transition: all 0.2s ease;
}

.city-pin-label {
  background-color: #ffffff;
  color: #1a3826;
  border: 1px solid rgba(26, 56, 38, 0.22);
  border-radius: 3px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.city-pin.selected-city .city-pin-dot {
  background-color: #1a3826;
  border-color: #1a3826;
}

.city-pin.selected-city .city-pin-dot::after {
  background-color: #ffffff;
}

.city-pin.selected-city .city-pin-label {
  background-color: #1a3826;
  color: #ffffff;
  border-color: #1a3826;
}

.map-Disclaim-caption {
  position: absolute;
  bottom: 8px;
  left: 16px;
  font-size: 11.5px;
  font-weight: 500;
  color: #546656;
  z-index: 6;
}

/* Right panel in Step 1: Region Selected */
.region-panel-card {
  background-color: #ae5b2b;
  border-radius: 3px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
}

.region-section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 12px;
}

.region-display-box {
  background-color: #c56b38;
  border-radius: 3px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 24px;
}

/* Custom dropdown inside Step 1 Change Region */
.region-dropdown-wrap {
  position: relative;
  margin-bottom: 16px;
}

.region-dropdown-trigger {
  width: 100%;
  background-color: #c56b38;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.region-dropdown-trigger:hover {
  background-color: #cf733f;
}

.region-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-radius: 3px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  z-index: 40;
  display: none;
  max-height: 260px;
  overflow-y: auto;
}

.region-dropdown-menu.open {
  display: block;
  animation: fadeDropdown 0.18s ease;
}

.region-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid #f0ece6;
  padding: 11px 16px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: #2b2b2b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.15s ease;
}

.region-dropdown-item:hover,
.region-dropdown-item.active-item {
  background-color: #f6e4c8;
  color: #6b3110;
  font-weight: 600;
}

.region-latlon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.region-coord-pill {
  background-color: #c56b38;
  border-radius: 3px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
}

.region-coord-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.confirm-region-btn {
  width: 100%;
  background-color: #87431d;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 15px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.confirm-region-btn:hover {
  background-color: #6f3515;
  transform: translateX(2px);
}

/* Screen 3: Choose a priority profile */
.profile-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 64px;
}

.profile-outer-box {
  width: 100%;
  max-width: 790px;
  background: rgba(66, 33, 10, 0.86);
  padding: 34px 36px 40px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
}

.profile-heading {
  font-family: var(--font-sans);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  text-align: center;
  margin-bottom: 26px;
}

.profile-inner-card {
  background-color: #b55f2e;
  border-radius: 3px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-choice-btn {
  width: 100%;
  background-color: #87431d;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  padding: 16px 24px;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.profile-choice-btn:hover,
.profile-choice-btn.selected-profile-btn {
  background-color: #6c3313;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Screen 4: Main Dashboard */
.dashboard-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
  background-color: var(--sand-main);
}

.dashboard-sidebar {
  background-color: var(--terracotta-sidebar);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(143, 68, 25, 0.18);
  position: relative;
  z-index: 30;
}

.sidebar-brand {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 34px;
  cursor: pointer;
  display: inline-block;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 245, 235, 0.9);
  margin-bottom: 18px;
}

.sidebar-control-group {
  margin-bottom: 20px;
  position: relative;
}

.sidebar-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 7px;
}

/* Number input for typing how many fields */
.field-count-input {
  width: 100%;
  height: 42px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: #232323;
  outline: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.field-count-input:focus {
  border-color: #8f4419;
  box-shadow: 0 0 0 2px rgba(143, 68, 25, 0.25);
}

/* Custom dropdown triggers in sidebar */
.custom-select-trigger {
  width: 100%;
  height: 42px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: #232323;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.custom-select-trigger:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.custom-select-chevron {
  font-size: 13px;
  color: #444444;
  transition: transform 0.2s ease;
}

.custom-select-trigger.open .custom-select-chevron {
  transform: rotate(180deg);
}

/* Field dropdown menu */
.field-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 236px;
  background-color: #ffffff;
  border-radius: 3px;
  padding: 4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  z-index: 60;
  display: none;
}

.field-dropdown-menu.open {
  display: block;
  animation: fadeDropdown 0.18s ease;
}

.field-options-scroll {
  max-height: 230px;
  overflow-y: auto;
}

.field-option-btn {
  width: 100%;
  background-color: #ffffff;
  border: none;
  border-bottom: 1px solid #f1ede7;
  border-radius: 2px;
  padding: 9px 12px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: #1f1f1f;
  cursor: pointer;
  transition: background-color 0.14s ease;
}

.field-option-btn:hover,
.field-option-btn.selected-field {
  background-color: #f5df9d;
}

.field-custom-map-btn {
  width: 100%;
  background-color: #dfab7a;
  border: 1px solid #9f6334;
  border-radius: 2px;
  padding: 9px 12px;
  margin-top: 3px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  line-height: 1.3;
  transition: background-color 0.15s ease;
}

.field-custom-map-btn:hover {
  background-color: #ce9662;
}

.field-close-btn {
  width: 100%;
  background-color: #ffffff;
  border: none;
  border-radius: 2px;
  padding: 9px 12px;
  margin-top: 2px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: #1f1f1f;
  cursor: pointer;
}

.field-close-btn:hover {
  background-color: #f3f0ec;
}

/* Priority profile & Crops popover cards */
.cream-popover-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 244px;
  background-color: var(--cream-popover);
  border-radius: 3px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  z-index: 60;
  display: none;
}

.cream-popover-menu.open {
  display: block;
  animation: fadeDropdown 0.18s ease;
}

.cream-popover-title {
  font-size: 13px;
  font-weight: 600;
  color: #232323;
  margin-bottom: 10px;
}

.cream-popover-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cream-option-btn {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  padding: 9px 12px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: #232323;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cream-option-btn:hover,
.cream-option-btn.active-option {
  background-color: #f6e4c8;
  border-color: #c78b52;
  font-weight: 600;
}

/* Multi-select crop list inside sidebar popover */
.cream-popover-menu.crops-popover-menu {
  width: 276px;
  max-height: 410px;
  display: none;
  flex-direction: column;
}

.cream-popover-menu.crops-popover-menu.open {
  display: flex;
}

.crop-multiselect-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  max-height: 300px;
  padding-right: 4px;
}

.crop-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crop-check-box {
  width: 15px;
  height: 15px;
  border-radius: 2px;
  border: 1.5px solid #b5835a;
  background-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #ffffff;
  flex-shrink: 0;
}

.cream-option-btn.active-option .crop-check-box {
  background-color: #8f4419;
  border-color: #8f4419;
}

.popover-actions-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(143, 68, 25, 0.15);
}

.popover-action-btn {
  flex: 1;
  border: 1px solid #c78b52;
  background-color: #ffffff;
  color: #6b3110;
  border-radius: 2px;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.popover-action-btn.primary-action {
  background-color: #8f4419;
  border-color: #8f4419;
  color: #ffffff;
}

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

/* Max water demand slider */
.water-demand-value {
  font-family: var(--font-serif);
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 10px;
}

.water-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(to right, #8f4419 0%, #8f4419 75%, #e7b892 75%, #e7b892 100%);
  outline: none;
  cursor: pointer;
}

.water-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: #ffffff;
  border: 2.5px solid #8f4419;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.onboarding-intensity-box {
  margin-top: 8px;
  padding: 14px 16px;
  background-color: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
}

.onboarding-intensity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.onboarding-intensity-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.onboarding-intensity-readout {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

/* Local sensor readings toggle */
.sensor-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.sensor-switch {
  width: 44px;
  height: 22px;
  border-radius: 3px;
  background-color: #8f4419;
  border: none;
  padding: 3px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.25s ease;
  display: flex;
  align-items: center;
}

.sensor-switch.sensor-green {
  background-color: #183925;
}

.sensor-switch-thumb {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background-color: #ffffff;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.sensor-switch.active .sensor-switch-thumb {
  transform: translateX(22px);
}

.sensor-status-text {
  font-size: 13px;
  color: #7c3b16;
  font-weight: 500;
}

.sidebar-footer {
  margin-top: 36px;
}

.sidebar-sources-list {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 243, 230, 0.85);
}

/* Main content area on the right of dashboard */
.dashboard-main {
  padding: 36px 44px 52px;
  max-width: 1280px;
}

.dash-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(28, 14, 5, 0.72);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.dash-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 4px 16px rgba(0, 0, 0, 0.8);
  letter-spacing: -0.01em;
}

.dash-subtitle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  background: rgba(28, 14, 5, 0.78);
  backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dash-subtitle-left {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.dash-subtitle-right {
  font-size: 13px;
  font-weight: 600;
  color: #ffd8b8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* 4 KPI cards row */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: #ffffff;
  border-radius: 3px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(143, 68, 25, 0.08);
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #b56130;
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: #8f4419;
  margin-bottom: 6px;
}

.kpi-sub {
  font-size: 12px;
  color: #c27649;
}

/* 3 Dashboard navigation tabs */
.dash-tabs-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.dash-tab-btn {
  min-width: 240px;
  height: 44px;
  padding: 0 18px;
  border-radius: 3px;
  border: 1px solid #8f4419;
  background-color: transparent;
  color: #6b3110;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dash-tab-btn:hover {
  background-color: rgba(143, 68, 25, 0.12);
}

.dash-tab-btn.active-tab {
  background-color: #8f4419;
  color: #ffffff;
}

/* Tab panels with fade transition */
.dash-tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.dash-tab-panel.active-panel {
  display: block;
}

.dash-tab-panel.visible-panel {
  opacity: 1;
  transform: translateY(0);
}

/* Tab 1: Crop rotations */
.rotation-banner-card {
  background-color: #8f4419;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  padding: 24px 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(107, 49, 16, 0.16);
}

.rotation-banner-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 245, 235, 0.92);
  margin-bottom: 8px;
}

.rotation-banner-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 20px;
}

.rotation-years-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.year-step-card {
  background-color: #bd6533;
  border-radius: 3px;
  padding: 16px 18px 20px;
  transition: background-color 0.2s ease;
}

.year-step-card:hover {
  background-color: #c66c39;
}

.year-step-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 245, 235, 0.9);
  margin-bottom: 6px;
}

.year-step-crop {
  font-family: var(--font-serif);
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 6px;
}

.year-step-role {
  font-size: 12.5px;
  color: rgba(255, 240, 225, 0.88);
}

/* Middle 2 cards in Tab 1 */
.rotation-mid-grid {
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  gap: 20px;
  margin-bottom: 20px;
}

.white-panel-card {
  background-color: #ffffff;
  border-radius: 3px;
  padding: 24px 26px;
  box-shadow: 0 2px 8px rgba(143, 68, 25, 0.08);
}

.panel-serif-heading {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: #8f4419;
  margin-bottom: 16px;
}

.panel-serif-heading.green-heading {
  color: #183925;
}

.why-won-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.why-won-item {
  font-size: 14px;
  color: #bd6533;
  line-height: 1.45;
}

.why-won-attribution,
.gemini-attribution-tag {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #bd6533;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

.gemini-sparkle-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.modal-source-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  font-size: 15px;
}

/* Score breakdown progress bars (0 to 1 scale + average out of 100) */
.breakdown-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.breakdown-scale-note {
  font-size: 12px;
  color: #bd6533;
}

.breakdown-avg-badge {
  background-color: #fdf5eb;
  border: 1px solid #e6b88a;
  border-radius: 3px;
  padding: 6px 12px;
  text-align: right;
  flex-shrink: 0;
}

.breakdown-avg-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #b56130;
}

.breakdown-avg-val {
  font-family: var(--font-serif);
  font-size: 19px;
  color: #8f4419;
}

.breakdown-scale-axis {
  display: grid;
  grid-template-columns: 126px 1fr 42px;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #c27649;
  margin-bottom: 6px;
}

.breakdown-axis-ticks {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.breakdown-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 126px 1fr 42px;
  align-items: center;
  gap: 12px;
}

.breakdown-label {
  font-size: 13px;
  color: #bd6533;
  font-weight: 500;
}

.breakdown-track {
  width: 100%;
  height: 8px;
  background-color: #e6b88a;
  border-radius: 2px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  background-color: #8f4419;
  border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.breakdown-score-num {
  font-size: 12.5px;
  font-weight: 600;
  color: #8f4419;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Ranked alternatives table (3 columns properly aligned) */
.ranked-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ranked-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #b56130;
  padding: 6px 12px 14px 0;
  border-bottom: 1.5px solid #eadfd3;
}

.ranked-table td {
  padding: 13px 12px 13px 0;
  border-bottom: 1px solid #f0ece6;
  font-size: 13.5px;
  color: #8f4419;
  vertical-align: middle;
}

.ranked-table .col-rank {
  width: 76px;
  padding-left: 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ranked-table .col-rotation {
  width: auto;
}

.ranked-table .col-score {
  width: 150px;
  text-align: right;
  padding-right: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ranked-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.ranked-row:hover,
.ranked-row.selected-rank-row {
  background-color: #fdf6ee;
}

.ranked-seq-title {
  font-weight: 500;
  color: #8f4419;
}

.ranked-row-analysis {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: #b56130;
}

.banner-sequence-analysis {
  margin-top: 16px;
  padding: 12px 16px;
  background-color: rgba(255, 248, 238, 0.14);
  border: 1px solid rgba(255, 245, 235, 0.35);
  border-radius: 3px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.banner-analysis-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff6ec;
  background-color: rgba(82, 36, 10, 0.48);
  padding: 3px 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.banner-analysis-body {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 248, 240, 0.96);
  flex: 1;
  min-width: 220px;
}

.sequence-quick-analysis-box {
  margin-top: 16px;
  padding: 14px 18px;
  background-color: #fdf8f1;
  border: 1px solid #ead8c3;
  border-left: 3.5px solid #8f4419;
  border-radius: 3px;
}

.sequence-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.sequence-analysis-title {
  font-family: var(--font-serif);
  font-size: 15.5px;
  color: #8f4419;
}

.sequence-analysis-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #183925;
  background-color: #eef4ef;
  border: 1px solid #c6d8c9;
  padding: 3px 8px;
  border-radius: 2px;
}

.sequence-analysis-text {
  font-size: 13.2px;
  line-height: 1.5;
  color: #6b3110;
  margin: 0;
}

/* Tab 2: Field map & climate */
.map-climate-top-grid {
  display: grid;
  grid-template-columns: 1.62fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}

.map-builder-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.map-builder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.map-api-badge {
  background-color: #eef4ef;
  color: #183925;
  border: 1px solid #c6d8c9;
  border-radius: 2px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.map-controls-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background-color: #f6f8f5;
  border: 1px solid #dde6de;
  border-radius: 2px;
  padding: 12px 14px;
}

.map-control-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.map-control-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #183925;
}

.map-field-count-input,
.map-active-field-select {
  height: 36px;
  border: 1px solid #b8c9bc;
  border-radius: 2px;
  background-color: #ffffff;
  color: #183925;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
}

.map-field-count-input {
  width: 135px;
}

.map-active-field-select {
  min-width: 155px;
  cursor: pointer;
}

.map-control-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-action-btn {
  height: 36px;
  background-color: #183925;
  color: #ffffff;
  border: 1px solid #183925;
  border-radius: 2px;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.map-action-btn:hover,
.map-action-btn.active-draw-mode {
  background-color: #8f4419;
  border-color: #8f4419;
  color: #ffffff;
}

.map-action-btn.secondary-map-btn {
  background-color: #ffffff;
  color: #183925;
  border: 1px solid #183925;
}

.map-action-btn.secondary-map-btn:hover {
  background-color: #eef4ef;
  color: #183925;
}

.map-draw-hint {
  font-size: 12.5px;
  color: #485b4e;
  background-color: #faf9f5;
  border-left: 3px solid #8f4419;
  padding: 8px 12px;
  border-radius: 2px;
}

.satellite-map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 360px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  background-color: #243823;
  user-select: none;
}

.satellite-map-container.drawing-cursor {
  cursor: crosshair;
}

.satellite-clean-terrain {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(22, 54, 31, 0.58) 0%, rgba(45, 78, 38, 0.42) 48%, rgba(88, 67, 36, 0.48) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 36px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 36px),
    url('assets/farmland-bg.jpg');
  background-size: cover, auto, auto, cover;
  background-position: center, center, center, center 72%;
  pointer-events: none;
}

.map-borders-layer {
  position: absolute;
  inset: 0;
}

.field-border-square {
  position: absolute;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  background-color: rgba(24, 57, 37, 0.36);
  border-radius: 2px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.field-border-square:hover {
  background-color: rgba(189, 101, 51, 0.48);
  border-color: #ffffff;
}

.field-border-square.active-border-square {
  border: 2.5px solid #ffdfb3;
  background-color: rgba(143, 68, 25, 0.58);
  box-shadow: 0 0 0 2px rgba(24, 57, 37, 0.75);
  z-index: 4;
}

.map-caption-meta {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #183925;
  line-height: 1.6;
}

/* Crop water demand card */
.water-demand-sub {
  font-size: 13px;
  color: #6c7a70;
  margin-bottom: 18px;
}

.crop-water-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crop-water-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crop-water-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  color: #183925;
  font-weight: 500;
}

.crop-water-mm {
  font-size: 12px;
  color: #5b6d61;
}

.crop-water-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crop-water-bar {
  height: 10px;
  border-radius: 2px;
  background-color: #183925;
  transition: width 0.4s ease, background-color 0.3s ease;
}

.crop-water-bar.exceeds-rain {
  background-color: var(--ochre-bar);
}

/* 5-Year Temperature & Rainfall Dual-Axis Line Chart */
.seasonal-sub {
  font-size: 13px;
  color: #5f6f64;
  margin-bottom: 18px;
}

.climate-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.climate-chart-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: #183925;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.temp-dot {
  background-color: #b8501c;
}

.legend-dot.rain-dot {
  background-color: #183925;
}

.climate-line-chart-wrap {
  width: 100%;
  background-color: #faf8f4;
  border: 1px solid #e7e1d6;
  border-radius: 3px;
  padding: 12px 10px 6px;
  margin-bottom: 16px;
}

.climate-line-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.climate-trend-description {
  background-color: #f4f7f4;
  border-left: 4px solid #183925;
  border-radius: 2px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.climate-desc-item {
  font-size: 13.5px;
  line-height: 1.5;
  color: #243b2c;
}

.climate-desc-item strong {
  color: #183925;
  margin-right: 4px;
}

/* Tab 3: Live sensor readings */
.sensor-alert-banner {
  background-color: #8f4419;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  padding: 20px 24px;
  margin-bottom: 22px;
}

.sensor-alert-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 6px;
}

.sensor-alert-sub {
  font-size: 14px;
  color: rgba(255, 245, 235, 0.92);
}

.sensor-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.sensor-card-sub {
  font-size: 13.5px;
  color: #bd6533;
  margin-bottom: 22px;
}

.sensor-reading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0eae2;
}

.sensor-reading-name {
  font-size: 16px;
  font-weight: 600;
  color: #b55a24;
}

.sensor-reading-val {
  font-size: 16px;
  font-weight: 600;
  color: #a44d1a;
}

.satellite-steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.satellite-step-line {
  font-size: 16px;
  color: #bd6533;
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.satellite-step-num {
  font-weight: 600;
  color: #b55a24;
}

/* Interactive moisture probe control inside Tab 3 */
.probe-sim-bar {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #f0eae2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.probe-sim-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #8f4419;
}

.probe-sim-buttons {
  display: flex;
  gap: 10px;
}

.probe-mode-btn {
  border: 1.5px solid #bd6533;
  background-color: #ffffff;
  color: #8f4419;
  border-radius: 3px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.probe-mode-btn.active-probe-mode,
.probe-mode-btn:hover {
  background-color: #8f4419;
  color: #ffffff;
}

.moisture-backend-response-box {
  margin-top: 18px;
  background-color: #fdf6ee;
  border: 1px solid #e6b88a;
  border-left: 4px solid #8f4419;
  border-radius: 3px;
  padding: 16px 20px;
}

.moisture-backend-heading {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #8f4419;
  margin-bottom: 8px;
}

.moisture-backend-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #7c3b16;
  margin-bottom: 6px;
}

.moisture-backend-text:last-child {
  margin-bottom: 0;
  font-weight: 600;
}

/* Data sources modal for top nav link */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(25, 12, 4, 0.68);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background-color: #ffffff;
  color: #2b2b2b;
  max-width: 580px;
  width: 100%;
  border-radius: 3px;
  padding: 28px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 28px;
  color: #8f4419;
  margin-bottom: 12px;
}

.modal-body {
  font-size: 14px;
  line-height: 1.6;
  color: #4a4a4a;
  margin-bottom: 20px;
}

.modal-close-btn {
  background-color: #8f4419;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Dashboard colorway, matched to the Select Your Location and Profile screens:
   farmland photo behind a dark-brown glass shell, terracotta inner cards, brown buttons,
   white uppercase headings and white/evergreen pill tabs. */
.dashboard-layout {
  background-color: #2b170a;
  background-image: 
    linear-gradient(180deg, rgba(20, 10, 4, 0.65) 0%, rgba(20, 10, 4, 0.28) 180px, transparent 340px),
    url('assets/farmland-bg.jpg');
  background-size: 100% 340px, cover;
  background-position: top center, center 78%;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, fixed;
}

.dashboard-sidebar {
  background-color: rgba(66, 33, 10, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.sidebar-brand {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.kpi-card {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.kpi-label {
  color: #b55f2e;
}

.kpi-value {
  color: #87431d;
}

.kpi-sub {
  color: #9a5a33;
}

/* Tabs look like the top navbar pills */
.dash-tab-btn {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(18, 51, 31, 0.18);
  color: #12331f;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.dash-tab-btn:hover {
  background-color: #ffffff;
}

.dash-tab-btn.active-tab {
  background-color: #12331f;
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

/* Rotation banner = profile screen's terracotta card, year cards = its brown buttons */
.rotation-banner-card,
.sensor-alert-banner {
  background-color: #42210a; /* same dark brown as the sidebar */
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.year-step-card {
  background-color: #87431d;
}

.year-step-card:hover {
  background-color: #6c3313;
}

.white-panel-card {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Sidebar buttons and selected options use the same brown as the profile buttons */
.cream-option-btn.active-option,
.popover-action-btn {
  background-color: #87431d;
  border-color: #6c3313;
  color: #ffffff;
}

.field-custom-map-btn {
  background-color: #b55f2e;
  border-color: #87431d;
}

/* Quick analysis boxes: medium "Quick analysis" title with the Gemini logo + "Generated by Gemini"
   right next to it on the same line, and the analysis text underneath */
.banner-sequence-analysis {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.quick-analysis-heading,
.sequence-analysis-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-analysis-title {
  font-size: 16px;
  font-weight: 600;
}

.banner-quick-analysis-title {
  color: #ffffff;
}

/* the banner is dark brown, so its tag needs light text */
.banner-gemini-tag {
  color: rgba(255, 245, 235, 0.92);
}

.banner-gemini-tag,
.sequence-gemini-tag {
  margin: 0;
}

/* "Crops selected (...)" line next to the previous-crops line under the dashboard title */
.dash-subtitle-right {
  color: #ffd8b8;
}

/* Sidebar switch status text */
.sensor-status-text {
  color: #ffffff;
}

/* Field map & climate tab: same warm white/cream panels and brown accents as the other two tabs */
.map-controls-bar,
.map-draw-hint,
.map-api-badge,
.climate-line-chart-wrap,
.climate-trend-description {
  background-color: #fdf5eb;
}

.map-api-badge {
  color: #87431d;
}

.map-action-btn {
  background-color: #87431d;
  color: #ffffff;
}

.map-action-btn:hover {
  background-color: #6c3313;
  color: #ffffff;
}

.map-action-btn.secondary-map-btn {
  background-color: #ffffff;
  color: #87431d;
}

.map-action-btn.secondary-map-btn:hover {
  background-color: #fdf5eb;
  color: #87431d;
}

.crop-water-bar {
  background-color: #8f4419;
}

/* No borders anywhere on the dashboard */
.dashboard-layout,
.dashboard-layout * {
  border: none !important;
}

/* Responsive layout adjustments */
@media (max-width: 1040px) {
  .login-outer-card,
  .location-grid,
  .map-climate-top-grid,
  .rotation-mid-grid,
  .sensor-comparison-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .kpi-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-step-heading {
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .kpi-cards-grid,
  .rotation-years-grid {
    grid-template-columns: 1fr;
  }

  .top-navbar {
    padding: 20px 24px;
  }

  .dashboard-main {
    padding: 24px 20px;
  }
}
