@import url('/vendor/fonts/gdat-fonts.css?v=2.5');
@import url('/css/agrimap-modals.css?v=3.8');

:root {
  --bg-app: #0f172a;
  --bg-panel: #111c33;
  --bg-card: #172542;
  --bg-card-hover: #1e3156;
  --border-subtle: rgba(148, 163, 184, 0.18);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --amber: #f59e0b;
  --sky: #0ea5e9;
  --danger: #ef4444;
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
.basemap-dropdown-menu.hidden, .sidebar-expand-btn.hidden { display: none !important; }
html, body, button, input, select, textarea, .leaflet-container, .maplibregl-map {
  font-family: var(--font-sans) !important;
}
code, pre, .font-mono, .hdr-gps-pill {
  font-family: var(--font-mono) !important;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
  background: var(--bg-app);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.typo-page-title {
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  text-transform: uppercase !important;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.typo-layout-title,
#adm-content h2 {
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  text-transform: none !important;
  line-height: 1.35;
}

.typo-body,
#adm-content td {
  font-family: var(--font-sans) !important;
  font-weight: 400;
  font-size: 13px;
  text-transform: none;
  line-height: 1.45;
}

.typo-note,
#adm-content th {
  font-family: var(--font-sans) !important;
  font-weight: 400 !important;
  font-size: 11px !important;
  text-transform: none !important;
  line-height: 1.4;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.agm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-free { background: rgba(148,163,184,0.2); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.35); }
.badge-pro { background: rgba(14,165,233,0.18); color: #38bdf8; border: 1px solid rgba(56,189,248,0.4); }
.badge-ent { background: rgba(245,158,11,0.18); color: #fbbf24; border: 1px solid rgba(251,191,36,0.45); }
.badge-gov { background: rgba(16,185,129,0.2); color: #34d399; border: 1px solid rgba(52,211,153,0.45); }
.badge-danger { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid rgba(248,113,113,0.45); }

.hdr-gps-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px; border-radius: 8px; background: #08101f;
  border: 1px solid rgba(52, 211, 153, 0.38); color: #6ee7b7;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums;
}

.hdr-circle-action-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.hdr-circle-action-btn.hidden { display: none !important; }
.hdr-admin-person-btn { width: 35px; height: 35px; background: transparent; border: none; box-shadow: 0 3px 10px rgba(15, 23, 42, 0.45); }
.hdr-circle-action-btn:hover { transform: scale(1.08); filter: brightness(1.06); }
.hdr-circle-yellow {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #1e293b;
  border: 1.5px solid #fef08a;
  box-shadow: 0 3px 12px rgba(250, 204, 21, 0.42);
}
.hdr-circle-green {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #022c22;
  border: 1.5px solid #a7f3d0;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.45);
}
.hdr-passport-icon-btn {
  width: 36px; height: 36px; background: transparent; border: none;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.42);
}
.hdr-passport-icon-btn img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 9999px; }
.hdr-circle-action-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
  background: #050b16;
  color: #f8fafc;
  border: 1px solid rgba(52, 211, 153, 0.5);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  z-index: 2500;
}
.hdr-circle-action-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.basemap-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.basemap-dropdown-trigger:hover { background: var(--bg-card-hover); }
.basemap-dropdown-chevron { flex-shrink: 0; color: #34d399; transition: transform 0.18s ease; }
.basemap-dropdown-chevron.open { transform: rotate(180deg); }
.basemap-dropdown-menu {
  margin-top: 6px;
  background: #0b1324;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}
.basemap-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  margin-bottom: 4px;
  background: #050a14;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
}
.basemap-mode-tab {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}
.basemap-mode-tab.active {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.55);
}
.basemap-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7.5px 9px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}
.basemap-card:hover { background: var(--bg-card-hover); }
.basemap-card.active {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  font-weight: 700;
}
.basemap-card.locked { opacity: 0.75; }
.basemap-check-box {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  color: transparent;
}
.basemap-card.active .basemap-check-box {
  background: #10b981;
  border-color: #34d399;
  color: #022c22;
}

.sovereign-label {
  background: transparent;
  color: #000000;
  border: none;
  padding: 2px 4px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  paint-order: stroke fill;
  -webkit-text-stroke: 3.2px #ffffff;
  text-shadow: -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px 1.5px 0 #fff, 0 -2px 0 #fff, 0 2px 0 #fff, -2px 0 0 #fff, 2px 0 0 #fff;
}

.prov-count-pill {
  background: rgba(16, 185, 129, 0.92);
  color: #042f2e;
  font-weight: 800;
  font-size: 11px;
  border-radius: 999px;
  padding: 1px 6px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  white-space: nowrap;
}

.leaflet-container { background: #0b192c; }
.leaflet-interactive:focus, .leaflet-interactive:focus-visible, .leaflet-container path:focus, .leaflet-container svg:focus {
  outline: none !important;
  box-shadow: none !important;
}

#left-sidebar { transition: width 0.22s ease, padding 0.22s ease, transform 0.22s ease, opacity 0.18s ease; }
#left-sidebar.sidebar-collapsed {
  width: 0 !important; min-width: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
  border-right-width: 0 !important; overflow: hidden !important; opacity: 0; pointer-events: none;
}

.sidebar-expand-btn {
  width: 44px; height: 44px; border-radius: 9999px; padding: 0;
  background: rgba(15, 23, 42, 0.92); border: 1.5px solid rgba(74, 222, 128, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.sidebar-expand-btn:hover { transform: scale(1.08); box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5); }
.sidebar-expand-btn img { width: 36px; height: 36px; object-fit: contain; display: block; }

.btn-primary {
  background: var(--emerald); color: #022c22; font-weight: 700; border: none;
  border-radius: 8px; padding: 8px 14px; cursor: pointer; transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.92; }

.btn-outline {
  background: transparent; color: var(--text-primary); border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 7px 12px; cursor: pointer;
}
.btn-outline:hover { background: var(--bg-card-hover); }

.input-dark {
  width: 100%; background: #0b1324; color: var(--text-primary);
  border: 1px solid var(--border-subtle); border-radius: 8px; padding: 8px 10px; font-size: 13px;
}
.input-dark:focus { outline: none; border-color: var(--emerald); }
.input-dark:-webkit-autofill, .input-dark:-webkit-autofill:hover, .input-dark:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0b1324 inset !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  caret-color: #f1f5f9;
  border-color: rgba(52, 211, 153, 0.45);
}

.tab-pill {
  padding: 8px 11px; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
  background: none; border-top: none; border-left: none; border-right: none;
}
.tab-pill.active { color: #34d399; border-bottom-color: #10b981; }

.agm-brand-logo-pill {
  display: inline-flex; align-items: center; justify-content: center; height: 38px;
  padding: 0; border-radius: 0; background: transparent;
  border: none; box-shadow: none;
  flex-shrink: 0; text-decoration: none;
}
.agm-brand-logo-img { height: 100%; width: auto; max-width: 146px; object-fit: contain; display: block; }
