/* Parcela 360° · capa visual profesional (v0.5)
   Sistema de íconos de línea uniforme (24 px, trazo 1,75), encabezado con marca, barra de navegación con indicador,
   herramientas del mapa agrupadas, tarjetas con elevación suave e íconos en indicadores. Se carga después de app.css. */
:root { --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08); --sombra2: 0 4px 14px rgba(16, 24, 40, .14); --azul-s: #eaf0fb; --verde-s: #e6f5f0; --rojo-s: #fdeeec; --turq-s: #e3f6f4; --top: 60px; }

/* ----- íconos: siempre de línea, sin relleno (corrige íconos «rellenos» y la bandera pintada encima) */
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; flex: none; }
.top svg.py, .top svg.py * { stroke: none; }
.top svg.py .borde { stroke: rgba(0, 0, 0, .18); stroke-width: .35; }
.mi { display: inline-block; width: 20px; height: 20px; background: currentColor; flex: none;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }

/* ----- encabezado */
.top { gap: 12px; padding-left: 14px; padding-right: 14px; box-shadow: 0 1px 0 var(--line), 0 2px 8px rgba(16, 24, 40, .04); border-bottom: 0; }
.top .logo { height: 38px; }
.top .sep { width: 1px; align-self: stretch; margin: 12px 0; background: var(--line); }
.brand b { display: flex; align-items: center; gap: 6px; font-size: 21px; line-height: 1; }
.brand .py { width: 20px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .15); }
.brand span { margin-top: 3px; font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); color: var(--azul2); background: #fff; padding: 6px 14px 6px 8px; box-shadow: var(--sombra); transition: border-color .15s, box-shadow .15s; }
.chip svg.i { width: 26px; height: 26px; color: var(--verde); stroke-width: 1.5; }
.chip:hover { border-color: var(--verde); box-shadow: var(--sombra2); }
@media (max-width: 560px) { .top .sep, .brand span { display: none; } .top .logo { height: 32px; } .brand b { font-size: 19px; } }

