:root {
  --ink: #17251f;
  --muted: #6e7b73;
  --canvas: #f1f2ec;
  --panel: #fbfcf7;
  --line: #dfe3da;
  --green-950: #0e2d21;
  --green-900: #123728;
  --green-800: #194a36;
  --green-600: #2e7251;
  --green-400: #75a66e;
  --lime: #b9cc68;
  --orange: #e8753d;
  --orange-soft: #f8e1d6;
  --yellow: #d8ad52;
  --red: #bf5145;
  --shadow: 0 14px 40px rgba(18, 48, 36, .07);
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Segoe UI Variable", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: var(--sidebar); flex-direction: column; padding: 30px 20px 20px; color: #dce9df; background: var(--green-950); border-right: 1px solid rgba(255,255,255,.07); }
.sidebar::before { position: absolute; inset: 0; z-index: -1; content: ""; opacity: .12; background-image: radial-gradient(circle at 20% 10%, #fff 0 1px, transparent 1px), linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,.04) 47% 49%, transparent 50%); background-size: 24px 24px, 110px 110px; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 42px; color: white; text-decoration: none; }
.brand-mark { position: relative; width: 35px; height: 35px; transform: rotate(45deg); border: 2px solid #b4cc87; border-radius: 3px; }
.brand-mark i { position: absolute; background: #b4cc87; }
.brand-mark i:first-child { inset: 7px 16px 7px 7px; }
.brand-mark i:last-child { inset: 7px 7px 7px 19px; opacity: .55; }
.brand span:last-child { display: flex; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 17px; letter-spacing: 1.3px; }
.brand strong { font-weight: 800; }
.brand em { color: #afc98c; font-style: normal; font-weight: 500; }
.main-nav { display: grid; gap: 7px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 13px; cursor: pointer; color: #9bb1a4; background: transparent; border: 0; border-radius: 7px; text-align: left; transition: .2s ease; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item span { font-size: 14px; font-weight: 600; }
.nav-item b { margin-left: auto; min-width: 24px; padding: 2px 7px; color: #bed0c4; background: rgba(255,255,255,.08); border-radius: 10px; font-size: 11px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.is-active { color: white; background: var(--green-800); box-shadow: inset 3px 0 #c5d985; }
.sidebar-spacer { flex: 1; }
.data-health { padding: 14px 10px; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.eyebrow, .overline { color: #78877e; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 10px; font-weight: 800; letter-spacing: 1.55px; }
.data-health > .eyebrow { display: block; margin-bottom: 11px; color: #779183; }
.data-health > div { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; margin: 10px 0; font-size: 11px; }
.data-health small { color: #789085; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-dot.live { background: #7cc682; box-shadow: 0 0 0 4px rgba(124,198,130,.1); }
.status-dot.demo { background: var(--yellow); }
.status-dot.paused { background: #86988d; }
.profile-card { display: grid; grid-template-columns: 34px 1fr 14px; align-items: center; gap: 10px; width: 100%; margin-top: 18px; padding: 8px; cursor: pointer; color: #e6eee9; background: transparent; border: 0; text-align: left; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; color: var(--green-950); background: #c3d394; border-radius: 50%; font-size: 11px; font-weight: 800; }
.profile-card strong, .profile-card small { display: block; }
.profile-card strong { font-size: 12px; }
.profile-card small { margin-top: 2px; color: #81998b; font-size: 10px; }
.profile-card svg { width: 14px; height: 14px; }

.main-content { min-height: 100vh; margin-left: var(--sidebar); padding: 0 34px 32px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; min-height: 76px; margin: 0 -34px; padding: 0 34px; background: rgba(241,242,236,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.location-block { display: flex; align-items: center; gap: 10px; }
.location-block svg { width: 18px; color: var(--green-600); }
.location-block small, .location-block strong { display: block; }
.location-block small { color: #89938d; font-size: 8px; font-weight: 800; letter-spacing: 1.3px; }
.location-block strong { margin-top: 3px; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sync-status { display: flex; align-items: center; gap: 7px; margin-right: 7px; color: var(--muted); font-size: 11px; }
.sync-status i { width: 6px; height: 6px; background: #6dab70; border-radius: 50%; box-shadow: 0 0 0 4px rgba(109,171,112,.13); }
.language-toggle { display: flex; padding: 3px; background: #e1e4dc; border-radius: 6px; }
.language-toggle button { padding: 5px 8px; cursor: pointer; color: #758077; background: transparent; border: 0; border-radius: 4px; font-size: 10px; font-weight: 800; }
.language-toggle button.is-active { color: var(--green-950); background: white; box-shadow: 0 1px 4px rgba(20,45,34,.12); }
.icon-button { position: relative; display: grid; width: 36px; height: 36px; place-items: center; cursor: pointer; background: transparent; border: 1px solid #d7dbd2; border-radius: 6px; }
.icon-button svg { width: 17px; height: 17px; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; background: var(--orange); border: 1px solid var(--canvas); border-radius: 50%; }
.primary-button, .secondary-button, .simulator-button, .ghost-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; cursor: pointer; border-radius: 6px; font-size: 12px; font-weight: 700; transition: .2s ease; }
.primary-button { color: white; background: var(--green-800); border: 1px solid var(--green-800); box-shadow: 0 5px 13px rgba(26,74,54,.18); }
.primary-button:hover { background: #205e44; transform: translateY(-1px); }
.primary-button svg, .secondary-button svg, .simulator-button svg, .ghost-button svg { width: 15px; height: 15px; }
.secondary-button { color: var(--ink); background: #fafbf7; border: 1px solid #d7dbd2; }
.secondary-button:hover { border-color: #aeb8af; }
.simulator-button { color: #eff7e4; background: var(--green-950); border: 1px solid var(--green-950); }
.simulator-button:hover { background: var(--green-800); }
.mobile-menu { display: none; }

.dashboard-head { display: flex; align-items: end; justify-content: space-between; padding: 34px 0 25px; }
.dashboard-head h1 { margin: 6px 0 2px; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: clamp(27px, 3vw, 38px); line-height: 1.1; letter-spacing: -1.35px; }
.dashboard-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 8px; }

.decision-banner { display: grid; grid-template-columns: 255px 1fr; min-height: 225px; overflow: hidden; color: white; background: var(--green-900); border: 1px solid rgba(255,255,255,.05); border-radius: 10px; box-shadow: 0 16px 42px rgba(18,55,40,.14); }
.decision-command { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 34px; background: var(--orange); overflow: hidden; }
.decision-command::after { position: absolute; inset: auto -25px -45px auto; width: 145px; height: 145px; content: ""; border: 28px solid rgba(255,255,255,.09); border-radius: 50%; }
.decision-command .eyebrow { color: rgba(255,255,255,.73); }
.decision-word { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.decision-word > span { display: block; width: 7px; height: 45px; background: white; border-radius: 2px; box-shadow: 12px 0 rgba(255,255,255,.35), 24px 0 rgba(255,255,255,.12); }
.decision-word h2 { margin: 0 0 0 17px; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 44px; letter-spacing: -2px; }
.decision-command p { position: relative; z-index: 1; margin: 8px 0 0 37px; color: rgba(255,255,255,.78); font-size: 12px; }
.decision-detail { position: relative; padding: 32px 35px 28px; background-image: linear-gradient(110deg, transparent 65%, rgba(185,204,104,.06)), radial-gradient(circle at 90% 10%, rgba(185,204,104,.12), transparent 30%); }
.decision-detail .eyebrow { color: #98b2a1; }
.confidence { position: absolute; top: 24px; right: 28px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 5px; }
.confidence span { color: #a8baaf; font-size: 9px; }
.confidence strong { color: #cfde92; font-size: 12px; }
.decision-detail h3 { max-width: 720px; margin: 10px 120px 8px 0; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.7px; }
.decision-detail > p { max-width: 780px; margin: 0; color: #b7c6bd; font-size: 12px; line-height: 1.65; }
.decision-facts { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 720px; margin-top: 23px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.decision-facts span { padding-left: 17px; border-left: 2px solid rgba(185,204,104,.45); }
.decision-facts b, .decision-facts small { display: block; }
.decision-facts b { font-size: 15px; }
.decision-facts small { margin-top: 3px; color: #809a8b; font-size: 9px; }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.metric-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.metric-card { min-height: 168px; padding: 18px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.metric-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 6px; font-size: 11px; font-weight: 800; }
.metric-icon svg { width: 16px; height: 16px; }
.metric-icon.water { color: #3f7182; background: #e1ecee; }
.metric-icon.leaf { color: #3e744d; background: #e2eee0; }
.metric-icon.yield { color: #8d7137; background: #f4ebd2; }
.metric-icon.frost { color: #5e718b; background: #e4e9ef; font-size: 19px; }
.metric-icon.volume { color: var(--green-800); background: #dfe8df; }
.trend { padding: 3px 6px; border-radius: 3px; font-size: 8px; font-weight: 800; letter-spacing: .7px; }
.trend.up { color: #b85d36; background: var(--orange-soft); }
.trend.good { color: #477a51; background: #e5efdf; }
.trend.neutral { color: #697871; background: #e9ebe6; }
.metric-card > span { color: #6d7972; font-size: 11px; }
.metric-card > div:nth-of-type(2) { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; }
.metric-card strong { font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 25px; letter-spacing: -.7px; }
.metric-card em { color: #8a948e; font-size: 10px; font-style: normal; }
.metric-card > small { display: block; margin-top: 8px; color: #8a958f; font-size: 9px; white-space: nowrap; }
.meter { height: 4px; margin-top: 12px; overflow: hidden; background: #e5e7e1; border-radius: 2px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #7a9f6f, var(--orange)); }
.sparkline { height: 20px; margin-top: 6px; }
.sparkline svg { width: 100%; height: 100%; overflow: visible; }
.sparkline path { fill: none; stroke: #619260; stroke-width: 2; }
.sparkline path.area { fill: rgba(97,146,96,.1); stroke: none; }
.risk-dots { display: flex; gap: 5px; margin-top: 11px; }
.risk-dots i { width: 18%; height: 4px; background: #7d9c68; border-radius: 2px; }
.risk-dots i.off { background: #e3e6df; }
.temp-scale { position: relative; height: 4px; margin-top: 12px; background: linear-gradient(90deg,#8cafc2,#d8e3df,#efbd68,#e2714a); border-radius: 2px; }
.temp-scale i { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--ink); }
.mini-bars { display: flex; align-items: end; gap: 4px; height: 24px; margin-top: 4px; }
.mini-bars i { flex: 1; min-height: 3px; background: #6f9b75; border-radius: 2px 2px 0 0; opacity: .8; }

.workspace-grid { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(290px,.75fr); gap: 14px; margin-top: 14px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 4px 0 0; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 17px; letter-spacing: -.4px; }
.segmented { display: flex; padding: 3px; background: #e8ebe4; border-radius: 5px; }
.segmented button { padding: 5px 9px; cursor: pointer; color: #778279; background: transparent; border: 0; border-radius: 4px; font-size: 9px; font-weight: 700; }
.segmented button.is-active { color: var(--green-950); background: white; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.field-map { position: relative; height: 392px; overflow: hidden; background: #66745d; }
.terrain { width: 100%; height: 100%; }
.roads path { fill: none; stroke: #c2bca2; stroke-width: 14; opacity: .55; }
.roads path + path { stroke-width: 9; }
.field-shape { cursor: pointer; stroke: rgba(255,255,255,.78); stroke-width: 2.2; transition: fill .35s, opacity .2s, stroke-width .2s; }
.field-shape:hover, .field-shape.selected { stroke: #fff; stroke-width: 4; }
.field-shape.status-good { fill: #5f9a55; }
.field-shape.status-watch { fill: #caa646; }
.field-shape.status-alert { fill: #c86b43; }
.field-shape.stress-zone { pointer-events: none; fill: #e7813e; stroke: none; opacity: .68; }
.field-shape.stress-zone.high { fill: #ae4537; }
.field-map[data-layer="ndvi"] .field-shape.status-good { fill: #337c45; }
.field-map[data-layer="ndvi"] .field-shape.status-watch { fill: #72a84e; }
.field-map[data-layer="ndvi"] .field-shape.status-alert { fill: #b7a54b; }
.field-map[data-layer="ndvi"] .stress-zone { opacity: 0; }
.field-map[data-layer="water"] .field-shape.status-good { fill: #66939b; }
.field-map[data-layer="water"] .field-shape.status-watch { fill: #c79048; }
.field-map[data-layer="water"] .field-shape.status-alert { fill: #b95546; }
.field-map[data-layer="water"] .stress-zone { opacity: .15; }
.field-shape::after { fill: url(#rows); }
.map-labels circle { fill: rgba(14,45,33,.86); stroke: rgba(255,255,255,.45); }
.map-labels text { fill: white; stroke: none; font-size: 10px; font-weight: 800; text-anchor: middle; }
.map-tools { position: absolute; top: 14px; right: 14px; display: grid; overflow: hidden; background: rgba(251,252,247,.93); border-radius: 5px; box-shadow: 0 5px 18px rgba(0,0,0,.18); }
.map-tools button { width: 31px; height: 30px; cursor: pointer; color: #334a3f; background: transparent; border: 0; border-bottom: 1px solid #d7ddd4; font-size: 16px; }
.map-tools button:last-child { border: 0; }
.map-legend { position: absolute; left: 14px; bottom: 13px; display: flex; gap: 12px; padding: 8px 11px; background: rgba(15,43,32,.88); border-radius: 4px; backdrop-filter: blur(8px); }
.map-legend span { display: flex; align-items: center; gap: 5px; color: #d8e0d9; font-size: 8px; }
.map-legend i, .field-chip > i { width: 7px; height: 7px; border-radius: 50%; }
i.normal { background: #6aaa61; } i.watch { background: #d4ab48; } i.stress { background: #d36b40; } i.critical { background: #ad453c; }
.map-demo-note { position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 6px; padding: 5px 8px; color: #f1eee5; background: rgba(15,43,32,.76); border-radius: 4px; font-size: 8px; font-weight: 700; letter-spacing: .3px; }
.map-demo-note i { width: 5px; height: 5px; background: var(--yellow); border-radius: 50%; }
.field-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-top: 1px solid var(--line); }
.field-chip { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; min-width: 0; padding: 13px 14px; cursor: pointer; background: transparent; border: 0; border-right: 1px solid var(--line); text-align: left; }
.field-chip:last-child { border-right: 0; }
.field-chip.is-selected { background: #eef1e8; box-shadow: inset 0 -2px var(--green-600); }
.field-chip strong, .field-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-chip strong { font-size: 10px; }
.field-chip small { margin-top: 2px; color: #7b867f; font-size: 8px; }
.field-chip > b { color: #56665d; font-size: 8px; white-space: nowrap; }

.weather-card { overflow: hidden; }
.source-badge { display: flex; align-items: center; gap: 5px; padding: 5px 7px; color: #50735e; background: #e2ecdf; border-radius: 4px; font-size: 7px; font-weight: 800; letter-spacing: .7px; }
.source-badge i { width: 5px; height: 5px; background: #68a06d; border-radius: 50%; }
.source-badge.is-demo { color: #8d6c2e; background: #f4ebd4; }
.source-badge.is-demo i { background: var(--yellow); }
.weather-now { display: flex; align-items: center; gap: 16px; padding: 22px 20px 15px; }
.weather-now > div { display: flex; align-items: center; gap: 8px; }
.weather-now > div span { color: var(--yellow); font-size: 28px; }
.weather-now > div strong { font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 36px; letter-spacing: -2px; }
.weather-now p { margin: 0; }
.weather-now p b, .weather-now p small { display: block; }
.weather-now p b { font-size: 11px; }
.weather-now p small { margin-top: 4px; color: #879189; font-size: 9px; }
.weather-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 0 20px 17px; background: #eef0ea; border-radius: 6px; }
.weather-stats span { padding: 10px; border-right: 1px solid #dfe3db; text-align: center; }
.weather-stats span:last-child { border: 0; }
.weather-stats small, .weather-stats b { display: block; }
.weather-stats small { color: #818c85; font-size: 8px; }
.weather-stats b { margin-top: 3px; font-size: 10px; }
.forecast-list { display: grid; gap: 0; margin: 0 20px; }
.forecast-day { display: grid; grid-template-columns: 42px 23px 1fr 42px; align-items: center; gap: 7px; min-height: 34px; border-top: 1px solid #e6e8e2; font-size: 9px; }
.forecast-day > span:first-child { color: #66726a; font-weight: 600; }
.forecast-day .weather-symbol { font-size: 14px; text-align: center; }
.forecast-day .rain-track { height: 3px; overflow: hidden; background: #e2e5df; border-radius: 2px; }
.forecast-day .rain-track i { display: block; height: 100%; background: #6f94a0; border-radius: 2px; }
.forecast-day b { text-align: right; }
.weather-insight { display: flex; gap: 10px; margin: 17px 20px 20px; padding: 11px; color: #31533f; background: #e8efe1; border-left: 2px solid #7da26d; border-radius: 3px; }
.weather-insight svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 2px; }
.weather-insight p { margin: 0; }
.weather-insight strong, .weather-insight span { display: block; }
.weather-insight strong { font-size: 9px; }
.weather-insight span { margin-top: 3px; color: #65776a; font-size: 8px; line-height: 1.45; }

.detail-panel { margin-top: 14px; padding: 0 20px 20px; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; min-height: 75px; }
.detail-heading h2 { margin: 4px 0 0; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 18px; }
.detail-heading h2 small { color: #819087; font-size: 12px; font-weight: 500; }
.ghost-button { color: var(--green-800); background: transparent; border: 1px solid #cfd8ce; }
.tabs { display: flex; gap: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { position: relative; padding: 10px 0 12px; cursor: pointer; color: #7e8882; background: transparent; border: 0; font-size: 10px; font-weight: 700; white-space: nowrap; }
.tabs button.is-active { color: var(--green-800); }
.tabs button.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: var(--green-600); }
.tab-content { min-height: 160px; padding-top: 18px; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 15px; }
.info-block { padding: 14px; background: #f0f2ec; border: 1px solid #e1e5dc; border-radius: 6px; }
.info-block > span { color: #7b8780; font-size: 9px; font-weight: 700; }
.info-block > strong { display: block; margin-top: 5px; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 20px; }
.info-block > small { display: block; margin-top: 4px; color: #819088; font-size: 8px; }
.info-block.wide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-block.wide > div span, .stat-row span { display: block; color: #7f8a83; font-size: 8px; }
.info-block.wide > div b, .stat-row b { display: block; margin-top: 4px; font-size: 12px; }
.timeline { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.timeline article { position: relative; padding: 14px; background: #f1f3ed; border-top: 2px solid #9cb27c; border-radius: 4px; }
.timeline article.warn { border-color: var(--orange); }
.timeline small, .timeline b, .timeline span { display: block; }
.timeline small { color: #7e8982; font-size: 8px; }
.timeline b { margin: 5px 0; font-size: 14px; }
.timeline span { color: #66746b; font-size: 9px; }
.satellite-panel { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.index-chart { min-height: 130px; padding: 15px; background: #eef1e9; border-radius: 6px; }
.index-chart svg { width: 100%; height: 95px; }
.index-chart polyline { fill: none; stroke: #498254; stroke-width: 3; }
.index-chart line { stroke: #d2d8cf; stroke-width: 1; }
.source-warning { padding: 14px; color: #725326; background: #f5ecd8; border-left: 3px solid var(--yellow); border-radius: 4px; font-size: 10px; line-height: 1.55; }
.stat-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.stat-row { padding: 13px; background: #eef1eb; border-radius: 5px; }
.ai-card { display: flex; align-items: start; gap: 12px; padding: 17px; background: var(--green-950); border-radius: 6px; color: white; }
.ai-card svg { width: 19px; color: var(--lime); }
.ai-card p { margin: 0; color: #b9c9bf; font-size: 10px; line-height: 1.6; }
.ai-card strong { color: white; }

footer { display: flex; justify-content: space-between; padding: 22px 2px 0; color: #859087; font-size: 9px; }
footer p { margin: 0; }

.popover { position: fixed; z-index: 60; top: 68px; right: 95px; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 20px 60px rgba(18,45,34,.18); }
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.popover-head strong { font-size: 12px; }
.close-popover, .modal-close, .drawer-close { display: grid; width: 28px; height: 28px; place-items: center; cursor: pointer; background: transparent; border: 0; border-radius: 4px; }
.close-popover svg, .modal-close svg, .drawer-close svg { width: 15px; height: 15px; }
.notifications article { display: flex; gap: 10px; padding: 13px 15px; border-bottom: 1px solid #eef0eb; }
.notifications article > i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; }
.notifications i.orange { background: var(--orange); }
.notifications i.green { background: #61a06a; }
.notifications p { margin: 0; }
.notifications b, .notifications small { display: block; }
.notifications b { font-size: 10px; }
.notifications small { margin-top: 4px; color: #8c9690; font-size: 8px; }

.modal-backdrop, .drawer-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(9,28,21,.52); backdrop-filter: blur(3px); }
.modal-backdrop { display: grid; place-items: center; padding: 20px; }
.modal { width: min(570px,100%); overflow: hidden; background: #fbfcf7; border-radius: 10px; box-shadow: 0 30px 90px rgba(8,26,19,.34); }
.modal-head, .drawer-head { display: flex; align-items: start; justify-content: space-between; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.modal h2, .drawer-head h2 { margin: 4px 0 0; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 22px; }
#field-form { padding: 20px 24px 24px; }
#field-form label { display: grid; gap: 6px; }
#field-form label > span { color: #64736a; font-size: 10px; font-weight: 700; }
#field-form input, #field-form select { width: 100%; height: 41px; padding: 0 11px; color: var(--ink); background: #fff; border: 1px solid #d7dcd4; border-radius: 5px; outline: none; }
#field-form input:focus, #field-form select:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(46,114,81,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 14px; }
.coordinate-box { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; margin-top: 17px; padding: 13px; background: #edf1e8; border: 1px dashed #aebcaf; border-radius: 6px; }
.coordinate-box svg { width: 25px; color: var(--green-600); }
.coordinate-box p { margin: 0; }
.coordinate-box strong, .coordinate-box p span { display: block; }
.coordinate-box strong { font-size: 10px; }
.coordinate-box p span { margin-top: 3px; color: #79867d; font-size: 8px; line-height: 1.4; }
.coordinate-box > span { color: #67776c; font-size: 9px; white-space: nowrap; }
.modal-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; }

.simulator-drawer { position: fixed; inset: 0 0 0 auto; z-index: 80; width: min(440px,100%); padding: 0 24px 24px; background: #f8faf4; box-shadow: -25px 0 70px rgba(9,31,22,.22); transform: translateX(105%); transition: transform .33s cubic-bezier(.22,.8,.25,1); overflow-y: auto; }
.simulator-drawer.is-open { transform: translateX(0); }
.drawer-overlay { z-index: 75; }
.simulator-drawer .drawer-head { margin: 0 -24px; }
.simulator-drawer > p { margin: 20px 0 26px; color: #67756c; font-size: 11px; line-height: 1.6; }
.range-label { display: block; margin: 24px 0; }
.range-label > span { display: flex; justify-content: space-between; margin-bottom: 12px; }
.range-label b { font-size: 11px; }
.range-label output { color: var(--green-800); font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 12px; font-weight: 800; }
input[type="range"] { width: 100%; accent-color: var(--green-600); }
.simulation-result { margin: 28px 0 18px; padding: 23px; color: white; background: var(--green-950); border-radius: 8px; }
.simulation-result .eyebrow { color: #91a99a; }
.simulation-result > strong { display: block; margin-top: 8px; color: #d7e49d; font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-size: 40px; letter-spacing: -1.5px; }
.simulation-result > p { min-height: 32px; margin: 5px 0 20px; color: #b1c2b7; font-size: 10px; line-height: 1.5; }
.sim-equation { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.sim-equation span { padding: 9px; background: rgba(255,255,255,.05); border-radius: 4px; }
.sim-equation small, .sim-equation b { display: block; }
.sim-equation small { color: #829b8d; font-size: 8px; }
.sim-equation b { margin-top: 3px; font-size: 11px; }
.primary-button.full { width: 100%; min-height: 42px; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 340px; padding: 12px 16px; color: #fff; background: var(--green-950); border-left: 3px solid var(--lime); border-radius: 5px; box-shadow: 0 14px 40px rgba(0,0,0,.25); font-size: 11px; transform: translateY(25px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }

@media (max-width: 1180px) {
  :root { --sidebar: 82px; }
  .sidebar { padding-inline: 13px; }
  .brand { justify-content: center; margin-inline: 0; }
  .brand span:last-child, .nav-item span, .nav-item b, .data-health, .profile-card > span:nth-child(2), .profile-card svg { display: none; }
  .main-nav { justify-items: center; }
  .nav-item { justify-content: center; width: 48px; height: 45px; padding: 0; }
  .profile-card { display: flex; justify-content: center; padding: 0; }
  .metric-grid { grid-template-columns: repeat(3,1fr); }
  .metric-card:nth-child(4), .metric-card:nth-child(5) { grid-column: span 1; }
  .workspace-grid { grid-template-columns: 1fr; }
  .weather-card { display: grid; grid-template-columns: 250px 1fr; }
  .weather-card .panel-header { grid-column: 1/-1; }
  .weather-insight { grid-column: 1/-1; }
}

@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 248px; transform: translateX(-105%); transition: transform .25s; }
  .sidebar.is-open { transform: translateX(0); }
  .brand span:last-child, .nav-item span, .nav-item b, .data-health, .profile-card > span:nth-child(2), .profile-card svg { display: initial; }
  .nav-item { justify-content: flex-start; width: 100%; height: auto; padding: 12px 13px; }
  .profile-card { display: grid; justify-content: initial; padding: 8px; }
  .main-content { margin-left: 0; padding-inline: 18px; }
  .topbar { margin-inline: -18px; padding-inline: 18px; }
  .mobile-menu { display: grid; width: 34px; height: 34px; place-content: center; gap: 4px; margin-right: 10px; background: transparent; border: 1px solid #d7dbd2; border-radius: 5px; }
  .mobile-menu span { width: 15px; height: 1.5px; background: var(--ink); }
  .sync-status, .location-block small, .location-block strong, .secondary-button span { display: none; }
  .location-block { margin-right: auto; }
  .top-actions { margin-left: 0; }
  .dashboard-head { align-items: center; }
  .decision-banner { grid-template-columns: 1fr; }
  .decision-command { min-height: 145px; }
  .decision-detail h3 { margin-right: 0; }
  .confidence { top: 24px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .weather-card { display: block; }
  .field-strip { grid-template-columns: repeat(2,1fr); }
  .field-chip:nth-child(2) { border-right: 0; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .info-block.wide { grid-column: 1/-1; }
  footer { display: grid; gap: 6px; }
}

@media (max-width: 560px) {
  .main-content { padding-inline: 12px; }
  .topbar { margin-inline: -12px; padding-inline: 12px; }
  .language-toggle, .primary-button span { display: none; }
  .primary-button { width: 36px; padding: 0; }
  .dashboard-head { align-items: end; padding-top: 24px; }
  .dashboard-head p { max-width: 210px; }
  .head-actions .secondary-button { display: none; }
  .decision-detail { padding: 27px 22px 23px; }
  .confidence { position: static; width: fit-content; margin-bottom: 17px; }
  .decision-detail h3 { font-size: 21px; }
  .decision-facts { grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 14px; }
  .metric-card:last-child { grid-column: 1/-1; }
  .panel-header { align-items: start; }
  .segmented button { padding-inline: 6px; }
  .field-map { height: 300px; }
  .field-strip { grid-template-columns: 1fr; }
  .field-chip { border-right: 0; border-bottom: 1px solid var(--line); }
  .map-legend { right: 12px; gap: 7px; overflow: hidden; }
  .map-legend b { display: none; }
  .detail-heading { align-items: start; padding-top: 16px; }
  .ghost-button span { display: none; }
  .overview-grid, .satellite-panel, .timeline { grid-template-columns: 1fr; }
  .info-block.wide { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .coordinate-box { grid-template-columns: 30px 1fr; }
  .coordinate-box > span { grid-column: 2; }
  .popover { right: 12px; width: calc(100% - 24px); }
}

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