/* Tracción — estilos. Base "Tracción total" + "Cuaderno de campo" en Suelo y nutrición.
   Identidad general (por defecto): Grafito y maíz. html[data-identidad=disagro] vuelve a los colores DISAGRO. */
@font-face { font-family: 'Inter'; src: url('inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('inter-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  /* Identidad general = sistema de Vectrani (vectrani.css) con el maíz como color del negocio (Vectrani.colorNegocio en app.js).
     --vd oscuro principal · --va acento · --sobre-va texto sobre el acento · --va-txt acento legible sobre blanco · --vc acento suave */
  --vd: var(--v-texto); --va: var(--v-accion); --vd2: #2A2D33; --vc: var(--v-banda); --sobre-va: var(--v-sobre-accion); --va-txt: var(--v-accion-texto); --ic-alt: var(--v-accion);
  --hero-t1: #A0A6AE; --hero-t2: #C9CDD3; --foco: var(--v-foco); --sombra-va: transparent;
  --f-titulo: var(--font-titulo); --f-texto: var(--font-texto); --cuaderno: var(--v-fondo); --fondo-ancho: var(--v-linea);
  --neg: var(--v-texto); --g9: #2A2D33; --g7: var(--v-texto-2); --g5: var(--v-borde); --g3: var(--v-linea); --g2: #E6E8EB; --g1: var(--v-fondo); --bl: var(--v-superficie);
  --ambar: var(--v-atencion); --ambar-f: var(--v-atencion-fondo); --rojo: var(--v-error); --rojo-f: var(--v-error-fondo); --verde-f: var(--v-banda);
  --radio: var(--v-radio-l); --sombra: 0 0 0 1px var(--v-linea);
  --barra: 68px;
}
html[data-identidad="disagro"] {
  --vd: #1A5C2A; --va: #00A651; --vd2: #154b22; --vc: #e3f3e8; --sobre-va: #fff; --va-txt: #00A651; --ic-alt: #fff;
  --hero-t1: #bfe0c9; --hero-t2: #cfe3d5; --foco: rgba(0,166,81,.15); --sombra-va: rgba(0,166,81,.3);
  --f-titulo: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --cuaderno: #f6f7f5; --fondo-ancho: #e4e7e5;
  --neg: #111; --g9: #2b2f2c; --g7: #5b625d; --g5: #8c938e; --g3: #d4d8d5; --g2: #e7eae8; --g1: #f3f5f4; --bl: #fff;
  --f-texto: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ambar: #c27c00; --ambar-f: #fff4dc; --rojo: #c62828; --rojo-f: #fde8e8; --verde-f: #e3f3e8;
  --radio: 18px; --sombra: 0 1px 0 var(--g3);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--g1); }
