/*!
 * GEAGRO UI — Custom overrides (FIXED)
 */

/* ==========================================================
   1) Tokens (paleta + radios + sombras)
   ========================================================== */
:root{
  /*--geagro-purple-900:#3F2642;
  --geagro-purple-700:#6b3f6e;
  --geagro-purple-500:#906693;*/
  --geagro-purple-900:#1a1a1a;
  --geagro-purple-700:#2d2d2d;
  --geagro-purple-500:#274330;
 

  --geagro-text:#0f172a;
  --geagro-muted:#64748b;

  --geagro-danger:#cf4e4e;
  --geagro-success:#5a994c;
  --geagro-warning:#f0b429;

  --geagro-radius-lg:18px;
  --geagro-radius-xl:22px;

  --geagro-shadow-sm:0 10px 24px rgba(15,23,42,.06);
  --geagro-shadow-md:0 18px 50px rgba(15,23,42,.16);

  /* KPIs (compacto, como en el CSS antiguo) */
  --kpi-radius: 22px;
  --kpi-border: #eef0f2;
  --kpi-pad: 18px;

  --kpi-title: 18px;
  --kpi-icon: 24px;

  --kpi-main: clamp(26px, 2vw, 34px);
  --kpi-h4: clamp(18px, 1.6vw, 24px);
  --kpi-meta: 14px;

  --risk-low:#1f9d55;
  --risk-med:#f0b429;
  --risk-high:#e02424;
}

/* ==========================================================
   2) Bootstrap / Theme vars (Primary + Sidebar dark)
   ========================================================== */
:root,
/* [data-bs-theme="light"]{
  --bs-primary-rgb: 107, 63, 110;
} */
 [data-bs-theme="light"]{
  --bs-primary-rgb: 45, 45, 45;
}

:root,
[data-bs-theme="light"],
[data-bs-theme="dark"]{
  --bs-primary: var(--geagro-purple-700);
  --bs-primary-rgb: 45, 45, 45;

  --bs-info: #138037;
  --bs-info-rgb: 19, 128, 55;

  --bs-light: #E0E0E0;
  --bs-light-rgb: 224, 224, 224;
}

/* Igualamos especificidad del tema (sin !important) */
:root [data-sidebar="dark"],
[data-bs-theme="light"] [data-sidebar="dark"]{
  --bs-sidebar-dark-bg: var(--geagro-purple-900);

  --bs-sidebar-dark-menu-item-color: #d6c9d9;
  --bs-sidebar-dark-menu-sub-item-color: #d6c9d9;
  --bs-sidebar-dark-menu-item-icon-color: #d6c9d9;
  --bs-sidebar-dark-menu-item-hover-color: #ffffff;
  --bs-sidebar-dark-menu-item-active-color: #ffffff;

  /* hover/active suaves (del CSS nuevo) */
  --bs-sidebar-dark-menu-item-hover-bg: rgba(255,255,255,.08);
  --bs-sidebar-dark-menu-item-active-bg: #2c181a1a1a30;

  --bs-sidebar-dark-menu-sub-item-hover-color: #ffffff;
  --bs-sidebar-dark-menu-sub-item-active-color: #ffffff;
  --bs-sidebar-dark-menu-sub-item-hover-bg: rgba(255,255,255,.08);
  --bs-sidebar-dark-menu-sub-item-active-bg: rgba(255,255,255,.10);
}

/* por si el atributo está en body */
body[data-sidebar="dark"]{
  --bs-sidebar-dark-bg: var(--geagro-purple-900);
  --bs-sidebar-dark-menu-item-color: #d6c9d9;
  --bs-sidebar-dark-menu-sub-item-color: #d6c9d9;
  --bs-sidebar-dark-menu-item-icon-color: #d6c9d9;
  --bs-sidebar-dark-menu-item-hover-color: #ffffff;
  --bs-sidebar-dark-menu-item-active-color: #ffffff;
  --bs-sidebar-dark-menu-item-active-bg: #1a1a1a;
}


/* ==========================================================
   Sidebar hover / active GEAGRO
   ========================================================== */

.vertical-menu #sidebar-menu ul li a{
  transition:
    background-color .18s ease,
    color .18s ease,
    transform .18s ease;
}

