/* =========================
   BASE — Agronomía Inteligente SRL
   Blanco, moderno, responsive
========================= */
:root{
  --bg: #ffffff;
  --text: #0b0f19;
  --muted: rgba(11,15,25,.68);

  --card: #ffffff;

  --line: rgba(11,15,25,.10);
  --line2: rgba(11,15,25,.18);

  --shadow: 0 14px 40px rgba(2, 6, 23, .10);
  --t: 160ms ease;

  --radius: 16px;
  --max: 1180px;

  --nav-h: 56px;
  --nav-h-scrolled: 50px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* links */
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

/* helper */
.muted{ color: var(--muted); }
.i{
  display:inline-flex;
  width: 18px;
  height: 18px;
  align-items:center;
  justify-content:center;
}
.i svg{ width: 18px; height: 18px; fill: currentColor; }

/* =========================
   Buttons
========================= */
.btn{
  appearance:none;
  border: 1px solid var(--line2);
  background: #0b0f19;
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  cursor:pointer;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t);
  display:inline-flex;
  gap: 8px;
  align-items:center;
  justify-content:center;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(2,6,23,.12);
}
.btn:active{ transform: translateY(0); }
.btn:disabled{ opacity: .55; cursor:not-allowed; box-shadow:none; transform:none; }

.btn.ghost{
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}
.btn.ghost:hover{
  border-color: var(--line2);
  box-shadow: 0 10px 26px rgba(2,6,23,.08);
}

/* =========================
   Masthead
========================= */
.masthead{
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.logo{
  height: 36px;
  width: auto;
  object-fit: contain;
  border-radius: 0; /* 👈 no redondeamos (tu pedido histórico) */
}
.titles .title{
  font-weight: 950;
  letter-spacing: .2px;
}
.titles .subtitle{
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.mast-actions{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* conexión */
.conn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15,23,42,.02);
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display:inline-block;
  border: 1px solid var(--line2);
}
.dot.online{ background: rgba(34,197,94,.85); }
.dot.offline{ background: rgba(239,68,68,.85); }

/* =========================
   Topnav (5B compatible)
========================= */
.topnav{
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav .inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 18px;
}
.menu-shell{
  display:flex;
  align-items:center;
  gap: 10px;
}
.navlist{
  display:flex;
  align-items:center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}
.navlink{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: rgba(11,15,25,.85);
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.navlink:hover{
  background: rgba(15,23,42,.04);
  border-color: var(--line);
  transform: translateY(-1px);
}
.navlink[aria-current="page"]{
  background: rgba(15,23,42,.06);
  border-color: var(--line2);
  color: var(--text);
  font-weight: 800;
}

.more{ position: relative; }
.overflow{
  position:absolute;
  right:0;
  top: calc(100% + 8px);
  min-width: 220px;
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  display:none;
}
.overflow.open{ display:block; }
.overflow .navlink{
  width: 100%;
  justify-content:flex-start;
}

/* indicador (si nav-5b.js lo mueve) */
.active-indicator{ display:none; }

/* =========================
   Toast (si ui.js lo usa)
========================= */
.ai-toast{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 999;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.ai-toast .t{
  background:#0b0f19;
  color:#fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 650;
}

/* =========================
   Mobile tweaks
========================= */
@media (max-width: 560px){
  .masthead{ padding: 12px 14px 10px; }
  .topnav .inner{ padding: 8px 14px; }
}