body { font-family: var(--f-texto); color: var(--neg); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--barra) + 24px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--vd); }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Cabeceras */
.hero { background: var(--vd); color: var(--bl); padding: 14px 18px 24px; border-radius: 0 0 28px 28px; }
.hero .fila { display: flex; justify-content: space-between; align-items: center; }
.marca { font-family: var(--f-titulo); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-t1); }
.hero h1 { font-family: var(--f-titulo); font-size: 32px; line-height: 1.04; letter-spacing: -.03em; font-weight: 800; margin-top: 14px; }
.hero p { color: var(--hero-t2); font-size: 14px; margin-top: 6px; }
.hero h2 { font-family: var(--f-titulo); font-size: 24px; letter-spacing: -.02em; line-height: 1.1; margin-top: 8px; font-weight: 800; }
.btn-perfil { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: var(--bl); font-weight: 700; font-size: 13px; }
.atras { background: none; border: 0; color: var(--hero-t1); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 0; }
.stats { display: flex; gap: 10px; margin-top: 16px; }
.stat { flex: 1; background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px 12px; }
.stat b { font-family: var(--f-titulo); font-size: 24px; display: block; letter-spacing: -.02em; }
.stat small { font-size: 11px; color: var(--hero-t2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chip { font-size: 12px; background: rgba(255,255,255,.14); border-radius: 20px; padding: 4px 10px; }

/* ---------- Bloques */
.cont { padding: 0 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 16px 0; }
.tile { background: var(--bl); border-radius: 20px; padding: 18px 16px; min-height: 148px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--sombra); border: 0; text-align: left; }
.tile .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--va); color: var(--sobre-va); display: flex; align-items: center; justify-content: center; }
.tile.alt .ic { background: var(--vd); color: var(--ic-alt); }
.tile b { font-family: var(--f-titulo); font-size: 19px; letter-spacing: -.01em; line-height: 1.1; display: block; }
.tile small { font-size: 12px; color: var(--g7); }
.ancho { margin: 12px 16px 0; background: var(--bl); border-radius: 20px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--sombra); border: 0; width: calc(100% - 32px); text-align: left; }
.ancho b { font-size: 15px; display: block; }
.ancho small { display: block; color: var(--g7); font-size: 12px; }
.ancho .ir { margin-left: auto; font-weight: 800; color: var(--vd); font-size: 14px; white-space: nowrap; }
.instalar { margin: 12px 16px 0; background: var(--vc); border-radius: 20px; padding: 14px 40px 14px 14px; display: flex; align-items: center; gap: 12px; position: relative; }
.instalar img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.instalar b { font-size: 15px; display: block; color: var(--vd); }
.instalar small { display: block; color: var(--g7); font-size: 12px; }
.instalar .btn.pri { flex: none; min-height: 40px; padding: 8px 14px; box-shadow: none; }
.instalar .cerrar { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; background: none; color: var(--g7); font-size: 22px; line-height: 1; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--ambar); flex: none; }
.ico { width: 22px; height: 22px; flex: none; }
.ico-g { width: 24px; height: 24px; }