/* HOVER */
.vertical-menu #sidebar-menu ul li a:hover{
  background: rgba(255,255,255,.08);
  color: #ffffff !important;
}

/* ACTIVE */
.vertical-menu #sidebar-menu ul li a.active,
.vertical-menu #sidebar-menu ul li.mm-active > a{
  background: #1a1a1a;
  color: #ffffff !important;
}

/* TEXTOS */
.vertical-menu #sidebar-menu ul li a:hover span,
.vertical-menu #sidebar-menu ul li a.active span,
.vertical-menu #sidebar-menu ul li.mm-active > a span{
  color: #ffffff !important;
}

/* ICONOS */
.vertical-menu #sidebar-menu ul li a:hover .menu-icon-img,
.vertical-menu #sidebar-menu ul li a.active .menu-icon-img,
.vertical-menu #sidebar-menu ul li.mm-active > a .menu-icon-img{
  opacity: 1;
}

/* MICRO INTERACCIÓN */
.vertical-menu #sidebar-menu ul li a:hover{
  transform: translateX(2px);
}

/* ==========================================================
   3) Iconos
   ========================================================== */
.menu-icon-img{
  width: 25px;
  height: 25px;
  margin-right: 10px;
  vertical-align: middle;
  opacity: .9;
}

.dashboard-icon-img{
  width: 32px;
  height: 32px;
  margin-right: 10px;
  vertical-align: middle;
  opacity: .95;
}

/* ==========================================================
   4) Topbar filter (Airbnb-like)
   ========================================================== */
.geagro-filterbar{ padding-top: 10px; }

.geagro-filterbar-btn{
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 520px;
  max-width: 640px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.geagro-filterbar-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(45,45,45,.20);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
}

.geagro-filterbar-btn .seg{
  display:flex;
  flex-direction: column;
  line-height: 1.1;
}
.geagro-filterbar-btn .lbl{
  font-size: 11px;
  color:#6b7280;
  font-weight: 700;
  letter-spacing: .02em;
}
.geagro-filterbar-btn .val{
  font-size: 13px;
  color:#0f172a;
  font-weight: 700;
}
.geagro-filterbar-btn .sep{
  width: 1px;
  height: 28px;
  background: rgba(15,23,42,.10);
}
.geagro-filterbar-icon{
  margin-left: 4px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(45,45,45,.12);
  display:flex;
  align-items:center;
  justify-content:center;
}
.geagro-filterbar-icon i{
  font-size: 18px;
  color: var(--bs-primary);
}

/* Dropdown */
.geagro-filterbar-menu{
  width: 420px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: var(--geagro-shadow-md);
}
.geagro-filterbar-menu .form-label{
  font-weight: 700;
  color:#0f172a;
}
.geagro-filterbar-menu .form-text{
  font-size: 12px;
}
/* topbar dropdown spacing */
#page-topbar .dropdown-menu{ margin-top: 10px; }

/* ==========================================================
   5) Dashboard KPIs (layout compacto del CSS antiguo)
   ========================================================== */
.geagro-kpi .card{
  border-radius: var(--kpi-radius);
  border: 1px solid var(--kpi-border);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15,23,42,.08);
}

.geagro-kpi .card-body{
  display:flex;
  flex-direction:column;
  height:100%;
  padding: var(--kpi-pad);
}

/* Alto consistente SOLO en desktop */
@media (min-width: 1200px){
  .geagro-kpi .card{ height: 310px; }
}

/* Header */
.geagro-kpi .geagro-card-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.geagro-kpi .card-title{
  font-size: var(--kpi-title);
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0;
}