/* ----- barra de navegación inferior: ícono con indicador tipo píldora */
.tabs { box-shadow: 0 -2px 10px rgba(16, 24, 40, .05); border-top: 1px solid var(--line); }
.tabs button { gap: 3px; font-size: 11.5px; font-weight: 500; color: #6b7482; transition: color .15s; }
.tabs button svg.i { width: 54px; height: 30px; padding: 4px 16px; border-radius: 999px; transition: background .15s; }
.tabs button:hover { color: var(--azul2); }
.tabs button.on { color: var(--azul); font-weight: 700; }
.tabs button.on svg.i { background: var(--azul-s); stroke-width: 2; }
@media (min-width: 900px) { .tabs { grid-template-columns: repeat(6, minmax(0, 150px)); justify-content: center; } .tabs button { font-size: 13px; } }

/* ----- herramientas del mapa: un solo grupo, como en las plataformas SIG */
.maptools { gap: 0; background: #fff; border-radius: 12px; box-shadow: var(--sombra2); overflow: hidden; }
.tool { width: 46px; height: 46px; border-radius: 0; box-shadow: none; color: var(--azul2); border-bottom: 1px solid var(--line); transition: background .15s, color .15s; }
.tool:last-child { border-bottom: 0; }
.tool:hover { background: var(--azul-s); color: var(--azul); }
.tool svg.i { width: 21px; height: 21px; }
.legend { border-radius: 12px; box-shadow: var(--sombra2); padding: 10px 12px; }

/* ----- tarjetas e indicadores */
.plan, .kpi, .card, .alerta, .punto, .punto2, .fecha, .labor, .curva, details.tec, .lluvia { box-shadow: var(--sombra); border-color: #e4e8ef; }
.card, .alerta, .fecha { transition: border-color .15s, box-shadow .15s; }
.card:hover, .alerta:hover, .fecha:hover { border-color: #b9c6dc; box-shadow: var(--sombra2); }
.plan { padding: 12px 14px; }
.plan-t b { font-size: 15px; }
.kpi { position: relative; padding: 12px 14px; }
.kpi span { display: block; margin-top: 4px; }

/* indicadores del Inicio con ícono (orden: parcelas, hectáreas, atención, lluvia) */
.panel > .kpis .kpi { padding-right: 52px; }
.panel > .kpis .kpi::before, .panel > .kpis .kpi::after { content: ""; position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; }
.panel > .kpis .kpi::before { background: var(--azul-s); }
.panel > .kpis .kpi::after { background: var(--azul); -webkit-mask: var(--m) center / 18px no-repeat; mask: var(--m) center / 18px no-repeat; }
.panel > .kpis .kpi:nth-child(1) { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 6-3 6 3 6-3v15l-6 3-6-3-6 3z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E"); }
.panel > .kpis .kpi:nth-child(2) { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19 3.5 8 12 3l8.5 5L19 19z'/%3E%3Cpath d='M9 13h6M12 10v6'/%3E%3C/svg%3E"); }
.panel > .kpis .kpi:nth-child(3) { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.panel > .kpis .kpi:nth-child(4) { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14.9A7 7 0 1 1 15.7 8h1.8a4.5 4.5 0 0 1 2.5 8.2'/%3E%3Cpath d='M16 14v6M8 14v6M12 16v6'/%3E%3C/svg%3E"); }
.panel > .kpis .kpi:nth-child(2)::before { background: var(--verde-s); } .panel > .kpis .kpi:nth-child(2)::after { background: var(--verde); }
.panel > .kpis .kpi:nth-child(3)::before { background: #fff4e5; } .panel > .kpis .kpi:nth-child(3)::after { background: var(--nar); }
.panel > .kpis .kpi.warn:nth-child(3)::before { background: var(--rojo-s); } .panel > .kpis .kpi.warn:nth-child(3)::after { background: var(--rojo); }
.panel > .kpis .kpi:nth-child(4)::before { background: var(--turq-s); } .panel > .kpis .kpi:nth-child(4)::after { background: #138f84; }

/* estado vacío con ícono */
.vacio { border: 1.5px dashed #c3cede; padding: 22px 18px; }
.vacio::before { content: ""; display: block; width: 52px; height: 52px; margin: 0 auto 6px; border-radius: 16px; background: var(--azul-s) center / 26px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003399' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 6-3 6 3 6-3v8M3 6v15l6-3 6 3'/%3E%3Cpath d='M9 3v15M15 6v6M19 15v6M16 18h6'/%3E%3C/svg%3E"); }
.vacio h2 { margin-top: 6px; }

/* botones con ícono en lugar de emoji (cuaderno, editar) y candado de funciones pagas */
.ico { display: grid; place-items: center; font-size: 0; color: var(--azul2); box-shadow: var(--sombra); border-color: #e4e8ef; transition: background .15s; }
.ico:hover { background: var(--azul-s); }
.ico::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico[data-cu] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2zM22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E"); }
.ico[data-e] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.8 2.8 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z'/%3E%3Cpath d='m15 5 4 4'/%3E%3C/svg%3E"); }
.btn.lock::after, .chip2.lock::after { content: ""; width: 13px; height: 13px; margin-left: 2px; background: currentColor; opacity: .75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.chip2.lock { display: inline-flex; align-items: center; gap: 4px; color: #6b7482; }
.lock-box { border-style: solid; border-color: #dbe3f1; background: linear-gradient(180deg, #f8faff, #f2f6fd); }

/* botones principales y secundarios */
.btn { border-radius: 10px; border-width: 1px; box-shadow: var(--sombra); transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: var(--azul-s); }
.btn.pri:hover { background: #002a80; }
.btn:active { transform: translateY(1px); }
.btn.link, .btn.link:hover { box-shadow: none; background: none; }
.btn svg { width: 20px; height: 20px; fill: none; }
.chip2 { border-width: 1px; font-weight: 600; }

/* títulos */
h1 { letter-spacing: .1px; }
h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; text-transform: none; }
h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(180deg, var(--turq), var(--verde)); flex: none; }
.sheet h2::before, .vacio h2::before { display: none; }
.vacio h2 { justify-content: center; }

/* ----- ajustes para celular */
.brand b { white-space: nowrap; }
.tabs button { white-space: nowrap; }
.panel .lock-box { border-style: solid; }
@media (max-width: 560px) {
  .top { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .top .logo { height: 28px; }
  .brand b { font-size: 18px; gap: 5px; }
  .brand .py { width: 17px; height: 10px; }
  .chip { padding: 4px 10px 4px 5px; min-height: 36px; font-size: 13px; gap: 5px; }
  .chip svg.i { width: 22px; height: 22px; }
  .tabs button { font-size: 10.5px; letter-spacing: -.1px; }
  .tabs button svg.i { width: 46px; height: 28px; padding: 4px 12px; }
}
@media (max-width: 370px) { .top .logo { display: none; } }

/* ----- campaña: avance de siembra y materiales (v0.6) */
.camp { background: #fff; border: 1px solid #e4e8ef; border-radius: var(--r); padding: 14px; box-shadow: var(--sombra); }
.camp-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.camp-h b { display: block; font: 700 30px/1 'Barlow Condensed', sans-serif; color: var(--verde); font-variant-numeric: tabular-nums; }
.camp-h span { font-size: 13.5px; color: var(--mute); }
.bar.grande { height: 10px; margin: 10px 0 12px; }
.vars { display: flex; flex-direction: column; gap: 2px; }
.var { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid #eef1f5; }
.var:first-child { border-top: 0; }
.var .sw { width: 14px; height: 14px; border-radius: 4px; margin: 0; }
.var div { display: flex; flex-direction: column; } .var div span { font-size: 12.5px; color: var(--mute); }
.var em { font-style: normal; font-weight: 600; color: var(--azul2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.camp .acciones { margin: 10px 0 0; }

/* ----- barra de medición más compacta: deja ver el mapa en pantallas bajas */
.measure { left: 10px; right: 66px; bottom: 26px; padding: 8px 10px; border-radius: 12px; box-shadow: var(--sombra2); }
.measure b { font-size: 21px; }
.mbtns { margin-top: 4px; } .mbtns button { min-height: 36px; font-size: 13px; border-width: 1px; border-radius: 9px; }
@media (max-height: 760px) { .measure { bottom: 8px; } }
