@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

/* =========================================================================
   HYDRO-OPS PRECISION & FAO-56 DESIGN SYSTEM
   Matches the AGP Precisión Platform Design (Grupo Quintal)
   ========================================================================= */
.hydro-ops-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0f172a;
}
/* Base Cards */
.hydro-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  transition: all 0.2s ease;
}
.hydro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
/* Badges */
.hydro-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hydro-pill-green {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.hydro-pill-blue {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.hydro-pill-red {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}
.hydro-pill-amber {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.hydro-pill-purple {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}
/* Action Toolbar */
.hydro-action-bar {
  background: #0f172a;
  border-radius: 18px;
  padding: 0.9rem 1.25rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.25);
}
.hydro-action-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
/* Operational Buttons */
.hydro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}
.hydro-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.hydro-btn:active {
  transform: translateY(0);
}
.hydro-btn-dron {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
}
.hydro-btn-dron:hover {
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}
.hydro-btn-siembra {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
}
.hydro-btn-siembra:hover {
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}
.hydro-btn-terrestre {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
}
.hydro-btn-terrestre:hover {
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}
.hydro-btn-calibracion {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff;
}
.hydro-btn-calibracion:hover {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.hydro-btn-outline {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}
.hydro-btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
/* Metric KPI Cards */
.hydro-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.hydro-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}
.hydro-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #cbd5e1;
}
.hydro-metric-card.green::before { background: #16a34a; }
.hydro-metric-card.blue::before { background: #0284c7; }
.hydro-metric-card.purple::before { background: #8b5cf6; }
.hydro-metric-card.amber::before { background: #f59e0b; }
.hydro-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hydro-metric-val {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}
.hydro-metric-sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}
/* Status Hero Banner */
.hydro-hero-banner {
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  border: 1.5px solid;
}
.hydro-hero-banner.green {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: #86efac;
  color: #14532d;
}
.hydro-hero-banner.red {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fca5a5;
  color: #881337;
}
.hydro-hero-banner.amber {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
  color: #78350f;
}
/* Forms & Selects */
.hydro-select {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}
.hydro-select:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
.hydro-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.875rem;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}
.hydro-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
/* Map Containers */
.hydro-map-container {
  width: 100%;
  height: 380px;
  min-height: 380px;
  border-radius: 18px;
  border: 1.5px solid #cbd5e1;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}
/* Modals */
.hydro-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.hydro-modal-box {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 1050px;
  overflow: hidden;
  margin: auto;
  animation: hydroFadeIn 0.2s ease-out;
}
@keyframes hydroFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.hydro-modal-header {
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}
.hydro-modal-header.dron {
  background: linear-gradient(135deg, #e11d48, #be123c);
}
.hydro-modal-header.siembra {
  background: linear-gradient(135deg, #16a34a, #15803d);
}
.hydro-modal-header.terrestre {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}
.hydro-modal-header.calibracion {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}
/* Daily Projection Timeline */
.hydro-timeline-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.hydro-timeline-day {
  min-width: 110px;
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.hydro-timeline-day:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}
.hydro-timeline-day.selected {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.hydro-timeline-day.optimo {
  border-bottom: 4px solid #16a34a;
}
.hydro-timeline-day.bloqueado {
  border-bottom: 4px solid #e11d48;
}
:root {
  /* Modern Blue & Agro Theme */
  --primary-blue: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --primary-bg: #eff6ff;
  --agro-green: #16a34a;
  --agro-light: #dcfce7;
  --bg-color: #f8fafc;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.6);
  --text-dark: #0f172a;
  --text-gray: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #f8fafc;
  color: var(--text-dark);
}
/* Fluid Media */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}
/* Glassmorphism & Cards */
.glass-panel, .premium-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  max-width: 100%;
}
/* Responsive Table Wrapper */
.table-responsive,
.table-container,
table {
  max-width: 100%;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}
/* Button Utilities */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.95rem;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -2px rgba(37, 99, 235, 0.3);
}
.btn-secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
/* Professional Table Action Icon Buttons */
.btn-icon-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: 6px;
  border: none !important;
  outline: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.btn-icon-premium svg {
  width: 14px;
  height: 14px;
}
.btn-icon-premium:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  filter: brightness(1.05);
}
.btn-icon-premium:active {
  transform: translateY(0) scale(0.96);
}
.btn-icon-table {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: 6px;
  border: none !important;
  outline: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-icon-table svg {
  width: 14px;
  height: 14px;
}
.btn-icon-table:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  filter: brightness(1.05);
}
.btn-icon-table:active {
  transform: translateY(0) scale(0.96);
}
/* Form Inputs */
.auth-input,
.auth-input-minimal,
select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  outline: none;
  transition: all 0.2s;
  font-size: 16px; /* Prevents auto-zoom on iOS */
  color: var(--text-dark);
}
.auth-input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
/* Reducción de 5 píxeles a todos los títulos de sección en formularios */
.form-section-title,
.form-title,
.section-title-form,
.form-header-title {
  font-size: calc(1.05rem - 5px) !important;
  letter-spacing: -0.01em;
}
/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes pageFadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes tooltipFadeInCenter {
  from {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
@keyframes tooltipFadeInEnd {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-transition-wrapper {
  animation: pageFadeSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}
/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
/* =========================================================
   RESPONSIVE MEDIA QUERIES (Mobile, Tablet, Desktop)
   ========================================================= */
.ai-step1-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
}
.ai-actions-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.smart-grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
/* Global Overflow Prevention */
html, body, #root {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: border-box;
}
/* Tablets and Mobile (< 1024px) */
@media (max-width: 1024px) {
  html, body {
    font-size: 17px !important;
  }

  .grid-cols-4,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ai-step1-grid {
    grid-template-columns: 1fr !important;
  }
}
/* Smartphones and Portrait Tablets (< 768px) - DEFAULT LARGE MOBILE APP SCALE */
@media (max-width: 768px) {
  html, body {
    font-size: 18px !important; /* Default Large Legible Mobile Scale */
    -webkit-text-size-adjust: 100%;
  }

  h1 { font-size: 1.95rem !important; font-weight: 950 !important; }
  h2 { font-size: 1.35rem !important; font-weight: 950 !important; }
  h3 { font-size: 1.15rem !important; font-weight: 900 !important; }
  h4 { font-size: 0.95rem !important; font-weight: 900 !important; }

  .ai-step1-grid {
    grid-template-columns: 1fr !important;
    gap: 1.35rem !important;
  }

  .ai-actions-row {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .btn-ai-large, .btn-voice-large {
    width: 100% !important;
    height: 64px !important;
    font-size: 1.2rem !important;
    font-weight: 950 !important;
    border-radius: 20px !important;
  }

  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2,
  .dashboard-grid,
  .smart-grid-horizontal,
  .smart-grid-responsive,
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .smart-lot-card-horizontal {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .modal-content,
  .animate-zoom-in,
  [style*="max-width: 850px"],
  [style*="max-width: 900px"],
  [style*="maxWidth: 850px"],
  [style*="maxWidth: 900px"],
  [style*="maxWidth: 880px"] {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 92vh !important;
    padding: 1.35rem !important;
    margin: auto !important;
  }

  .btn-primary, .btn-secondary, .btn-main {
    width: 100%;
    min-height: 54px !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    padding: 1rem 1.4rem !important;
    border-radius: 18px !important;
  }

  /* Form inputs large on mobile */
  .auth-input,
  .auth-input-minimal,
  select,
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  textarea {
    font-size: 17px !important;
    min-height: 52px !important;
    padding: 0.95rem 1.15rem !important;
    border-radius: 16px !important;
  }

  /* Flex containers stack vertically on mobile */
  .flex-responsive {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .toolbar-actions {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }

  /* Table auto-scroll & padding */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .glass-panel, .premium-card {
    border-radius: 24px;
    padding: 1.4rem 1.25rem !important;
  }

  /* Listado de Órdenes on mobile */
  .order-item-card,
  .order-group-header {
    font-size: 1.05rem !important;
    padding: 1.15rem 1.25rem !important;
  }

  .order-title-mobile {
    font-size: 1.25rem !important;
    font-weight: 950 !important;
  }

  .order-desc-mobile {
    font-size: 1.02rem !important;
    line-height: 1.55 !important;
  }

  .badge-mobile {
    font-size: 0.88rem !important;
    padding: 0.45rem 0.9rem !important;
    border-radius: 12px !important;
  }
}
/* Small smartphones (< 480px) */
@media (max-width: 480px) {
  html, body {
    font-size: 17.5px !important;
  }

  .glass-panel, .premium-card {
    border-radius: 22px;
    padding: 1.3rem 1.1rem !important;
  }
}
@media (max-width: 899px) {
  .hidden-mobile {
    display: none !important;
  }
}
@media (min-width: 900px) {
  .hidden-desktop {
    display: none !important;
  }
}
/* =========================================================
   TABLERO DE CARTERA & CUENTAS CORRIENTES - STYLES
   ========================================================= */
.tablero-cartera-root {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #94a3b8;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --primary: #15803d;
  --primary-hover: #166534;
  --primary-light: #dcfce7;
  --primary-text: #14532d;
  --info: #2563eb;
  --info-light: #dbeafe;
  --danger: #b3382c;
  --danger-light: #fee2e2;
  --warning: #d9792b;
  --warning-light: #ffedd5;
  --age-0-30: #2b8a63;
  --age-31-60: #8fb339;
  --age-61-90: #e0b020;
  --age-91-180: #d9792b;
  --age-180-plus: #b3382c;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-family: 'Figtree', system-ui, -apple-system, sans-serif !important;
  color: var(--text);
  padding-bottom: 2rem;
  width: 100%;
}
.tablero-cartera-root * {
  box-sizing: border-box;
}
.tablero-cartera-root .tablero-header-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
  padding: 0.85rem 1rem !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  margin-bottom: 1.25rem !important;
  box-shadow: var(--shadow-sm) !important;
}
.tablero-cartera-root .nav-tabs {
  display: flex !important;
  background: var(--bg-subtle) !important;
  padding: 4px !important;
  border-radius: var(--radius) !important;
  gap: 4px !important;
}
.tablero-cartera-root .nav-tab-btn {
  background: transparent !important;
  border: none !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  font-family: inherit !important;
}
.tablero-cartera-root .nav-tab-btn:hover {
  color: var(--text) !important;
}
.tablero-cartera-root .nav-tab-btn.active {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-sm) !important;
}
.tablero-cartera-root .controls-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.75rem !important;
}
.tablero-cartera-root .control-group {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  padding: 0.25rem 0.6rem !important;
  border-radius: var(--radius) !important;
}
.tablero-cartera-root .control-label {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
.tablero-cartera-root select.control-select {
  background: transparent !important;
  border: none !important;
  font-family: inherit !important;
  font-size: 0.84rem !important;
  color: var(--text) !important;
  font-weight: 500 !important;
  outline: none !important;
  cursor: pointer !important;
  padding-right: 0.25rem !important;
}
.tablero-cartera-root .segmented-control {
  display: flex !important;
  background: var(--bg-subtle) !important;
  border-radius: var(--radius-sm) !important;
  padding: 2px !important;
}
.tablero-cartera-root .seg-btn {
  background: transparent !important;
  border: none !important;
  padding: 0.25rem 0.65rem !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: all 0.15s ease !important;
}
.tablero-cartera-root .seg-btn.active {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-sm) !important;
}
.tablero-cartera-root .btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 0.45rem 0.85rem !important;
  border-radius: var(--radius) !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.tablero-cartera-root .btn:hover {
  background: var(--bg-subtle) !important;
  border-color: var(--border-focus) !important;
}
.tablero-cartera-root .card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1.15rem !important;
  position: relative !important;
  box-shadow: var(--shadow-sm) !important;
}
.tablero-cartera-root .card-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.tablero-cartera-root .card-subtitle {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 1rem !important;
}
.tablero-cartera-root .kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 0.85rem !important;
  margin-bottom: 1.25rem !important;
}
.tablero-cartera-root .kpi-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: transform 0.15s ease, border-color 0.15s ease !important;
  box-shadow: var(--shadow-sm) !important;
}
.tablero-cartera-root .kpi-card:hover {
  border-color: var(--border-focus) !important;
}
.tablero-cartera-root .kpi-label {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--text-muted) !important;
  margin-bottom: 0.35rem !important;
}
.tablero-cartera-root .kpi-value {
  font-size: 1.55rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 0.35rem !important;
}
.tablero-cartera-root .kpi-desc {
  font-size: 0.72rem !important;
  color: var(--text-subtle) !important;
}
.tablero-cartera-root .kpi-neto { border-left: 4px solid var(--primary) !important; }
.tablero-cartera-root .kpi-deuda { border-left: 4px solid var(--warning) !important; }
.tablero-cartera-root .kpi-credito { border-left: 4px solid var(--info) !important; }
.tablero-cartera-root .kpi-alerta { border-left: 4px solid var(--danger) !important; }
.tablero-cartera-root .kpi-neutral { border-left: 4px solid #64748b !important; }
.tablero-cartera-root .kpi-usd { border-left: 4px solid #0284c7 !important; }
.tablero-cartera-root .color-deuda { color: var(--warning) !important; }
.tablero-cartera-root .color-credito { color: var(--info) !important; }
.tablero-cartera-root .color-alerta { color: var(--danger) !important; }
.tablero-cartera-root .color-success { color: var(--primary) !important; }
.tablero-cartera-root .grid-2col {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1.25rem !important;
  margin-bottom: 1.25rem !important;
}
@media (max-width: 1024px) {
  .tablero-cartera-root .grid-2col {
    grid-template-columns: 1fr !important;
  }
}
.tablero-cartera-root .aging-container {
  display: flex !important;
  align-items: flex-end !important;
  height: 190px !important;
  gap: 1rem !important;
  padding-top: 1.5rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid var(--border) !important;
}
.tablero-cartera-root .aging-col {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  height: 100% !important;
  justify-content: flex-end !important;
  position: relative !important;
}
.tablero-cartera-root .aging-bar {
  width: 100% !important;
  max-width: 54px !important;
  border-radius: 4px 4px 0 0 !important;
  transition: height 0.4s ease !important;
  min-height: 4px !important;
}
.tablero-cartera-root .aging-bar:hover {
  filter: brightness(1.1) !important;
}
.tablero-cartera-root .aging-bar-val {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  margin-bottom: 4px !important;
  white-space: nowrap !important;
}
.tablero-cartera-root .aging-label {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  margin-top: 0.5rem !important;
  text-align: center !important;
}
.tablero-cartera-root .aging-pct {
  font-size: 0.7rem !important;
  color: var(--text-subtle) !important;
}
.tablero-cartera-root .bar-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.65rem !important;
}
.tablero-cartera-root .bar-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
  cursor: pointer !important;
  padding: 0.2rem 0.35rem !important;
  border-radius: var(--radius-sm) !important;
  transition: background 0.15s ease !important;
}
.tablero-cartera-root .bar-item:hover {
  background: var(--bg-subtle) !important;
}
.tablero-cartera-root .bar-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.8125rem !important;
}
.tablero-cartera-root .bar-title {
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.tablero-cartera-root .bar-amount {
  font-weight: 700 !important;
  white-space: nowrap !important;
}
.tablero-cartera-root .bar-track {
  height: 7px !important;
  background: var(--bg-subtle) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  width: 100% !important;
}
.tablero-cartera-root .bar-fill {
  height: 100% !important;
  background: var(--primary) !important;
  border-radius: 4px !important;
  transition: width 0.4s ease !important;
}
.tablero-cartera-root .bar-fill-pareto {
  background: linear-gradient(90deg, #15803d, #85e0a3) !important;
}
.tablero-cartera-root .bar-subinfo {
  font-size: 0.6875rem !important;
  color: var(--text-muted) !important;
  display: flex !important;
  justify-content: space-between !important;
}
.tablero-cartera-root .table-responsive {
  width: 100% !important;
  overflow-x: auto !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
}
.tablero-cartera-root table.data-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.8125rem !important;
  text-align: left !important;
}
.tablero-cartera-root table.data-table th {
  background: var(--bg-subtle) !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 0.65rem 0.85rem !important;
  border-bottom: 1px solid var(--border) !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  user-select: none !important;
}
.tablero-cartera-root table.data-table th:hover {
  color: var(--text) !important;
}
.tablero-cartera-root table.data-table th.th-right, 
.tablero-cartera-root table.data-table td.td-right {
  text-align: right !important;
}
.tablero-cartera-root table.data-table th.th-center, 
.tablero-cartera-root table.data-table td.td-center {
  text-align: center !important;
}
.tablero-cartera-root table.data-table td {
  padding: 0.6rem 0.85rem !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
  white-space: nowrap !important;
}
.tablero-cartera-root table.data-table tbody tr {
  transition: background 0.1s ease !important;
}
.tablero-cartera-root table.data-table tbody tr:hover {
  background: var(--bg-subtle) !important;
  cursor: pointer !important;
}
.tablero-cartera-root table.data-table tfoot td {
  font-weight: 700 !important;
  background: var(--bg-subtle) !important;
  border-top: 2px solid var(--border) !important;
  padding: 0.75rem 0.85rem !important;
}
.tablero-cartera-root .badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.15rem 0.45rem !important;
  border-radius: 4px !important;
  font-size: 0.6875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}