@media (min-width: 1200px){
  .geagro-kpi .card-title{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.geagro-kpi .geagro-card-icon{
  font-size: var(--kpi-icon);
  line-height: 1;
  opacity: .9;
}

/* Main values */
.geagro-kpi .geagro-kpi-value{
  font-size: var(--kpi-main);
  font-weight: 700;
  line-height: 1.05;
  margin: 4px 0 10px;
}
.geagro-kpi .geagro-kpi-h4{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  margin: 4px 0 10px;
}

/* Meta */
.geagro-kpi .geagro-kpi-meta{
  font-size: var(--kpi-meta);
  line-height: 1.45;
  color:#5b6472;
  margin: 0;
}

/* Content block */
.geagro-kpi .geagro-kpi-content{
  margin-top: 2px;
  min-height: 72px;
}

.geagro-kpi .geagro-kpi-clamp{
  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

/* Footer */
.geagro-kpi .geagro-card-footer{
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
}

/* Card variants */
.geagro-card-status,
.geagro-card-action{ background:#fff; }

/* Card 1 destaque suave */
.geagro-card-primary{
  box-shadow: 0 16px 40px rgba(15,23,42,.10);
  border: 1px solid rgba(45,45,45,.18);
}

/* ==========================================================
   6) Riesgo sanitario (semáforo)
   ========================================================== */
.geagro-card-risk{
  background:#fff;
  border:1px solid var(--kpi-border);
  position:relative;
}
.geagro-card-risk::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:6px;
  border-radius:22px 0 0 22px;
  background:#e5e7eb;
}
.risk-value{
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  margin: 6px 0 10px;
}
.risk-badge{
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  background: rgba(15,23,42,.06);
  color:#111827;
}
.geagro-card-risk.risk-low::before{ background: var(--risk-low); }
.geagro-card-risk.risk-low .risk-value{ color: var(--risk-low); }
.geagro-card-risk.risk-low .risk-badge{ background: rgba(31,157,85,.12); color: var(--risk-low); }

.geagro-card-risk.risk-med::before{ background: var(--risk-med); }
.geagro-card-risk.risk-med .risk-value{ color: var(--risk-med); }
.geagro-card-risk.risk-med .risk-badge{ background: rgba(240,180,41,.18); color:#7a4f01; }

.geagro-card-risk.risk-high::before{ background: var(--risk-high); }
.geagro-card-risk.risk-high .risk-value{ color: var(--risk-high); }
.geagro-card-risk.risk-high .risk-badge{ background: rgba(224,36,36,.14); color: var(--risk-high); }

.badge{
    --bs-badge-font-size: 12px;
    font-weight: 600;
}

/* ==========================================================
   7) Clima agronómico (volver al layout "Viejo")
   - evita que se "infle" con chips enormes
   ========================================================== */
.geagro-card-weatherVisual{
  border-color: var(--kpi-border);
  background: linear-gradient(180deg, #f3f8ff 0%, #fbfdff 100%);
}

.geagro-weather-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.geagro-weather-sub{
  font-size: 14px;
  color:#6b7280;
  margin-top: 2px;
}

.geagro-weather-icon{
  width: 48px;
  height: 48px;
  object-fit: contain;
  align-self: flex-start;
  margin-top: 2px;
}

.geagro-weather-temp{
  font-size: var(--kpi-main);
  font-weight: 700;
  line-height: 1.05;
  margin: 4px 0 10px;
  color:#111827;
}

.geagro-weather-minmax{
  font-size: 14px;
  color:#4b5563;
  margin: 0;
}
.geagro-weather-minmax .dot{ margin: 0 6px; opacity: .7; }

/* métricas compactas (sin “pills grandes”) */
.geagro-weather-metrics{
  display:flex;
  gap: 8px;
  margin-top: 10px;
  color:#374151;
  flex-wrap: wrap;
}
.geagro-weather-metrics .metric{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 14px;
}
.geagro-weather-metrics i{
  font-size: 18px;
  color:#19863d;
}

/* chips chicos (como en antiguo) */
.geagro-weather-chips{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.geagro-weather-chips .chip{
  background:#e5e7eb;
  color:#111827;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================
   8) Alert bar (violeta compacta + responsive)
   ========================================================== */
.geagro-alertbar{
  background: var(--geagro-purple-500);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

.geagro-alertbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.geagro-alertbar-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.geagro-alertbar-title{
  font-weight: 700;
  color:#fff;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.geagro-alertbar-count{
  background: rgba(255,255,255,.16);
  color:#fff;
  font-weight:900;
  border-radius:999px;
  padding: 3px 10px;
  font-size: 12px;
  white-space:nowrap;
}

.geagro-alertbar-list{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}

.geagro-alert-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.16);
  color:#fff;
  font-weight:700;
  font-size:12px;
}

.geagro-alert-pill i{ color:#fff; font-size: 14px; }

.geagro-alertbar-link{
  font-weight: 700;
  color:#fff;
  text-decoration:none;
  white-space:nowrap;
}
.geagro-alertbar-link:hover{ text-decoration: underline; }

/* MOBILE: pills scrolleables */
@media (max-width: 576px){
  .geagro-alertbar-inner{ gap: 10px; padding:10px 12px; }
  .geagro-alertbar-left{ width: 100%; justify-content: space-between; align-items:center; }
  .geagro-alertbar-list{
    width: 100%;
    order: 2;
    display:flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 2px;
  }
  .geagro-alert-pill{ flex: 0 0 auto; white-space: nowrap; padding:4px 8px; font-size:11px; }
}

/* ==========================================================
   9) Buttons (del CSS antiguo, bien “premium”)
   ========================================================== */
.btn-primary{
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color:#fff;

  border-radius: 32px;
  padding: 12px 24px;

  font-weight: 700;
  letter-spacing: .3px;

  transition: 
    background-color .2s ease,
    border-color .2s ease,
    transform .15s ease,
    box-shadow .2s ease;
}

.btn-primary:hover{
  background-color: #5a345d;
  border-color: #5a345d;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(45,45,45,.25);
}

.btn-primary:active{
  transform: translateY(0px);
  box-shadow: 0 4px 10px rgba(45,45,45,.25);
}

.btn-primary:focus,
.btn-primary:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(45,45,45,.25),
    0 6px 14px rgba(45,45,45,.20);
}

.btn-primary:disabled,
.btn-primary.disabled{
  background-color: rgba(45,45,45,.4);
  border-color: rgba(45,45,45,.4);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* CTA secundarios en footer de cards */
.geagro-kpi .geagro-card-footer a{
  font-size: 14px;
  font-weight: 700;
  color: var(--bs-primary);
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 12px;
  border-radius: 32px;
  border: 1px solid rgba(45,45,45,.28);

  transition: 
    background-color .2s ease,
    transform .15s ease,
    border-color .2s ease;
}

.geagro-kpi .geagro-card-footer a:hover{
  background: rgba(45,45,45,.08);
  border-color: rgba(45,45,45,.40);
  transform: translateY(-1px);
}

.geagro-kpi .geagro-card-footer a:focus,
.geagro-kpi .geagro-card-footer a:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(45,45,45,.18);
}

/* ==========================================================
   10) Responsive microajustes
   ========================================================== */
@media (max-width:576px){
  .geagro-card-action{
    box-shadow: 0 14px 32px rgba(15,23,42,.12);
  }
  .geagro-card-action .geagro-kpi-h4{
    font-size: 20px;
  }
}

/* ==========================================================
   11) Family Font
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;600;700&display=swap');

html,
body,
body :not(.fa):not(.fas):not(.far):not(.fab) {
    font-family: 'Titillium Web', sans-serif;
}

/* ==========================================================
   12) TOP BAR — filtro compacto productor
   ========================================================== */

#page-topbar .geagro-filterbar {
  padding-top: 0;
  display: flex;
  align-items: center;
  margin-top: 8px;
}

#page-topbar .geagro-filterbar-btn {
  height: 54px;
  min-width: 500px;
  max-width: 620px;
  padding: 6px 8px 6px 22px;
  gap: 18px;
  border-radius: 999px;
  border: 1px solid rgba(45,45,45,.20);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  overflow: visible;
}

#page-topbar .geagro-filterbar-btn .seg {
  padding: 0;
  min-width: 130px;
}

#page-topbar .geagro-filterbar-btn .seg:nth-child(3) {
  min-width: 160px;
}

#page-topbar .geagro-filterbar-btn .lbl {
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 4px;
}

