/* 
 * Land Intelligence AI - Core Design System & Styling
 * Premium Glassmorphism & Dark Mode CSS Style
 * Designed for High-Potential Land SaaS and PWA Ingestion
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0B1220;
  --bg-secondary: #111827;
  --card-bg: #162033;
  --card-bg-sec: #1F2937;
  --card-border: #334155;
  --card-hover-border: #2DD4BF;
  
  /* Vibrant Theme Accents matching specific requested layers */
  --accent-teal: #2DD4BF; /* Parcela / oportunidad */
  --accent-teal-glow: rgba(45, 212, 191, 0.15);
  --accent-purple: #8B5CF6; /* Data centers / interconexión */
  --accent-purple-glow: rgba(139, 92, 246, 0.15);
  --accent-blue: #38BDF8; /* Telecomunicaciones / datos */
  --accent-blue-glow: rgba(56, 189, 248, 0.15);
  
  /* Layer Color Tokens */
  --color-parcel: #2DD4BF;
  --color-electric-line: #EF4444; /* Red eléctrica */
  --color-substation: #F59E0B; /* Subestaciones */
  --color-telecom: #38BDF8; /* Telecomunicaciones / datos */
  --color-datacenter: #8B5CF6; /* Data centers / interconexión */
  --color-warning-amber: #FBBF24; /* Avisos / contraste técnico */
  --color-restriction: #64748B; /* Restricciones / límites */
  
  /* Content Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  
  /* Status Colors */
  --color-success: #2DD4BF;
  --color-warning: #FBBF24;
  --color-danger: #EF4444;
  --color-info: #38BDF8;

  /* Fonts */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 5% 5%, rgba(157, 78, 221, 0.08) 0px, transparent 35%),
    radial-gradient(at 95% 95%, rgba(0, 245, 212, 0.06) 0px, transparent 40%),
    radial-gradient(at 50% 50%, rgba(58, 134, 240, 0.04) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* =================================================================== */
/* HEADER & NAVIGATION */
/* =================================================================== */
header {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 8, 20, 0.85);
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 2.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  width: 2.3rem;
  height: 2.3rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-title);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.2);
}

.brand h1 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand h1 span {
  background: linear-gradient(to right, var(--accent-teal), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link-item {
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link-item:hover, .nav-link-item.active {
  color: #fff;
}

.nav-link-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-teal);
  box-shadow: 0 0 8px var(--accent-teal);
}

.header-actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.compliance-badge {
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--color-success);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.data-isolation-badge {
  background: rgba(58, 134, 240, 0.08);
  border-color: rgba(58, 134, 240, 0.2);
  color: #a5caff;
}

/* =================================================================== */
/* UNIVERSAL DESIGN TOKENS */
/* =================================================================== */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.12rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}

.card-title i {
  color: var(--accent-teal);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(157, 78, 221, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(157, 78, 221, 0.45);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ffa4a4;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
}

.btn-small {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.8rem !important;
  border-radius: 6px !important;
}

.btn-large {
  padding: 1rem 2rem !important;
  font-size: 1rem !important;
  border-radius: 12px !important;
}

/* Form Styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.025em;
}

.form-input {
  background: rgba(5, 8, 20, 0.65);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  outline: none;
  width: 100%;
}

.form-input:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.12);
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper i {
  position: absolute;
  left: 0.95rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-icon-wrapper .form-input {
  padding-left: 2.4rem;
}

.row-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* =================================================================== */
/* 1. MARKETING LANDING VIEW */
/* =================================================================== */
#view-landing {
  padding: 0;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.landing-hero {
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 968px) {
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1.5rem;
  }
}

.hero-pill-badge {
  background: rgba(157, 78, 221, 0.1);
  border: 1px solid rgba(157, 78, 221, 0.25);
  color: #d4a5ff;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 968px) {
  .hero-pill-badge {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-title {
  font-family: var(--font-title);
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-teal) 10%, var(--accent-purple) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 968px) {
  .hero-actions {
    justify-content: center;
  }
}

.hero-trust-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

@media (max-width: 968px) {
  .hero-trust-indicators {
    justify-content: center;
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.trust-item i {
  color: var(--accent-teal);
}

/* Hero abstract visual widget */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-visual-card {
  width: 100%;
  max-width: 440px;
  background: rgba(13, 20, 48, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.mini-visual-map {
  height: 220px;
  background: #040715;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.mini-visual-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(0, 245, 212, 0.1) 1px, transparent 0);
  background-size: 16px 14px;
}

.radar-scan {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.05) 0%, rgba(0, 245, 212, 0.01) 70%, transparent 100%);
  border: 1px solid rgba(0, 245, 212, 0.1);
  border-radius: 50%;
  animation: radarPulse 4s linear infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.3); opacity: 0.2; }
  50% { opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 0; }
}

.mini-parcel-outline {
  position: absolute;
  top: 30%;
  left: 25%;
  width: 110px;
  height: 80px;
  border: 2px dashed var(--accent-teal);
  background: rgba(0, 245, 212, 0.07);
  transform: rotate(12deg);
}

.mini-substation-node {
  position: absolute;
  top: 45%;
  left: 65%;
  width: 12px;
  height: 12px;
  background: var(--accent-purple);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-purple);
}