.tarjeta { background: var(--bl); border-radius: var(--radio); padding: 16px; margin: 12px 16px 0; box-shadow: var(--sombra); }
.tarjeta h3 { font-size: 16px; margin-bottom: 10px; color: var(--vd); }
.tarjeta .sub { font-size: 13px; color: var(--g7); margin: -6px 0 10px; }
.bloque { margin: 12px 16px 0; background: var(--bl); border-radius: 18px; padding: 14px 16px; border-left: 6px solid var(--va); box-shadow: var(--sombra); }
.bloque .cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 10px; }
.bloque .cab b { font-size: 15px; color: var(--vd); }
.bloque p, .bloque .texto { font-size: 15px; white-space: pre-wrap; color: var(--g9); }
.copiar { background: var(--vd); color: var(--bl); border: 0; border-radius: 10px; padding: 8px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.copiar.hecho { background: var(--va); color: var(--sobre-va); }
.nota-oscura { margin: 12px 16px 0; background: var(--g9); color: #f1f1f1; border-radius: 18px; padding: 12px 16px; font-size: 14px; }
.nota-oscura b { color: #ffd166; }
.nota-oscura li { margin-left: 18px; margin-top: 4px; }
details.plegable { margin: 12px 16px 0; background: var(--bl); border-radius: 18px; padding: 12px 16px; box-shadow: var(--sombra); }
details.plegable summary { font-weight: 700; color: var(--vd); cursor: pointer; }
details.plegable li { margin: 6px 0 0 18px; font-size: 14px; color: var(--g9); }

/* ---------- Formularios */
.campo { margin-bottom: 12px; }
.campo label, .etiqueta { display: block; font-size: 13px; font-weight: 600; color: var(--g9); margin-bottom: 5px; }
.campo .ayuda { font-size: 12px; color: var(--g7); margin-top: 4px; }
input[type=text], input[type=number], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; border: 1.5px solid var(--g3); border-radius: 12px; padding: 12px; background: var(--bl); font-size: 16px; min-height: 48px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--va); box-shadow: 0 0 0 3px var(--foco); }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fila3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.seg { display: flex; background: var(--g2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 10px 4px; font-size: 13px; font-weight: 600; color: var(--g7); min-height: 42px; }
.seg button.on { background: var(--bl); color: var(--vd); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.multi { display: flex; flex-wrap: wrap; gap: 8px; }
.multi button { border: 1.5px solid var(--g3); background: var(--bl); border-radius: 20px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--g9); min-height: 40px; }
.multi button.on { background: var(--vc); border-color: var(--va); color: var(--vd); }
.prod { border: 1.5px solid var(--g2); border-radius: 14px; padding: 12px; margin-bottom: 10px; position: relative; }
.prod .quitar { position: absolute; top: 6px; right: 6px; border: 0; background: none; color: var(--g5); font-size: 20px; width: 36px; height: 36px; }
.fotos { display: flex; gap: 10px; flex-wrap: wrap; }
.foto { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; position: relative; background: var(--g2); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; }
.foto-mas { width: 92px; height: 92px; border-radius: 12px; border: 2px dashed var(--g3); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--vd); font-size: 12px; font-weight: 700; background: var(--bl); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; font-weight: 700; font-size: 16px; min-height: 52px; padding: 0 18px; }
.btn.pri { background: var(--va); color: var(--sobre-va); box-shadow: 0 8px 18px var(--sombra-va); }
.btn.sec { background: var(--bl); color: var(--vd); box-shadow: var(--sombra); border: 1.5px solid var(--g3); }
.btn.osc { background: var(--vd); color: var(--bl); }
.btn.peligro { background: var(--bl); color: var(--rojo); border: 1.5px solid var(--rojo); }
.btn:disabled { opacity: .55; }
.btn.bloque-ancho { width: 100%; }
.acciones { display: flex; gap: 10px; margin: 16px 16px 0; }
.acciones .btn { flex: 1; }
.fijas { position: fixed; left: 0; right: 0; bottom: calc(var(--barra) + env(safe-area-inset-bottom)); padding: 10px 16px; display: flex; gap: 10px; max-width: 520px; margin: 0 auto; background: linear-gradient(to top, var(--g1) 70%, rgba(243,245,244,0)); z-index: 5; }
.fijas .btn { flex: 1; }
.espacio-fijas { height: 80px; }
.contador { font-size: 12px; color: var(--g7); text-align: center; margin-top: 8px; }
.error-campo { color: var(--rojo); font-size: 13px; margin-top: 6px; }

/* ---------- Barra inferior */
.barra { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--barra) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bl); border-radius: 22px 22px 0 0; display: flex; justify-content: space-around; align-items: center; box-shadow: 0 -1px 0 var(--g3); max-width: 520px; margin: 0 auto; z-index: 10; }
.barra button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: var(--g5); font-size: 11px; font-weight: 600; min-width: 60px; padding: 6px 0; }
.barra button.on { color: var(--vd); }
.barra .ico { flex: none; width: 24px; height: 24px; display: block; }
.barra button.on .ico { background: var(--vc); border-radius: 10px; padding: 3px; width: 32px; height: 28px; }