#page-topbar .geagro-filterbar-btn .sep {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
}

#page-topbar .geagro-topbar-select {
  border: 0;
  background: transparent;
  padding: 0;
  height: 20px;
  line-height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  outline: none;
  cursor: pointer;
  max-width: 170px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

#page-topbar .geagro-filterbar-btn {
  height: 54px;
  min-width: 500px;
  max-width: 620px;
  padding: 6px 8px 6px 22px;

  display: flex;
  align-items: center;

  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  overflow: visible;
}

#page-topbar .geagro-filterbar-btn .seg {
  flex: 1 1 0;
}

#page-topbar .geagro-filterbar-icon {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

#page-topbar .geagro-filterbar-icon:focus,
#page-topbar .geagro-filterbar-icon:active,
#page-topbar .geagro-filterbar-icon:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Notificaciones */
#page-header-notifications-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#page-header-notifications-dropdown i {
  display: inline-block !important;
  color: #5b6472;
  font-size: 22px;
  line-height: 1;
}

#page-header-notifications-dropdown .badge {
  position: absolute;
  top: 8px;
  right: 6px;
}

/* Avatar usuario sin foto */
.geagro-user-btn {
  padding-left: 10px;
  padding-right: 10px;
}

.geagro-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #f1e8f2;
  color: var(--bs-primary);
  border: 1px solid rgba(45,45,45,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(45,45,45,.12);
}