.mini-visual-stats {
  display: flex;
  gap: 1rem;
}

.mini-stat {
  flex: 1;
  background: rgba(5,8,20,0.4);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
}

.m-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.m-val {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.m-val.high {
  color: var(--color-success);
}

/* Statistics Ribbon */
.landing-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.stat-number {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Section common wrappers */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.section-tag {
  color: var(--accent-teal);
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Features */
.landing-features {
  padding: 3rem 2rem;
  background: rgba(13, 20, 48, 0.15);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.02);
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem 1.5rem;
}

.feature-card .f-icon {
  font-size: 2rem;
  color: var(--accent-teal);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-card h4 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Pricing Section */
.landing-pricing {
  padding: 2rem;
  margin-bottom: 4rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.pricing-card.recommended {
  border-color: var(--accent-teal);
  background: rgba(13, 20, 48, 0.65);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.08);
}

.p-badge {
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: var(--accent-teal);
  color: #050814;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 2rem;
  transform: rotate(45deg);
}

.p-header {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 1.25rem;
}

.p-plan-name {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: block;
}

.p-price {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  display: block;
  margin: 0.5rem 0;
}

.p-price span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.p-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.p-body {
  padding: 1rem 0;
}

.p-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.p-body li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.p-body li i {
  font-size: 0.85rem;
}

.p-body li i.fa-circle-check {
  color: var(--accent-teal);
}

.p-body li i.disabled {
  color: var(--text-muted);
}

/* =================================================================== */
/* 2. REGISTRATION VIEW */
/* =================================================================== */
#view-register {
  padding: 4rem 1.5rem;
}

.register-container {
  max-width: 500px;
  margin: 0 auto;
}

.register-card {
  padding: 2.5rem;
  background: rgba(13, 20, 48, 0.7);
  border: 1.5px solid rgba(255,255,255,0.08);
}

.register-instructions {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.compliance-checkbox-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.25rem;
}

.compliance-checkbox-wrapper input[type="checkbox"] {
  accent-color: var(--accent-teal);
  margin-top: 0.2rem;
}

.register-footer-links {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1rem;
}

.register-footer-links a {
  color: var(--accent-teal);
  text-decoration: none;
  font-weight: 600;
}

.register-footer-links a:hover {
  text-decoration: underline;
}

/* =================================================================== */
/* 3. CORE DASHBOARD VIEW */
/* =================================================================== */
#view-dashboard {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Ribbon Alert Bar */
.dashboard-ribbon-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--card-border);
  padding: 0.65rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

@media (max-width: 968px) {
  .dashboard-ribbon-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }
}