/* ---------- Ingreso */
.ingreso { min-height: 100vh; background: var(--vd); color: var(--bl); padding: 48px 24px; display: flex; flex-direction: column; }
.ingreso .logo { width: 64px; height: 64px; border-radius: 18px; }
.ingreso h1 { font-family: var(--f-titulo); font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin-top: 20px; }
.ingreso p { color: var(--hero-t2); margin-top: 4px; }
.ingreso form { margin-top: 32px; }
.ingreso label { color: var(--hero-t2); }
.ingreso input { border-color: transparent; color: #1F2A22; caret-color: var(--vd); }
.ingreso .lema { margin-top: auto; padding-top: 32px; font-size: 13px; color: var(--hero-t1); }

/* ---------- Avisos */
#aviso { position: fixed; left: 16px; right: 16px; top: 16px; max-width: 488px; margin: 0 auto; z-index: 50; pointer-events: none; }
#aviso .msg { background: var(--g9); color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); margin-bottom: 8px; pointer-events: auto; }
#aviso .msg.error { background: var(--rojo); }
#aviso .msg.ok { background: var(--vd); }
#aviso .msg-actualizar { display: block; width: 100%; border: 0; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.banda { margin: 12px 16px 0; border-radius: 14px; padding: 10px 14px; font-size: 13px; }
.banda.sin-senal { background: var(--ambar-f); color: #6b4a00; }
.banda.info { background: var(--vc); color: var(--vd); }
.cargando { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px; color: var(--g7); }
.giro { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--g3); border-top-color: var(--va); animation: giro 0.8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
.vacio { text-align: center; color: var(--g7); padding: 28px 16px; font-size: 14px; }

/* ---------- Listas */
.lista { margin: 12px 16px 0; background: var(--bl); border-radius: 18px; overflow: hidden; box-shadow: var(--sombra); }
.lista .item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--g2); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.lista .item:last-child { border-bottom: 0; }
.lista .item b { display: block; font-size: 15px; }
.lista .item small { display: block; font-size: 12px; color: var(--g7); }
.lista .item .der { margin-left: auto; text-align: right; flex: none; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.pill.verde { background: var(--verde-f); color: #0b7a3c; }
.pill.ambar { background: var(--ambar-f); color: #8a5a00; }
.pill.rojo { background: var(--rojo-f); color: var(--rojo); }
.pill.gris { background: var(--g2); color: var(--g7); }

/* ---------- Valoración */
.valorar { margin: 12px 16px 0; background: var(--bl); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); }
.valorar p { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.valorar .multi button { flex: 1; }

/* ---------- Tarjeta PNG */
.vista-tarjeta { margin: 12px 16px 0; }
.vista-tarjeta img { width: 100%; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.15); display: block; }

/* ---------- Menú de perfil */
.capa { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.hoja-menu { background: var(--bl); width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.hoja-menu h3 { font-size: 18px; }
.hoja-menu .rol { color: var(--g7); font-size: 13px; margin-bottom: 12px; }
.hoja-menu .op { display: block; width: 100%; text-align: left; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--g2); background: none; font-size: 16px; font-weight: 600; }
.hoja-menu .op:last-child { border-bottom: 0; color: var(--rojo); }

/* ---------- Cuaderno de campo (Suelo y nutrición) */
.cuaderno { background: var(--cuaderno); }
.cuaderno .sec { margin: 12px 16px 0; background: var(--bl); border: 1px solid var(--g3); border-radius: 12px; }
.cuaderno .sec > .cab { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--g2); }
.cuaderno .sec > .cab b { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g9); }
.cuaderno .sec > .cab b em { font-style: normal; color: var(--va-txt); margin-right: 8px; font-variant-numeric: tabular-nums; }
.cuaderno .sec > .cuerpo { padding: 12px 14px; }
.cuaderno input, .cuaderno select { border-radius: 10px; min-height: 44px; padding: 9px 10px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tabla th { text-align: left; font-size: 11px; color: var(--g7); text-transform: uppercase; letter-spacing: .06em; padding: 6px 4px; border-bottom: 1px solid var(--g2); font-weight: 700; }
.tabla td { padding: 7px 4px; border-bottom: 1px solid var(--g2); vertical-align: middle; }
.tabla td.n { text-align: right; }
.tabla tr:last-child td { border-bottom: 0; }
.resultado-grande { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; }
.resultado-grande b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.resultado-grande span { color: var(--g7); font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--g3); border-radius: 12px; background: var(--bl); margin-top: 8px; }
.kpi { padding: 10px 12px; border-right: 1px solid var(--g2); }
.kpi:last-child { border-right: 0; }
.kpi b { font-size: 20px; display: block; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi small { font-size: 11px; color: var(--g7); }
.grafica { width: 100%; height: auto; display: block; }
.nota-tecnica { font-size: 12px; color: var(--g7); margin-top: 8px; }
.aviso-critico { margin-top: 8px; background: var(--ambar-f); color: #6b4a00; border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--g2); font-size: 14px; }
.check:last-child { border-bottom: 0; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--va); }
.check small { color: var(--g7); display: block; font-size: 12px; }
.leyenda { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--g7); margin-top: 6px; }
.leyenda i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* Balance del suelo */
.tabla-scroll { overflow-x: auto; }
.tabla-balance { width: 100%; table-layout: fixed; }
.tabla-balance th { font-size: 10px; letter-spacing: 0; text-transform: none; line-height: 1.2; padding: 4px 2px; vertical-align: bottom; white-space: normal; }
.tabla-balance td { font-size: 12px; padding: 6px 2px; }
.tabla-balance td.n { white-space: nowrap; }
.tabla-balance th:first-child, .tabla-balance td:first-child { width: 26%; }
.tabla-balance th:nth-child(5), .tabla-balance td:nth-child(5) { width: 11%; }
.tabla-balance small.regla { display: block; font-size: 10px; color: var(--g7); font-weight: 600; }
.tabla-balance .aviso-fila td { font-size: 11px; color: #6b4a00; background: var(--ambar-f); }

/* Curvas de absorción */
.leyenda-etapas { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--g9); }
.leyenda-etapas li { padding: 5px 8px; border-radius: 8px; cursor: pointer; line-height: 1.35; }
.leyenda-etapas li.on { background: var(--vc); color: var(--vd); font-weight: 700; }
#svg-curva rect.franja { cursor: pointer; }
.sugerencias { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sugerencias button { border: 1.5px solid var(--g3); background: var(--bl); border-radius: 16px; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--vd); min-height: 34px; }
.hallazgos { margin: 12px 16px 0; display: grid; gap: 8px; }
.hallazgo { background: var(--bl); border: 1px solid var(--g3); border-left: 6px solid var(--g5); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.hallazgo b { display: block; font-size: 12px; letter-spacing: .04em; margin-bottom: 2px; }
.nut-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.nut-sel button { border: 2px solid var(--c); background: var(--bl); color: var(--c); border-radius: 18px; min-height: 36px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.nut-sel button.on { background: var(--c); color: #fff; }
.grafica-curva { margin-top: 10px; }
.criticas { margin: 6px 0 0 16px; padding: 0; font-size: 12px; color: var(--g7); line-height: 1.45; }
.crono-fila { padding: 8px 0; border-bottom: 1px solid var(--g2); }
.crono-fila:last-of-type { border-bottom: 0; }
.crono-cab { display: flex; align-items: center; gap: 8px; }
.crono-cab b { width: 44px; flex: none; font-size: 14px; }
.crono-cab svg { flex: 1; min-width: 0; }
.crono-txt { font-size: 13px; color: var(--g9); margin: 4px 0 0 52px; line-height: 1.4; }

/* Análisis rápido (v2) */
.cuaderno .ayuda { font-size: 12px; color: var(--g7); margin-top: 6px; }
.cuaderno textarea { min-height: 64px; border-radius: 10px; padding: 9px 10px; font-variant-numeric: tabular-nums; }
.sec.pronto { opacity: .75; }
.buscar-hist { margin-top: 10px; }
.ver-todos { margin: 8px 16px 0; text-align: right; }
.enlace { border: 0; background: none; color: var(--vd); font-weight: 700; font-size: 14px; padding: 8px 0; }
.hist-total { text-align: right; margin: 10px 16px 0; }
.avance { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.avance .etiqueta { margin: 0; white-space: nowrap; }
.avance .seg { flex: 1; }
.avance .seg button { min-height: 38px; padding: 6px 4px; font-size: 12px; }
.cuadricula-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.cuadricula { border-collapse: separate; border-spacing: 6px 6px; width: 100%; table-layout: fixed; margin: -6px 0; }
.cuadricula.muchos { width: auto; table-layout: auto; }
.cuadricula th { font-weight: 600; font-size: 12px; color: var(--g7); text-align: center; vertical-align: bottom; }
.cuadricula th.fija { position: sticky; left: 0; z-index: 2; background: var(--bl); width: 44px; min-width: 44px; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 6px var(--bl); }
.cuadricula tbody th.fija { font-size: 15px; color: var(--g9); vertical-align: middle; }
.cuadricula.muchos th.fija { box-shadow: 0 0 0 6px var(--bl), 7px 0 6px -2px rgba(0,0,0,.12); }
.cuadricula.muchos td, .cuadricula.muchos thead th:not(.fija) { min-width: 92px; }
.cuadricula small { display: block; font-size: 11px; color: var(--g7); margin-top: 3px; white-space: nowrap; }
.cuadricula .nombre-col { display: block; width: 100%; min-height: 40px; font-size: 14px; font-weight: 700; text-align: center; padding: 6px 4px; color: var(--g9); }
.cuadricula span.nombre-col { min-height: 0; padding: 4px; }
.cuaderno .celda, .celda { width: 100%; min-height: 50px; font-size: 20px; text-align: center; padding: 6px 4px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.celda.atipico { background: var(--ambar-f); border-color: var(--ambar); color: #8a5a00; font-weight: 700; }
.celda.mala { border-color: var(--rojo); background: var(--rojo-f); }
.quitar-col { border: 0; background: var(--g2); color: var(--g7); border-radius: 6px; width: 22px; height: 22px; font-size: 14px; line-height: 1; margin-left: 2px; }
.botones-grid { display: flex; gap: 8px; margin-top: 10px; }
.botones-grid .btn { flex: 1; min-height: 44px; font-size: 13px; padding: 0 6px; white-space: nowrap; }
.panel-pegar { margin-top: 12px; padding: 12px; border: 1px dashed var(--g3); border-radius: 12px; background: var(--g1); }
.fila-atipico .botones { display: flex; gap: 6px; flex: none; }
.copiar.claro { background: var(--g2); color: var(--g9); }
.res-rapido .cab .pill { font-size: 10px; letter-spacing: 0; text-transform: none; }
.aviso-r { background: var(--ambar-f); color: #6b4a00; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; }
.atipicos { margin-top: 6px; }
.cuaderno .btn.sec { margin: 0; border-radius: 16px; }
.fila-atipico { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--g2); }
.fila-atipico b { color: var(--ambar); }
.comp { padding: 6px 0 10px; border-bottom: 1px solid var(--g2); margin-bottom: 10px; }
.cifra-r b { font-size: 34px; }
.cifra-r.bien b { color: var(--vd); }
.cifra-r.mal b { color: var(--rojo); }
.frase { font-size: 15px; line-height: 1.45; color: var(--g9); }
.grafica-r { margin: 6px -4px 10px; }
.tabla-r { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.tabla-r th { text-align: left; font-size: 11px; color: var(--g7); font-weight: 600; border-bottom: 1px solid var(--g3); padding: 4px 4px 6px 0; }
.tabla-r td { padding: 6px 4px 6px 0; border-bottom: 1px solid var(--g2); }
.respaldo { background: var(--g1); border-radius: 10px; padding: 10px 12px; }
.respaldo ul { margin: 4px 0 0 16px; padding: 0; font-size: 13px; line-height: 1.5; }
.respaldo .sub-resp { font-size: 12px; font-weight: 700; margin-top: 8px; color: var(--vd); }

@media (min-width: 521px) { body { background: var(--fondo-ancho); } #app { background: var(--g1); } }

/* Parcelas con seguimiento */
details.mas { margin-top: 6px; border-top: 1px solid var(--g2); padding-top: 10px; }
details.mas > summary { font-weight: 700; color: var(--vd); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.cuerpo-mas { padding-top: 6px; }
.trat { position: relative; border: 1.5px solid var(--g2); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.trat > .etiqueta { color: var(--vd); }
.trat > .quitar, .prod-p > .quitar { position: absolute; top: 4px; right: 4px; border: 0; background: none; color: var(--g5); font-size: 20px; width: 40px; height: 40px; }
.prod-p { position: relative; background: var(--g1, #f6f7f6); border-radius: 12px; padding: 10px 10px 2px; margin-bottom: 8px; }
.var-fila { border-bottom: 1px solid var(--g2); padding-bottom: 4px; }
.var-fila .check { border-bottom: 0; align-items: flex-start; }
.var-fila .check .pill { margin-left: auto; flex: none; }
.var-fila.principal { background: var(--vc); border-radius: 10px; padding: 0 8px 4px; margin-bottom: 6px; }
details.como { margin: 0 0 6px 32px; font-size: 13px; }
details.como summary { color: var(--vd); font-weight: 600; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
details.como p { color: var(--g9); margin-top: 4px; line-height: 1.45; }
.quitar-var { margin-left: 32px; font-size: 13px; padding: 2px 0; }
.propia-nueva { border: 1.5px dashed var(--g3); border-radius: 14px; padding: 12px; margin-top: 10px; }
.gps-dato { font-size: 14px; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.campo.gps .btn { margin-top: 4px; }
table.croquis { width: 100%; border-collapse: separate; border-spacing: 4px; }
table.croquis th { font-size: 12px; color: var(--g7); text-align: left; white-space: nowrap; font-weight: 600; }
table.croquis td { background: var(--vc); color: var(--vd); text-align: center; font-weight: 800; height: 40px; border-radius: 8px; }
table.croquis td.testigo { background: var(--g2); color: var(--g9); }
.resumen-parcela th { text-align: left; font-weight: 600; color: var(--g7); width: 42%; }
.lista-trat { list-style: none; }
.lista-trat li { padding: 8px 0; border-bottom: 1px solid var(--g2); font-size: 14px; }
.lista-trat li:last-child { border-bottom: 0; }
.lista-trat small { display: block; color: var(--g7); font-size: 12px; margin-top: 2px; }
.visita-pronto { flex-direction: column; gap: 0; line-height: 1.15; }
.visita-pronto small { font-size: 11px; font-weight: 600; color: var(--g7); }

/* Cuándo debe estar disponible: escala común y líneas guía que cruzan todas las filas */
.crono { position: relative; }
.crono-escala { padding-bottom: 2px; border-bottom: 1px solid var(--g2); }
.crono-escala b { font-size: 11px; color: var(--g7); font-weight: 700; }
.crono-guias { position: absolute; top: 0; bottom: 0; left: 52px; width: calc(100% - 52px); height: 100%; pointer-events: none; stroke: rgba(0,0,0,.12); stroke-width: 1; }
.crono-txt b { font-weight: 700; }

/* ---------- Lista de productos (reemplaza el datalist nativo) */
.combo { position: relative; }
.combo input[data-combo] { padding-right: 46px; }
.combo-abrir { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: none; color: var(--g7); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.combo.abierto .combo-abrir svg { transform: rotate(180deg); }
.combo-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; background: var(--bl); border: 1.5px solid var(--g3); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.combo-lista li { padding: 11px 12px; border-bottom: 1px solid var(--g2); cursor: pointer; min-height: 44px; }
.combo-lista li:last-child { border-bottom: 0; }
.combo-lista li b { display: block; font-size: 15px; font-weight: 600; }
.combo-lista li small { display: block; font-size: 12px; color: var(--g7); }
.combo-lista li:active, .combo-lista li.activa { background: var(--vc); }
.combo-lista li.combo-vacio { color: var(--g7); font-size: 13px; cursor: default; }

/* ---------- Identidad general: formas y reglas de Vectrani (sin sombras ni degradados, sin verde, sin mayúsculas sostenidas).
   Nada de este bloque aplica a la identidad disagro. */
html:not([data-identidad="disagro"]) body { font-size: 16px; -webkit-font-smoothing: antialiased; }
html:not([data-identidad="disagro"]) .hero { border-radius: 0 0 var(--v-radio-l) var(--v-radio-l); }
html:not([data-identidad="disagro"]) :is(.marca, .atras, .cuaderno .sec > .cab b, .tabla th) { text-transform: none; letter-spacing: 0; }
html:not([data-identidad="disagro"]) :is(.marca, .atras) { font-size: 14px; }
html:not([data-identidad="disagro"]) :is(.tile, .ancho, .instalar, .bloque, .nota-oscura, details.plegable, .lista, .valorar, .stat, .tile .ic) { border-radius: var(--v-radio-l); }
html:not([data-identidad="disagro"]) :is(.btn, .copiar, .seg, .seg button, .cuaderno .btn.sec) { border-radius: var(--v-radio-m); }
html:not([data-identidad="disagro"]) :is(.multi button, .sugerencias button, .nut-sel button, .pill, .chip) { border-radius: var(--v-radio-pildora); }
html:not([data-identidad="disagro"]) :is(.seg button.on, #aviso .msg, .vista-tarjeta img, .combo-lista, .cuadricula.muchos th.fija) { box-shadow: none; }
html:not([data-identidad="disagro"]) .seg button.on { outline: 1px solid var(--v-linea); }
html:not([data-identidad="disagro"]) .combo-lista { border-color: var(--v-borde); }
html:not([data-identidad="disagro"]) .cuadricula.muchos th.fija { box-shadow: 0 0 0 6px var(--bl); border-right: 1px solid var(--v-linea); }
html:not([data-identidad="disagro"]) .fijas { background: var(--v-fondo); border-top: 1px solid var(--v-linea); }
html:not([data-identidad="disagro"]) .barra { border-radius: 0; box-shadow: none; border-top: 1px solid var(--v-linea); }
html:not([data-identidad="disagro"]) .barra button { color: var(--v-texto-2); font-size: 13px; min-width: 0; flex: 1; }
html:not([data-identidad="disagro"]) .barra button.on { color: var(--v-accion-texto); }
html:not([data-identidad="disagro"]) :is(input[type=text], input[type=number], input[type=password], input[type=search], input:not([type]), select, textarea) { border-color: var(--v-borde); }
html:not([data-identidad="disagro"]) :is(input, select, textarea):focus { border-color: var(--v-borde); box-shadow: none; outline: 3px solid var(--v-foco); outline-offset: 1px; }
html:not([data-identidad="disagro"]) .ingreso input { border-color: transparent; color: var(--v-texto); }
html:not([data-identidad="disagro"]) .ingreso input:focus { outline-color: var(--v-accion); }
html:not([data-identidad="disagro"]) :is(button, a, summary):focus-visible { outline: 3px solid var(--v-foco); outline-offset: 2px; }
html:not([data-identidad="disagro"]) .pill.verde { background: var(--v-banda); color: var(--v-texto); }
html:not([data-identidad="disagro"]) .pill.ambar { color: var(--v-atencion); }
html:not([data-identidad="disagro"]) :is(.banda.sin-senal, .aviso-critico, .aviso-r, .tabla-balance .aviso-fila td, .celda.atipico) { color: var(--v-atencion); }
html:not([data-identidad="disagro"]) .banda.info { color: var(--v-texto); }
html:not([data-identidad="disagro"]) #aviso .msg.ok { background: var(--v-texto); }
.pie-sello { display: flex; justify-content: center; padding: var(--v-esp-5) var(--v-esp-4) var(--v-esp-2); }
.ingreso .pie-sello { margin-top: auto; padding: var(--v-esp-6) 0 0; }
/* Administración → Configuración (servidor nuevo) */
.banda.error { background: var(--rojo-f); color: var(--rojo); }
.cfg-imp .banda { margin: 10px 0; border-radius: 12px; }
.cfg-lista { list-style: none; margin: 10px 0; padding: 0; }
.cfg-lista li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--g2); font-size: 14px; }
.cfg-lista li small { color: var(--g7); white-space: nowrap; }
.cfg-tabla summary { gap: 6px; flex-wrap: wrap; }
.cfg-error { background: var(--rojo-f); color: var(--rojo); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; }
.cfg-detalle { margin: 6px 0 0 18px; font-size: 13px; color: var(--g9); overflow-wrap: anywhere; }
.cfg-detalle li { margin: 4px 0; }
.cfg-botones { display: grid; gap: 8px; margin-top: 12px; }
/* Letra mínima del sistema en la identidad general: 13 px en etiquetas y 14 px en ayudas y detalle. */
html:not([data-identidad="disagro"]) :is(.marca, .stat small, .chip, .copiar, .foto-mas, .barra button, .pill, .cuaderno .sec > .cab b, .tabla th, .kpi small, .tabla-balance th, .tabla-balance td, .tabla-balance small.regla, .tabla-balance .aviso-fila td, .sugerencias button, .hallazgo b, .avance .seg button, .cuadricula th, .cuadricula small, .res-rapido .cab .pill, .tabla-r th, table.croquis th, .visita-pronto small, .crono-escala b) { font-size: 13px; }
html:not([data-identidad="disagro"]) :is(.tile small, .ancho small, .instalar small, .tarjeta .sub, .campo .ayuda, .contador, .error-campo, .lista .item small, .hoja-menu .rol, .nota-tecnica, .check small, .leyenda, .leyenda-etapas, .criticas, .crono-txt, .cuaderno .ayuda, .respaldo ul, .respaldo .sub-resp, details.como, .quitar-var, .lista-trat small, .combo-lista li small, .combo-lista li.combo-vacio) { font-size: 14px; }