.geagro-user-avatar i {
  font-size: 26px;
  line-height: 1;
}

/* Ocultar selector idioma si queda en otro template */
.language-switch,
.language-dropdown,
.header-language {
  display: none !important;
}

/* ==========================================================
   13) Dashboard — Resumen productivo / barras de avance
   ========================================================== */

.geagro-progress-summary {
  border-top: 1px solid #eef0f2;
  padding-top: 16px;
}

.geagro-progress-summary .progress-row span {
  font-size: 14px;
  color: #374151;
  font-weight: 600;
}

.geagro-progress-summary .progress-row strong {
  color: #19863d;
  font-size: 14px;
}

.geagro-progress-summary .progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #edf0f3;
  overflow: hidden;
}

.geagro-progress-summary .progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #19863d;
}

/* ==========================================================
   14) Dashboard — Card Insumos faltantes
   ========================================================== */

.geagro-card-inputs {
  border-left: 4px solid #dc3545;
}

/* ==========================================================
   15) Dashboard — Próximas actividades
   Destacado: orden del día (HOY)
   ========================================================== */

.activity-feed .date.is-today {
  color: #ffffff;
  font-weight: 600;
  background-color: var(--bs-info);
  border-radius: 32px;
}

.activity-feed .date.is-today + .activity-text {
  font-weight: 600;
  font-size: 16px !important;
}

.activity-feed .date.is-today::before {
  content: "● ";
  color: #19863d;
}

/* Segunda fila: cards iguales y CTA siempre abajo */
.geagro-dashboard > .row .card {
  height: 100%;
}

.geagro-dashboard > .row .card-body {
  display: flex;
  flex-direction: column;
}

.geagro-dashboard > .row .card-body > .text-center.mt-3,
.geagro-dashboard > .row .card-body > .text-center.mt-4 {
  margin-top: auto !important;
  padding-top: 24px;
}

.activity-feed .feed-item.is-current .feed-item-list {
  background: rgba(107, 63, 110, .08);
  border: 1px solid rgba(107, 63, 110, .22);
  border-radius: 14px;
  padding: 14px 16px;
}

.activity-feed .feed-item.is-current .date {
  color: var(--bs-primary);
  font-weight: 800;
}

.activity-feed .feed-item.is-current .activity-text {
  font-weight: 600;
  font-size: 16px !important;
}

.geagro-card-risk.risk-low .geagro-card-icon { color: var(--risk-low); }
.geagro-card-risk.risk-med .geagro-card-icon { color: var(--risk-med); }
.geagro-card-risk.risk-high .geagro-card-icon { color: var(--risk-high); }

.geagro-dashboard-title {
  margin-bottom: 28px;
}

.geagro-dashboard-title h1 {
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: #1f2433;
  margin: 0 0 18px;
}

.geagro-dashboard-context {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: clamp(12px, 2vw, 18px);
  line-height: 1.2;
  font-weight: 600;
  color: #1f2433;
}

.geagro-dashboard-context i {
  font-size: .9em;
  color: #5b6472;
}