.agency-badge {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.agency-badge i {
  color: var(--accent-teal);
}

.agency-plan-badge {
  background: var(--accent-purple);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.compliance-scrolling-warning {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: #ff9d9d;
  background: rgba(239, 68, 68, 0.08);
  padding: 0.25rem 1rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(239,68,68,0.15);
}

.compliance-scrolling-warning span {
  white-space: nowrap;
}

/* Main Dashboard Grid */
.dashboard-grid {
  flex: 1;
  padding: 1.5rem;
  max-width: 1750px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 360px 1fr 370px;
  gap: 1.25rem;
}

@media (max-width: 1300px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid .central-area {
    grid-column: span 2;
    order: -1;
  }
}

@media (max-width: 850px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid .central-area {
    grid-column: span 1;
  }
}

/* Dashboard left column cards tabs */
.tab-button-group {
  display: flex;
  background: rgba(5,8,20,0.5);
  padding: 0.25rem;
  border-radius: 8px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.tab-btn.active {
  background: var(--bg-secondary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.panel-promise-container {
  background: rgba(0, 245, 212, 0.03);
  border: 1.2px dashed rgba(0, 245, 212, 0.15);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin: 0.5rem 0;
}

.panel-promise-container p {
  font-size: 0.72rem;
  color: var(--accent-teal);
  line-height: 1.35;
  text-align: center;
}

.geojson-placeholder-info {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Compliance legend rows */
.compliance-legend-card {
  gap: 0.5rem !important;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* =================================================================== */
/* GIS MAP WORKSPACE */
/* =================================================================== */
.central-area {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
}

.map-container {
  flex: 1;
  min-height: 480px;
  background: #040714;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.9);
}

.map-coordinates-box {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(7, 10, 25, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  z-index: 10;
  font-family: monospace;
}

.map-canvas-mock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #070a1a;
  background-image: 
    radial-gradient(rgba(0, 245, 212, 0.12) 1.2px, transparent 0),
    radial-gradient(rgba(157, 78, 221, 0.08) 1.2px, transparent 0);
  background-size: 28px 28px;
  background-position: 0 0, 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
}

/* Simulated Vector elements overlaying map */
.map-parcel-outline {
  width: 180px;
  height: 120px;
  border: 2px dashed var(--accent-teal);
  background: rgba(0, 245, 212, 0.07);
  box-shadow: 0 0 25px rgba(0, 245, 212, 0.15);
  border-radius: 6px;
  position: relative;
  display: none;
  animation: mapItemEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes mapItemEntrance {
  from { transform: scale(0.6) rotate(-20deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.substation-node-map {
  position: absolute;
  top: 25%;
  left: 72%;
  display: none;
  flex-direction: column;
  align-items: center;
}

.substation-tooltip-label {
  font-size: 0.6rem;
  color: #fff;
  background: #050814;
  border: 1px solid var(--accent-purple);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-top: 4px;
  white-space: nowrap;
}

.fiber-cable-svg-path {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* Layer Control Drawer Drawer */
.layers-drawer-card {
  padding: 1.25rem !important;
}

.layers-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.layers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.65rem;
}

.layer-item {
  background: rgba(13, 20, 48, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.layer-item:hover {
  background: rgba(13, 20, 48, 0.5);
  border-color: rgba(255,255,255,0.12);
}

.layer-item.active {
  background: rgba(0, 245, 212, 0.04);
  border-color: var(--accent-teal);
  box-shadow: inset 0 0 10px rgba(0, 245, 212, 0.05);
}

.layer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.layer-dot.catastro { background-color: var(--accent-blue); }
.layer-dot.grid { background-color: var(--accent-purple); }
.layer-dot.fiber { background-color: var(--accent-teal); }
.layer-dot.env { background-color: var(--color-success); }

/* =================================================================== */
/* OPPORTUNITY RANKING SIDEBAR */
/* =================================================================== */
.opportunity-list-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-right: 0.25rem;
}

.opportunity-item {
  background: rgba(5,8,20,0.35);
  border: 1.2px solid rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.opportunity-item:hover {
  background: rgba(13, 20, 48, 0.5);
  border-color: var(--accent-teal);
  transform: translateX(2px);
}

.opportunity-item.selected {
  background: rgba(0, 245, 212, 0.05);
  border-color: var(--accent-teal);
}

.opp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.opp-header h5 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.opp-header .opp-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.opp-body {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.opp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.opp-tag-item {
  font-size: 0.58rem;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-refresh-opps {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.btn-refresh-opps:hover {
  color: var(--accent-teal);
  transform: rotate(45deg);
}

/* =================================================================== */
/* CHAT ASSISTANT PANEL */
/* =================================================================== */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 280px;
  padding-right: 0.25rem;
}

.message {
  padding: 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 88%;
}

.message.user {
  background: rgba(58, 134, 240, 0.15);
  border: 1px solid rgba(58, 134, 240, 0.25);
  align-self: flex-end;
  color: #e2efff;
}

.message.assistant {
  background: rgba(5,8,20,0.5);
  border: 1px solid rgba(255,255,255,0.04);
  align-self: flex-start;
  color: #fff;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* =================================================================== */
/* PARCEL DETAIL PANEL */
/* =================================================================== */
.details-section-panel {
  max-width: 1750px;
  margin: 1rem auto 2rem auto;
  width: calc(100% - 3rem);
  padding: 2rem !important;
  display: none;
  animation: paneSlideUp 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
}

@keyframes paneSlideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.details-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 1rem;
}

@media (max-width: 768px) {
  .details-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

.d-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.d-action-group {
  display: flex;
  gap: 0.75rem;
}

.compliance-card-banner {
  border-left: 4px solid var(--color-warning);
  background: rgba(245, 158, 11, 0.05);
  padding: 0.85rem 1.25rem;
  border-radius: 4px 12px 12px 4px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.compliance-card-banner i {
  color: var(--color-warning);
}

.compliance-card-banner div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.75rem;
}

.compliance-card-banner strong {
  color: #fff;
}

.compliance-card-banner span {
  color: var(--text-secondary);
}

/* Scoring cards */
.suitability-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.score-grid-card {
  background: rgba(5,8,20,0.4);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 1.25rem;
}

.score-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.score-card-header span {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.scoring-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.scoring-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.scoring-bullets li i {
  margin-top: 0.15rem;
}

/* Technical categories specification */
.details-rows-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.detail-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.detail-item-row span:first-child {
  color: var(--text-secondary);
}

.detail-item-row span:last-child {
  color: #fff;
  font-weight: 600;
}

/* =================================================================== */
/* 4. PREMIUM REPORT MODAL LAYOUT */
/* =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  width: 100%;
  max-width: 820px;
  background: #0b112c;
  border: 1.5px solid rgba(255,255,255,0.08);
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  padding: 1.5rem !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.75rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  color: var(--color-danger);
}

.modal-body-pdf-layout {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #06091b;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
  margin: 1rem 0;
}

/* Visual styled PDF blueprint format */
.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--accent-blue);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.pdf-logo-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-logo {
  width: 2rem;
  height: 2rem;
  background: var(--accent-blue);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 800;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-logo-brand h3 {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.pdf-logo-brand p {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.pdf-report-meta {
  text-align: right;
  font-size: 0.65rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.pdf-compliance-ribbon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
  text-align: center;
  padding: 0.35rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.pdf-grid-summary {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
}

.pdf-col h4 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
}

.pdf-table tr {
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.pdf-table td {
  font-size: 0.7rem;
  padding: 0.35rem 0;
}

.pdf-table td:first-child {
  color: var(--text-secondary);
}

.pdf-table td:last-child {
  color: #fff;
  font-weight: 600;
  text-align: right;
}

.pdf-table.inline-table {
  display: block;
}

.pdf-table.inline-table tr {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.pdf-table.inline-table td {
  flex: 1;
  text-align: left !important;
}

.pdf-suit-bar-item {
  margin-bottom: 0.65rem;
  font-size: 0.7rem;
}

.pdf-suit-bar-item span {
  color: var(--text-secondary);
}

.pdf-suit-bar-item strong {
  color: var(--color-success);
}

.pdf-suit-bar-item .p-g {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
}

.pdf-disclaimer-legal {
  background: #020409;
  border-left: 2px solid var(--color-warning);
  padding: 0.65rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.58rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 1rem;
}

.modal-footer-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1rem;
}

/* =================================================================== */
/* FOOTER SYSTEM */
/* =================================================================== */
footer {
  background: #03050c;
  border-top: 1px solid var(--card-border);
  padding: 3rem 2.5rem 2rem 2.5rem;
  margin-top: auto;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-about h4 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.85rem;
}

.footer-about h4 span {
  color: var(--accent-teal);
}

.footer-about p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 550px;
}

.footer-links h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.85rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-links li i {
  color: var(--accent-teal);
}

.footer-copyright {
  max-width: 1400px;
  margin: 1rem auto 0 auto;
  text-align: center;
}

.footer-copyright p:first-child {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* UI category styles */
.validation-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #ffca79;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.view-section {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.view-section.active-view {
  display: block !important;
  opacity: 1 !important;
}

.view-section.active-flex-view {
  display: flex !important;
  opacity: 1 !important;
}

/* Custom Sources & Trust badges styles */
.sources-section {
  padding: 5rem 2rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  margin-top: 4rem;
}
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.source-card {
  padding: 1.5rem;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: var(--transition-smooth);
}
.source-card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-3px);
}
.source-card h5 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.source-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.trust-badge.official {
  background: rgba(45, 212, 191, 0.1);
  color: #2DD4BF;
  border: 1px solid rgba(45, 212, 191, 0.25);
}
.trust-badge.geospatial {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.trust-badge.open-data {
  background: rgba(56, 189, 248, 0.1);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.trust-badge.agency-data {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.trust-badge.estimate {
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.trust-badge.validation {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.trust-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px dashed var(--card-border);
}
.legal-box {
  background: rgba(22, 32, 51, 0.65);
  border-left: 4px solid var(--accent-purple);
  padding: 1.5rem;
  border-radius: 4px;
  margin-top: 1.5rem;
}
.legal-box h6 {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.legal-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}
.legal-disclaimers-container {
  max-width: 1200px;
  margin: 3rem auto 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .legal-disclaimers-container {
    grid-template-columns: 1fr;
  }
}

@keyframes substation-pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