.tablero-cartera-root .badge-code {
  background: var(--bg-subtle) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
  font-family: monospace !important;
  font-size: 0.7rem !important;
}
.tablero-cartera-root .badge-tipo {
  background: var(--bg-subtle) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  font-weight: 700 !important;
}
.tablero-cartera-root .badge-tipo.FA { background: #fee2e2 !important; color: #991b1b !important; border-color: #fecaca !important; }
.tablero-cartera-root .badge-tipo.ND { background: #ffedd5 !important; color: #9a3412 !important; border-color: #fed7aa !important; }
.tablero-cartera-root .badge-tipo.RC { background: #dbeafe !important; color: #1e40af !important; border-color: #bfdbfe !important; }
.tablero-cartera-root .badge-tipo.NC { background: #ede9fe !important; color: #5b21b6 !important; border-color: #ddd6fe !important; }
.tablero-cartera-root .badge-tipo.NV { background: #fef3c7 !important; color: #92400e !important; border-color: #fde68a !important; }
.tablero-cartera-root .badge-age-0-30 { background: #dcfce7 !important; color: #166534 !important; }
.tablero-cartera-root .badge-age-31-60 { background: #ecfccb !important; color: #3f6212 !important; }
.tablero-cartera-root .badge-age-61-90 { background: #fef9c3 !important; color: #854d0e !important; }
.tablero-cartera-root .badge-age-91-180 { background: #ffedd5 !important; color: #9a3412 !important; }
.tablero-cartera-root .badge-age-180-plus { background: #fee2e2 !important; color: #991b1b !important; }
.tablero-cartera-root .client-header-box {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1.25rem !important;
  margin-bottom: 1.25rem !important;
  box-shadow: var(--shadow-sm) !important;
}
.tablero-cartera-root .client-select-row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
  margin-bottom: 1.25rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid var(--border) !important;
}
.tablero-cartera-root .client-selector-container {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex: 1 !important;
  max-width: 500px !important;
}
.tablero-cartera-root .client-select {
  width: 100% !important;
  padding: 0.5rem 0.75rem !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  outline: none !important;
  cursor: pointer !important;
}
.tablero-cartera-root .client-select:focus {
  border-color: var(--primary) !important;
}
.tablero-cartera-root .client-meta-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 1rem !important;
}
.tablero-cartera-root .meta-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.15rem !important;
}
.tablero-cartera-root .meta-title {
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--text-muted) !important;
}
.tablero-cartera-root .meta-val {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  word-break: break-word !important;
}
.tablero-cartera-root .chart-container {
  position: relative !important;
  width: 100% !important;
  height: 250px !important;
  margin: 1rem 0 !important;
}
.tablero-cartera-root svg.balance-chart {
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
}
.tablero-cartera-root .chart-tooltip {
  position: absolute !important;
  background: rgba(15, 23, 42, 0.95) !important;
  color: #ffffff !important;
  padding: 0.4rem 0.65rem !important;
  border-radius: var(--radius-sm) !important;
  font-size: 0.75rem !important;
  pointer-events: none !important;
  z-index: 100 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
  transform: translate(-50%, -110%) !important;
  white-space: nowrap !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.tablero-cartera-root .table-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin-bottom: 0.85rem !important;
}
.tablero-cartera-root .search-box {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: var(--radius) !important;
  width: 280px !important;
}
.tablero-cartera-root .search-input {
  background: transparent !important;
  border: none !important;
  font-family: inherit !important;
  font-size: 0.8125rem !important;
  color: var(--text) !important;
  outline: none !important;
  width: 100% !important;
}
.tablero-cartera-root footer {
  margin-top: 2rem !important;
  padding-top: 1.25rem !important;
  border-top: 1px solid var(--border) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
}
.tablero-cartera-root .footer-note {
  max-width: 800px !important;
  line-height: 1.4 !important;
}
.tablero-cartera-root .font-mono { font-family: monospace !important; }
/* ==========================================================================
   Leaflet Unified Compact Zoom Controls & Fullscreen Button Standards
   ========================================================================== */
.leaflet-bottom.leaflet-right {
  margin-right: 12px !important;
  margin-bottom: 12px !important;
  z-index: 450 !important;
}
.leaflet-control-zoom {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
  margin: 0 !important;
}
.leaflet-control-zoom a {
  background-color: rgba(255, 255, 255, 0.96) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 26px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}
.leaflet-control-zoom a:hover {
  background-color: #f1f5f9 !important;
  color: #2563eb !important;
}
.leaflet-control-zoom-in {
  border-bottom: 1px solid #e2e8f0 !important;
}
/* Leaflet Layers Selector (Estándar para todos los mapas del proyecto) */
.leaflet-control-layers {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(8px) !important;
  font-family: inherit !important;
  transition: all 0.2s ease !important;
}
.leaflet-control-layers-toggle {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background-size: 18px 18px !important;
}
.leaflet-control-layers-expanded {
  padding: 10px 14px !important;
  border-radius: 12px !important;
  color: #1e293b !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;
}
.leaflet-control-layers-expanded label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
  cursor: pointer !important;
  user-select: none !important;
}
.leaflet-control-layers-expanded label:last-child {
  margin-bottom: 0 !important;
}
.leaflet-control-layers-expanded input[type="radio"] {
  accent-color: #2563eb !important;
  cursor: pointer !important;
  transform: scale(1.1) !important;
}
/* ==========================================================================
   WebGIS Map-First & Prescription Forms Stylesheet (AGP Precisión)
   Self-contained glassmorphism, dark surfaces, and layout utilities
   ========================================================================== */

.webgis-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 76px);
  min-height: 680px;
  border-radius: 18px;
  overflow: hidden;
  background-color: #020617;
  color: #f1f5f9;
  user-select: none;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.webgis-viewport.is-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  z-index: 9999;
}

.webgis-map-canvas {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Glassmorphic Floating Panels */
.webgis-glass-panel {
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: #f1f5f9;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.65);
}

.webgis-subcard {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.webgis-input,
.webgis-select,
.webgis-textarea {
  width: 100%;
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  padding: 0.42rem 0.65rem;
  color: #ffffff;
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.webgis-input:focus,
.webgis-select:focus,
.webgis-textarea:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.webgis-range {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #1e293b;
  cursor: pointer;
  accent-color: #10b981;
}

.webgis-range-cyan {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #1e293b;
  cursor: pointer;
  accent-color: #06b6d4;
}

.webgis-btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 0.9rem;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(6, 182, 212, 0.4);
  transition: all 0.2s ease;
}

.webgis-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.webgis-zone-label {
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 2px 7px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* Custom Scrollbar inside floating controls */
.webgis-scroll::-webkit-scrollbar {
  width: 5px;
}
.webgis-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.webgis-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

@media (max-width: 1024px) {
  .webgis-viewport {
    height: calc(100vh - 135px);
  }
}
/* =========================================================================
   HYDRO-OPS PRECISION & FAO-56 DESIGN SYSTEM
   Matches the AGP Precisión Platform Design (Grupo Quintal)
   ========================================================================= */

.hydro-ops-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0f172a;
}

/* Base Cards */
.hydro-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.hydro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Badges */
.hydro-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hydro-pill-green {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.hydro-pill-blue {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.hydro-pill-red {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.hydro-pill-amber {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.hydro-pill-purple {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

/* Action Toolbar */
.hydro-action-bar {
  background: #0f172a;
  border-radius: 18px;
  padding: 0.9rem 1.25rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.25);
}

.hydro-action-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Operational Buttons */
.hydro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.hydro-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.hydro-btn:active {
  transform: translateY(0);
}

.hydro-btn-dron {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
}
.hydro-btn-dron:hover {
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.hydro-btn-siembra {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
}
.hydro-btn-siembra:hover {
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.hydro-btn-terrestre {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
}
.hydro-btn-terrestre:hover {
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.hydro-btn-calibracion {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff;
}
.hydro-btn-calibracion:hover {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.hydro-btn-outline {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}
.hydro-btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Metric KPI Cards */
.hydro-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.hydro-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.hydro-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #cbd5e1;
}

.hydro-metric-card.green::before { background: #16a34a; }
.hydro-metric-card.blue::before { background: #0284c7; }
.hydro-metric-card.purple::before { background: #8b5cf6; }
.hydro-metric-card.amber::before { background: #f59e0b; }

.hydro-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hydro-metric-val {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.hydro-metric-sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}

/* Status Hero Banner */
.hydro-hero-banner {
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  border: 1.5px solid;
}

.hydro-hero-banner.green {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: #86efac;
  color: #14532d;
}

.hydro-hero-banner.red {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fca5a5;
  color: #881337;
}

.hydro-hero-banner.amber {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
  color: #78350f;
}

/* Forms & Selects */
.hydro-select {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.hydro-select:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.hydro-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.875rem;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.hydro-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Map Containers */
.hydro-map-container {
  width: 100%;
  height: 380px;
  min-height: 380px;
  border-radius: 18px;
  border: 1.5px solid #cbd5e1;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

/* Modals */
.hydro-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.hydro-modal-box {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 1050px;
  overflow: hidden;
  margin: auto;
  animation: hydroFadeIn 0.2s ease-out;
}

@keyframes hydroFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.hydro-modal-header {
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.hydro-modal-header.dron {
  background: linear-gradient(135deg, #e11d48, #be123c);
}

.hydro-modal-header.siembra {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.hydro-modal-header.terrestre {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.hydro-modal-header.calibracion {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

/* Daily Projection Timeline */
.hydro-timeline-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.hydro-timeline-day {
  min-width: 110px;
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.hydro-timeline-day:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.hydro-timeline-day.selected {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.hydro-timeline-day.optimo {
  border-bottom: 4px solid #16a34a;
}

.hydro-timeline-day.bloqueado {
  border-bottom: 4px solid #e11d48;
}