.geagro-dashboard-context span {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 576px) {
  .geagro-dashboard-title {
    margin-bottom: 20px;
  }

  .geagro-dashboard-title h1 {
    font-size: 34px;
    letter-spacing: -.6px;
    margin-bottom: 12px;
  }

  .geagro-dashboard-context {
    font-size: 16px;
    gap: 8px;
  }
}


/* ==========================================================
   16) Plan Tecnico
   ========================================================== */

.geagro-user-initials{
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: #d4b324;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

/* Plan técnico - resumen compacto */
.geagro-plan-summary{
  min-height: 76px;
  padding: 16px 22px;
  display: grid;
  grid-template-columns: 1.4fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.geagro-plan-summary-info{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.geagro-plan-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #1f2433;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.geagro-plan-pill span{
  color: #4b5563;
  font-weight: 600;
}

.geagro-plan-responsible{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.geagro-plan-responsible-name{
  font-weight: 700;
  color: #1f2433;
  line-height: 1.1;
}

.geagro-plan-muted{
  font-size: 12px;
  color: #6b7280;
  line-height: 1.2;
}

.geagro-plan-progress{
  justify-self: end;
  width: 230px;
  text-align: right;
}

.geagro-plan-progress-title{
  font-size: 12px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 5px;
}

.geagro-plan-progress .progress{
  height: 7px;
  border-radius: 999px;
  background: #eef0f2;
}

.geagro-plan-progress .progress-bar{
  border-radius: 999px;
}

@media (max-width: 992px){
  .geagro-plan-summary{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .geagro-plan-progress{
    justify-self: stretch;
    width: 100%;
    text-align: left;
  }
}

/* ==========================================================
   17) Calendario de órdenes
   ========================================================== */

.calendar-filter-panel .form-label{
  font-weight: 600;
  color: #1f2433;
}

.calendar-activity-list{
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.calendar-activity-list::-webkit-scrollbar{
  width: 6px;
}

.calendar-activity-list::-webkit-scrollbar-thumb{
  background: rgba(45,45,45,.35);
  border-radius: 999px;
}

.calendar-main-card{
  overflow: hidden;
}

#calendar .fc-button{
  border-radius: 999px !important;
  font-weight: 700;
}

@media (max-width: 767px){

  .calendar-main-card .card-body{
    padding: 12px;
  }

  #calendar{
    font-size: 11px;
  }

  #calendar .fc-toolbar{
    display: grid !important;
    grid-template-columns: 46px 1fr 46px;
    grid-template-areas:
      "prev title next"
      "views views views";
    align-items: center;
    gap: 12px 8px;
    margin-bottom: 18px;
  }

  #calendar .fc-left,
  #calendar .fc-center,
  #calendar .fc-right{
    display: contents !important;
  }

  #calendar .fc-left .btn-group{
    display: contents !important;
  }

  #calendar .fc-prev-button{
    grid-area: prev;
  }

  #calendar .fc-next-button{
    grid-area: next;
  }

  #calendar .fc-center h2{
    grid-area: title;
    margin: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    text-transform: capitalize;
    color: #1f2433;
  }

  #calendar .fc-today-button{
    display: none !important;
  }

  #calendar .fc-right .btn-group{
    grid-area: views;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
  }

  #calendar .fc-prev-button,
  #calendar .fc-next-button{
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px !important;
  }

  #calendar .fc-right .btn{
    min-width: 0;
    padding: 8px 6px;
    font-size: 11px;
    border-radius: 999px !important;
    background: rgba(45,45,45,.12) !important;
    border-color: transparent !important;
    color: #19863d !important;
    font-weight: 700;
  }

  #calendar .fc-right .btn.active{
    background: #19863d !important;
    color: #fff !important;
  }

  #calendar .fc-day-grid-event{
    font-size: 10px;
    padding: 2px 4px;
  }

  .calendar-activity-list-mobile{
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
  }
}

/* ==========================================================
   18) Alertas y avisos
   ========================================================== */

.geagro-alert-featured{
  border: 1px solid rgba(207,78,78,.18);
  box-shadow: 0 14px 34px rgba(15,23,42,.08);
}

