html, body { margin:0; padding:0; height:100%; width:100%; overflow:hidden; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; background:#0b0f14; color:#e8edf2; }
#map { position:absolute; top:0; left:0; width:100vw; height:100vh; background:#0b0f14; }

.panel { position:absolute; z-index:1000; background:rgba(13,18,26,.9); color:#e8edf2;
  border-radius:14px; box-shadow:0 8px 30px rgba(0,0,0,.5); backdrop-filter:blur(10px); }
.panel.left { top:16px; left:16px; width:262px; padding:16px 16px 12px; }
.panel.right { top:16px; right:16px; width:352px; padding:0 0 12px; max-height:calc(100vh - 32px); overflow-y:auto; }

.brand h1 { margin:2px 0 0; font-size:22px; letter-spacing:2px; }
.brand .leaf { color:#35c27a; font-size:16px; }
.brand .sub { font-size:11px; color:#9fb0bf; margin-bottom:8px; }

/* Global Geosearch & Location Card */
.search-box { display:flex; gap:6px; margin-bottom:8px; }
.search-box input { flex:1; background:#16212d; border:1px solid #283a4c; border-radius:8px; padding:7px 10px; font-size:12px; color:#e8edf2; outline:none; transition:border-color .2s; }
.search-box input:focus { border-color:#35c27a; }
.search-box button { background:#1f2e3d; border:1px solid #2f4357; border-radius:8px; padding:0 10px; color:#cbe3f5; cursor:pointer; }
.search-box button:hover { background:#2a3e52; }

.loc-card { background:#141f2b; border:1px solid #243547; border-radius:8px; padding:7px 9px; margin-bottom:8px; }
.loc-main { display:flex; align-items:center; gap:5px; font-size:12px; color:#e8edf2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.loc-pin { font-size:11px; }
.loc-sub { font-size:10px; color:#8ea1af; margin-top:2px; padding-left:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.quick-nav { margin-bottom:8px; }
.quick-title { font-size:10px; color:#8ea1af; text-transform:uppercase; letter-spacing:.5px; }
.quick-btns { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.qbtn { background:#121a24; border:1px solid #223242; color:#9fb0bf; border-radius:5px; padding:3px 7px; font-size:10px; cursor:pointer; }
.qbtn:hover { background:#1b2837; color:#e8edf2; }
.qbtn.on { background:#1c3a2e; color:#7fe0ac; border-color:#2e5c46; }

.lbl { display:block; font-size:11px; color:#8ea1af; margin:10px 0 4px; text-transform:uppercase; letter-spacing:.6px; }
.panel select { width:100%; background:#1a2430; color:#e8edf2; border:1px solid #2c3a49;
  border-radius:8px; padding:7px 8px; font-size:13px; }
.chk { display:flex; gap:8px; align-items:center; font-size:12.5px; margin-top:12px; }
.chk input { width:16px; height:16px; accent-color:#35c27a; }
#ndBlendRow { margin-top:6px; }
#ndBlendRow label { font-size:11px; color:#8ea1af; }
#ndBlendRow input[type=range] { width:100%; }

.legend { margin-top:10px; }
.legend .bar { height:10px; border-radius:6px;
  background:linear-gradient(90deg, #7d96be 0%, #c7b174 12%, #dbcc82 30%, #aad05a 55%, #4ea63e 80%, #0d7830 100%); }
.legend .ticks { display:flex; justify-content:space-between; font-size:9.5px; color:#8ea1af; margin-top:2px; }
.receipt { font-size:9px; color:#6d7d8b; margin-top:8px; line-height:1.4; }

.tabs { display:flex; gap:4px; padding:10px 10px 6px; }
.tab { flex:1; background:#141d27; color:#9fb0bf; border:1px solid #223141; border-radius:9px;
  padding:8px 0; font-size:12.5px; cursor:pointer; }
.tab.on { background:#1c3a2e; color:#7fe0ac; border-color:#2e5c46; }
.tabp { padding:4px 14px 8px; }
.hidden { display:none; }

.wcard { background:#131c26; border:1px solid #22313f; border-radius:12px; padding:12px 14px; margin-top:8px; }
.wt { font-size:32px; font-weight:600; line-height:1; }
.wsub { color:#9fb0bf; font-size:11px; margin-top:2px; }
.wgrid { display:grid; grid-template-columns:1fr 1fr; gap:5px 12px; font-size:12px; margin-top:10px; }
.wgrid .k { color:#8ea1af; }
.dayrow { display:flex; gap:6px; margin-top:10px; }
.day { flex:1; background:#101820; border:1px solid #1d2b38; border-radius:8px; padding:6px 4px; text-align:center; }
.day .d0 { font-size:9.5px; color:#8ea1af; }
.day .d1 { font-size:13px; }
.day .d2 { font-size:9.5px; color:#7fe0ac; }
.day .d3 { font-size:9.5px; color:#9fb0bf; }
.badge { display:inline-block; font-size:9px; padding:2px 7px; border-radius:999px; margin-left:6px; vertical-align:middle; }
.badge.live { background:#173529; color:#7fe0ac; border:1px solid #2e5c46; }
.badge.baked { background:#35301a; color:#e5cd77; border:1px solid #5c5426; }
.badge.ref  { background:#25202e; color:#b9a7ea; border:1px solid #443a5c; }

.spark { width:100%; height:30px; display:block; }
.mline { font-size:11px; color:#c7d3dd; margin-top:6px; }
.hint { margin-top:8px; background:#1f2a35; border-radius:8px; padding:8px 10px; font-size:12px; }
.hint.warn { background:#3a2417; border:1px solid #6b3a20; color:#f0bd8f; }
.hint.ok { background:#172f22; border:1px solid #2e5c46; color:#9fe0c1; }

.sgrid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.schip { background:#131c26; border:1px solid #22313f; border-radius:10px; padding:9px 10px; }
.schip h4 { margin:0 0 4px; font-size:12px; display:flex; justify-content:space-between; align-items:center; }
.schip .dot { width:8px; height:8px; border-radius:50%; background:#35c27a; }
.schip .dot.dry { background:#e07a3c; }
.schip .meta { font-size:10px; color:#9fb0bf; }
.schip .cap { font-size:10px; color:#6d7d8b; }

.field-ui button { background:#1c3a2e; color:#7fe0ac; border:1px solid #2e5c46; border-radius:8px;
  padding:7px 12px; font-size:12.5px; cursor:pointer; margin:6px 6px 2px 0; }
.field-ui button.ghost { background:#141d27; color:#9fb0bf; border-color:#223141; }
.field-ui button:disabled { opacity:.4; cursor:default; }
.report { background:#131c26; border:1px solid #22313f; border-radius:12px; padding:12px 14px; margin-top:10px; }
.report h3 { margin:0; font-size:14px; color:#7fe0ac; }
.report table { width:100%; border-collapse:collapse; margin-top:8px; font-size:12px; }
.report td { padding:3px 0; }
.report td.k { color:#8ea1af; width:52%; }

/* Soil Chemistry & Fertility Grid */
.chem-section { margin-top:12px; border-top:1px solid #202d3a; padding-top:10px; }
.chem-section h4 { margin:0 0 8px; font-size:12px; color:#e8edf2; display:flex; justify-content:space-between; align-items:center; }
.chem-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.chem-card { background:#101822; border:1px solid #213040; border-radius:8px; padding:6px 8px; font-size:11px; }
.chem-k { display:block; font-size:9.5px; color:#8ea1af; text-transform:uppercase; letter-spacing:0.4px; }
.chem-val { font-size:13px; color:#e8edf2; display:block; margin:2px 0; }
.chem-val small { font-size:10px; font-weight:400; color:#9fb0bf; }
.chem-tag { font-size:9px; padding:1px 5px; border-radius:4px; display:inline-block; }
.chem-tag.ok { background:#163325; color:#7fe0ac; }
.chem-tag.warn { background:#382417; color:#f0bd8f; }

/* Sentinel-2 Live Receipt */
.s2-receipt { background:#101924; border:1px solid #203142; border-radius:8px; padding:8px 10px; margin-top:10px; font-size:10.5px; }
.s2-hdr { display:flex; justify-content:space-between; align-items:center; font-weight:600; color:#e8edf2; }
.s2-details { font-size:9.5px; color:#9fb0bf; margin-top:3px; word-break:break-all; }
.s2-details b { color:#7fe0ac; display:block; margin-bottom:1px; }

.crop-preview { margin-top:10px; border-radius:8px; overflow:hidden; border:1px solid #22313f; }
.crop-preview img { width:100%; height:110px; object-fit:cover; display:block; }
.crop-preview .cap { font-size:10px; color:#9fb0bf; padding:5px 8px; background:#101820; display:flex; justify-content:space-between; }

/* 10-Day AI Forecast styling */
.fcard { background:#131c26; border:1px solid #22313f; border-radius:12px; padding:12px 14px; margin-top:8px; }
.fslider-row { margin:10px 0 8px; }
.fslider-row label { display:flex; justify-content:space-between; font-size:11px; color:#9fb0bf; margin-bottom:4px; }
.fslider-row input[type=range] { width:100%; accent-color:#35c27a; }
.fmetrics { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; font-size:12px; margin-top:8px; }
.fmetrics .k { color:#8ea1af; }
.fmetric-lg { font-size:24px; font-weight:600; color:#e8edf2; margin-top:2px; }
.fconf-bar { height:6px; background:#1a2530; border-radius:3px; overflow:hidden; margin-top:4px; }
.fconf-fill { height:100%; background:#35c27a; border-radius:3px; }
.fmap-container { margin-top:10px; border-radius:8px; overflow:hidden; border:1px solid #22313f; background:#0b0f14; }
.fmap-container img { width:100%; height:130px; object-fit:cover; display:block; }
.fmap-bar { display:flex; justify-content:space-between; align-items:center; padding:5px 8px; background:#101820; font-size:10px; color:#9fb0bf; }
.fmap-btns { display:flex; gap:4px; }
.fmap-btn { background:#17222c; border:1px solid #263544; color:#9fb0bf; border-radius:4px; padding:2px 6px; font-size:9.5px; cursor:pointer; }
.fmap-btn.on { background:#1c3a2e; color:#7fe0ac; border-color:#2e5c46; }

/* Agro-Tech & Feasibility Survey styling */
.agro-card { background:#131c26; border:1px solid #22313f; border-radius:12px; padding:12px 14px; margin-top:8px; }
.score-banner { display:flex; gap:12px; align-items:center; background:#182533; border:1px solid #283a4c; border-radius:10px; padding:10px 12px; margin-top:8px; }
.score-circle { width:52px; height:52px; border-radius:50%; background:#1c3a2e; border:2px solid #35c27a; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#7fe0ac; flex-shrink:0; }
.score-circle .num { font-size:18px; font-weight:700; line-height:1; }
.score-circle .denom { font-size:8px; opacity:.8; }
.score-info { font-size:11.5px; }
.score-info b { font-size:13px; color:#e8edf2; display:block; margin-bottom:2px; }

.action-grid { display:grid; grid-template-columns:1fr; gap:8px; margin-top:10px; }
.action-item { background:#101822; border-left:3px solid #35c27a; border-radius:6px; padding:8px 10px; font-size:11.5px; }
.action-item.warn { border-left-color:#e07a3c; }
.action-item.alert { border-left-color:#d44d4d; }
.action-item .hdr { display:flex; justify-content:space-between; font-weight:600; color:#e8edf2; margin-bottom:2px; }
.action-item .hdr span:last-child { font-size:10px; font-weight:400; padding:1px 6px; border-radius:4px; }
.badge-ok { background:#173529; color:#7fe0ac; }
.badge-warn { background:#3a2417; color:#f0bd8f; }

.rotation-timeline { margin-top:10px; border-radius:8px; background:#101822; padding:10px; }
.rotation-step { display:flex; gap:10px; align-items:flex-start; margin-bottom:8px; font-size:11px; }
.rotation-step:last-child { margin-bottom:0; }
.rot-badge { padding:3px 7px; border-radius:5px; font-size:10px; font-weight:600; flex-shrink:0; width:55px; text-align:center; }
.rot-cur { background:#1c3a2e; color:#7fe0ac; border:1px solid #2e5c46; }
.rot-next { background:#1a2838; color:#95c6ed; border:1px solid #2c435c; }
.rot-future { background:#241d2d; color:#caa9f0; border:1px solid #443555; }
.rot-details b { color:#e8edf2; font-size:12px; }
.rot-details div { color:#9fb0bf; font-size:10px; margin-top:1px; }

.btn-survey { width:100%; background:#1c3a2e; color:#7fe0ac; border:1px solid #2e5c46; border-radius:8px; padding:9px; font-size:12px; font-weight:600; cursor:pointer; margin-top:10px; }
.btn-survey:hover { background:#254d3d; }

.target-pulse-wrap { position:relative; width:22px; height:22px; }
.target-dot { position:absolute; top:6px; left:6px; width:10px; height:10px; border-radius:50%; background:#35c27a; border:2px solid #ffffff; box-shadow:0 0 8px #35c27a; }
.target-ring { position:absolute; top:1px; left:1px; width:20px; height:20px; border-radius:50%; border:2px solid #35c27a; animation:pulseTarget 1.8s infinite; }
@keyframes pulseTarget {
  0% { transform:scale(0.6); opacity:1; }
  100% { transform:scale(1.8); opacity:0; }
}

/* User Current GPS Location Marker */
.user-location-wrap { position:relative; width:32px; height:32px; cursor:pointer; }
.user-location-pulse { position:absolute; top:0; left:0; width:32px; height:32px; border-radius:50%; background:rgba(14, 165, 233, 0.35); border:1.5px solid #38bdf8; animation:pulseUserLocation 2s infinite ease-out; box-sizing:border-box; }
.user-location-core { position:absolute; top:9px; left:9px; width:14px; height:14px; border-radius:50%; background:radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 60%, #0369a1 100%); border:2.5px solid #ffffff; box-shadow:0 0 12px rgba(14, 165, 233, 0.9), 0 2px 6px rgba(0, 0, 0, 0.6); box-sizing:border-box; }
@keyframes pulseUserLocation {
  0% { transform:scale(0.5); opacity:1; }
  70% { transform:scale(1.9); opacity:0.25; }
  100% { transform:scale(2.3); opacity:0; }
}

/* Floating GPS FAB Button & Controls */
.btn-locate { background:#162738 !important; border-color:#2a455f !important; color:#38bdf8 !important; }
.btn-locate:hover { background:#243e57 !important; border-color:#38bdf8 !important; }
.btn-locate.locating { animation:gpsPulse 1.2s infinite ease-in-out; }

.qbtn-gps { border-color:#0284c7 !important; color:#38bdf8 !important; background:#0c1e2e !important; }
.qbtn-gps:hover { background:#153450 !important; color:#7dd3fc !important; }

.floating-gps-btn {
  position: absolute;
  bottom: 24px;
  left: 296px;
  z-index: 1000;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(13, 18, 26, 0.92);
  border: 1.5px solid #28445e;
  color: #38bdf8;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}
.floating-gps-btn:hover {
  background: #182e42;
  border-color: #38bdf8;
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
}
.floating-gps-btn.locating {
  border-color: #38bdf8;
  animation: gpsPulse 1.2s infinite ease-in-out;
}
@keyframes gpsPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(56, 189, 248, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.wing { position:absolute; bottom:18px; left:50%; transform:translateX(-50%); z-index:1000;
  background:rgba(13,18,26,.78); color:#cfe8da; padding:8px 16px; border-radius:999px; font-size:12px; }
.leaflet-container .leaflet-control-attribution { background:rgba(13,18,26,.7); color:#8ea1af; font-size:9px; }
.leaflet-container .leaflet-control-attribution a { color:#9fb0bf; }

/* 3D Atmosphere Globe View & View Bar */
.view-bar { position:absolute; top:16px; left:50%; transform:translateX(-50%); z-index:1000;
  display:flex; background:rgba(13,18,26,.88); border:1px solid #233446; border-radius:999px; padding:4px;
  box-shadow:0 8px 30px rgba(0,0,0,.6); backdrop-filter:blur(12px); }
.vbtn { background:transparent; border:none; color:#9fb0bf; padding:7px 18px; border-radius:999px;
  font-size:12px; font-weight:600; cursor:pointer; transition:all .2s; }
.vbtn.on { background:#1c3a2e; color:#7fe0ac; box-shadow:0 2px 8px rgba(53,194,122,.25); }
.vbtn:hover:not(.on) { color:#e8edf2; background:#162230; }

#globeContainer { position:absolute; top:0; left:0; width:100vw; height:100vh;
  background:radial-gradient(circle at 45% 50%, #081122 0%, #03050a 100%); overflow:hidden; z-index:10; }
#globeThree { width:100%; height:100%; position:absolute; top:0; left:0; overflow:hidden; }
.cesium-widget, .cesium-widget canvas { width:100% !important; height:100% !important; display:block; outline:none; touch-action:none; }
.cesium-widget-credits { display:none !important; }

.globe-hud { position:absolute; bottom:20px; left:20px; z-index:1000; pointer-events:none;
  background:rgba(11,16,24,.88); border:1px solid #223242; border-radius:12px; padding:10px 14px; backdrop-filter:blur(10px); }
.globe-tag { font-size:11px; font-weight:600; color:#7fe0ac; letter-spacing:0.5px; }
.globe-legend { display:flex; gap:10px; margin-top:6px; font-size:10px; color:#cbd5e1; }
.gl-item { display:flex; align-items:center; gap:4px; }
.gl-color { width:10px; height:10px; border-radius:2px; }
.globe-hint { font-size:9.5px; color:#8ea1af; margin-top:5px; }

.btn-inspect-farm { width:100%; background:#192b3b; color:#7fe0ac; border:1px solid #2e4963; border-radius:6px;
  padding:6px 8px; font-size:11px; font-weight:600; cursor:pointer; margin-top:6px; }
.btn-inspect-farm:hover { background:#233b52; }

/* AI Atmospheric Forecast Bar & Grid Styles */
.ai-model-bar { display:flex; gap:4px; margin-bottom:10px; background:#0f1722; padding:3px; border-radius:8px; border:1px solid #1f2e3d; }
.model-btn { flex:1; background:transparent; border:none; color:#8ea1af; font-size:10px; font-weight:600; padding:6px 4px; border-radius:6px; cursor:pointer; text-align:center; transition:all .2s; }
.model-btn:hover { color:#e8edf2; background:#162433; }
.model-btn.on { background:#1b3026; color:#7fe0ac; border:1px solid #2e5c46; box-shadow:0 0 10px rgba(53,194,122,.2); }

.btn-toggle-grid { width:100%; margin-top:8px; border-radius:6px; padding:7px 8px; font-size:11px; font-weight:600; cursor:pointer; transition:all .2s; }
.btn-toggle-grid:hover { filter:brightness(1.2); }

.corrdiff-grid-tooltip { background:rgba(10,16,24,.92) !important; border:1px solid #35c27a !important; color:#e8edf2 !important; font-size:11px !important; padding:6px 10px !important; border-radius:6px !important; box-shadow:0 4px 14px rgba(0,0,0,.6) !important; }

/* Solstice AI Enterprise Gatekeeper & User Badge */
.user-badge { display:flex; align-items:center; gap:6px; margin-left:8px; padding-left:10px; border-left:1px solid #233446; font-size:11px; color:#cbd5e1; }
.user-dot { width:7px; height:7px; border-radius:50%; background:#35c27a; box-shadow:0 0 6px #35c27a; }
.user-txt { max-width:140px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; color:#e8edf2; }
.btn-logout { background:#1e2a38; border:1px solid #2f4357; color:#8ea1af; font-size:10px; padding:2px 7px; border-radius:4px; cursor:pointer; margin-left:4px; }
.btn-logout:hover { background:#304358; color:#f87171; }

.auth-overlay { position:fixed; top:0; left:0; width:100vw; height:100vh; background:rgba(6,9,14,0.88); backdrop-filter:blur(18px); z-index:99999; display:flex; align-items:center; justify-content:center; }
.auth-card { width:390px; max-width:90vw; background:linear-gradient(145deg, #101824 0%, #0a0f17 100%); border:1px solid #1f3042; border-radius:16px; padding:28px 24px; box-shadow:0 20px 50px rgba(0,0,0,0.85); color:#e8edf2; }
.auth-hdr { text-align:center; margin-bottom:18px; }
.auth-brand { font-size:20px; font-weight:800; letter-spacing:2px; color:#ffffff; }
.auth-sub { font-size:11px; color:#8ea1af; margin-top:3px; }
.auth-node-badge { display:inline-block; margin-top:8px; font-size:10px; font-weight:700; color:#35c27a; background:rgba(53,194,122,0.12); border:1px solid rgba(53,194,122,0.3); border-radius:999px; padding:2px 10px; letter-spacing:0.5px; }

.auth-tabs { display:flex; gap:6px; background:#0b111a; padding:3px; border-radius:8px; border:1px solid #1c2a38; margin-bottom:16px; }
.auth-tab { flex:1; background:transparent; border:none; color:#8ea1af; font-size:11px; font-weight:600; padding:6px 4px; border-radius:6px; cursor:pointer; transition:all .2s; }
.auth-tab.on { background:#182635; color:#7fe0ac; border:1px solid #253d52; }

.auth-lbl { display:block; font-size:11px; color:#9fb0bf; margin-bottom:4px; font-weight:500; }
.auth-input { width:100%; box-sizing:border-box; background:#0d141e; border:1px solid #223242; border-radius:8px; padding:10px 12px; font-size:13px; color:#ffffff; outline:none; transition:border-color .2s; margin-bottom:10px; }
.auth-input:focus { border-color:#35c27a; }
.auth-hint { font-size:10px; color:#6d7d8b; line-height:1.4; margin-top:-4px; margin-bottom:12px; }

.btn-auth-submit { width:100%; background:#1c3a2e; color:#7fe0ac; border:1px solid #2e5c46; border-radius:8px; padding:11px; font-size:13px; font-weight:700; cursor:pointer; transition:all .2s; box-shadow:0 4px 14px rgba(53,194,122,0.25); }
.btn-auth-submit:hover { background:#254d3d; color:#a2f525; }

.auth-error { background:rgba(239,68,68,0.15); border:1px solid rgba(239,68,68,0.4); color:#fca5a5; font-size:11px; padding:8px 10px; border-radius:6px; margin-bottom:12px; text-align:center; }
.auth-footer { font-size:9.5px; color:#556575; text-align:center; margin-top:16px; }