.geagro-alert-label{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(207,78,78,.12);
  color: #cf4e4e;
  font-size: 12px;
  font-weight: 700;
}

.geagro-alert-featured-icon{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(207,78,78,.12);
  color: #cf4e4e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.geagro-alert-featured-icon i{
  font-size: 28px;
}

@media (max-width: 767px){
  .table-responsive table{
    font-size: 12px;
  }
}

/* Tabla responsive */
.geagro-responsive-table table tbody tr:nth-child(odd){
  background: #f1f1f1;
}

.geagro-responsive-table table tbody tr:nth-child(even){
  background: #ffffff;
}

.geagro-responsive-table table th{
  font-weight: 700;
  color: #1f2433;
  white-space: nowrap;
}

.geagro-responsive-table table td{
  vertical-align: top;
  color: #374151;
}

/* Mobile: cada fila pasa a card */
@media (max-width: 767px){

  .geagro-responsive-table{
    overflow-x: visible;
  }

  .geagro-responsive-table table,
  .geagro-responsive-table thead,
  .geagro-responsive-table tbody,
  .geagro-responsive-table th,
  .geagro-responsive-table td,
  .geagro-responsive-table tr{
    display: block;
    width: 100%;
  }

  .geagro-responsive-table thead{
    display: none;
  }

  .geagro-responsive-table tbody tr{
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 14px;
  }

  .geagro-responsive-table tbody tr:nth-child(odd){
    background: #f1f1f1;
  }

  .geagro-responsive-table tbody tr:nth-child(even){
    background: #ffffff;
    border: 1px solid #eef0f2;
  }

  .geagro-responsive-table td{
    border: 0 !important;
    padding: 8px 0 !important;
  }

  .geagro-responsive-table td::before{
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: #1f2433;
    margin-bottom: 3px;
  }
}

/* ==========================================================
   19) Weather
   ========================================================== */

.geagro-weather-main-icon{
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(63, 63, 63, 0.1);
    color: #3f3f3f;

    display:flex;
    align-items:center;
    justify-content:center;
}

.geagro-weather-main-icon i{
    font-size: 42px;
}

.geagro-weather-stat{
    background:#f8f9fb;
    border-radius:16px;
    padding:18px;
    height:100%;
}

.geagro-weather-stat-icon{
    color:#3f3f3f;
    font-size:24px;
    margin-bottom:10px;
}

.geagro-weather-stat-value{
    font-size:26px;
    font-weight:700;
    color:#1f2433;
    line-height:1;
}

.geagro-weather-stat-label{
    margin-top:8px;
    color:#6b7280;
    font-size:13px;
}

.geagro-weather-mini-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 0;
    border-bottom:1px solid #eef0f2;
}

.geagro-weather-mini-row:last-child{
    border-bottom:0;
}

/* ==========================================================
   20) Mis Viñedos
   ========================================================== */

.geagro-vineyard-hero{
  border: 1px solid rgba(45,45,45,.14);
  box-shadow: 0 16px 40px rgba(15,23,42,.08);
}

.geagro-vineyard-mini{
  background: #f8f9fb;
  border-radius: 16px;
  padding: 14px;
}

.geagro-vineyard-mini span{
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 4px;
}

.geagro-vineyard-mini strong{
  color: #1f2433;
  font-size: 18px;
}

.geagro-vineyard-actions{
  background: #f8f9fb;
  border-radius: 18px;
  padding: 18px;
}

.geagro-vineyard-lot-card{
  border: 1px solid #eef0f2;
  transition: transform .15s ease, box-shadow .15s ease;
}

.geagro-vineyard-lot-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}

@media (max-width: 767px){
  .geagro-vineyard-mini strong{
    font-size: 16px;
  }
}

.geagro-vineyard-actions .btn-outline-primary{
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.geagro-vineyard-actions .btn-outline-primary:hover{
  background: rgba(45,45,45,.08);
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.geagro-card-actions .btn-outline-secondary{
  background:#f4edf5;
  border-color:#d8c3dc;
  color:#19863d;
}

.geagro-card-actions .btn-outline-secondary:hover{
  background:#19863d;
  border-color:#19863d;
  color:#fff;
}