/* AASA: tema verde (14-oct-2026). Pedido de Pablo: una interfaz de verdes, negro, blanco y gris, sin azul, sofisticada y elegante,
   con el campo como referencia. Solo se carga con CHROME_NUEVO=1 (base.html y login.html), después de chrome.css.
   Cambia valores, no estructura. Redefine las variables del portal (app.css) y las del módulo de riego (tokens.css) sobre
   html.cn, que pesa más que :root: ni app.css ni tokens.css se tocan, y sin la variable el portal sale igual que en producción.
   Los gráficos leen sus colores de esas mismas variables (Riego.tok) y de datos.PALETA_VERDE; una prueba compara las dos.
   Lo que no se recolorea a propósito: los estados (atrasado en ámbar, sin señal y errores en rojo), porque ahí el color es lo
   que dice el estado, y las curvas de la ficha del nodo AASA, que copian los colores de siempre del nodo. */
html.cn{
  accent-color:#0f6b3c;      /* casillas, botones de opción y barras del navegador: el verde del acento y no el azul del sistema */
  /* ---- portal: superficies, texto y acento ---- */
  --bg:#eef2ee; --surface:#ffffff; --surface-2:#f5f8f5; --hover:#ebf0ea;
  --border:#d8dfd8; --border-strong:#b7c3b8;
  --text:#111c15; --mut:#506055; --dim:#5a6a5f;
  --accent:#0f6b3c; --accent-soft:#e1efe5; --accent-fuerte:#0a5230; --accent-borde:#b7d4c0; --accent-aro:rgba(15,107,60,.16);
  /* ---- lateral oscuro (negro verdoso) ---- */
  --lat-fondo:#0c1812; --lat-borde:#1a2a21; --lat-hover:#14241b;
  --lat-texto:#a6bbaa; --lat-texto-2:#86a08f; --lat-seccion:#7b9585; --lat-soon:#6a8573;
  --lat-activo:#8fdba6; --lat-activo-fondo:#173626; --lat-barra:#3fa75b; --lat-foco:#8fdba6;
  --lat-sombra:rgba(4,12,8,.32);
  --sec-linea:var(--lat-borde);
  /* ---- consolas oscuras (vista previa de alertas y registro de sincronización) ---- */
  --consola-fondo:#0e1a13; --consola-texto:#dcebe0; --consola-titulo:#86c29f;

  /* ---- módulo de riego (tokens.css) ---- */
  --rg-fondo:#eef2ee; --rg-sup:#ffffff; --rg-sup-2:#f5f8f5; --rg-hover:#ebf0ea;
  --rg-borde:#d8dfd8; --rg-borde-fuerte:#b7c3b8; --rg-borde-control:#6f7d72;
  --rg-texto:#111c15; --rg-texto-2:#36443a; --rg-texto-3:#506055; --rg-placeholder:#627167;
  --rg-acento:#0f6b3c; --rg-acento-fuerte:#0a5230; --rg-acento-suave:#e1efe5; --rg-foco:#0f6b3c;
  /* lo regado es el verde esmeralda, y lo recomendado, un verde hoja más amarillo: se distinguen además por la forma
     (lo regado va macizo y cuadrado; lo recomendado, hueco y redondo) */
  --rg-agua:#13794a; --rg-agua-suave:#dcefe4; --rg-agua-tinta:#0c5c37;
  --rg-agua-manual:#8cc4a3; --rg-riegos-fondo:rgba(19,121,74,.14); --rg-seleccion:rgba(15,107,60,.07);
  --rg-reco:#5c7704; --rg-reco-suave:#e8efd2; --rg-reco-tinta:#465c04; --rg-reco-fondo:rgba(92,119,4,.12);
  /* el Scholander es lo medido a mano: va en tinta negra, y el "hoy" también */
  --rg-schol:#141a16; --rg-schol-suave:#e3e9e3; --rg-schol-tinta:#141a16; --rg-sobre-schol:#ffffff;
  --rg-hoy:#111c15;
  --rg-neutro:#506055; --rg-neutro-suave:#e8eee8;
  /* series de sensores: las mismas de datos.PALETA_VERDE y TINTA_VERDE */
  --rg-serie-1:#13794a;     --rg-serie-1-tinta:#13794a;      /* humedad, 1ª profundidad: esmeralda */
  --rg-serie-2:#141a16;     --rg-serie-2-tinta:#141a16;      /* humedad, 2ª profundidad (punteada): tinta */
  --rg-serie-temp:#799a1b;  --rg-serie-temp-tinta:#5a760e;   /* temperatura: lima */
  --rg-serie-pres:#5b655f;  --rg-serie-pres-tinta:#5b655f;   /* presión: pizarra */
  --rg-serie-caud:#27532d;  --rg-serie-caud-tinta:#27532d;   /* caudal: verde bosque */
  --rg-eje-temp-fondo:#eef3dc; --rg-eje-schol-fondo:#e5ebe5;
  --rg-bala-pista:#d8dfd8;
  --rg-velo:rgba(10,22,15,.42);
}
html.cn ::selection{background:#cfe8d4;color:#111c15}
html.cn :focus-visible{outline-color:var(--accent)}   /* el aro de foco por defecto del navegador toma el azul del sistema */
html.cn ::-webkit-scrollbar-thumb{background:#bfcabf}

/* ---- lateral oscuro ---- */
html.cn .sidebar{background:var(--lat-fondo);border-right-color:var(--lat-borde)}
html.cn .brand-n{border-bottom:0;position:relative}
html.cn .brand-n::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg,var(--lat-barra),#a9d86e 78%,transparent)}
html.cn .menu-toggle{color:var(--lat-texto-2)}
html.cn .menu-toggle:hover{background:var(--lat-hover);color:#fff}
html.cn .nav .sec{color:var(--lat-seccion)}
html.cn .nav a{color:var(--lat-texto)}
html.cn .nav a:hover{background:var(--lat-hover);color:#fff}
html.cn .nav a.active{background:var(--lat-activo-fondo);color:var(--lat-activo);box-shadow:inset 3px 0 0 var(--lat-barra)}
html.cn .nav a.soon,html.cn .nav a.soon:hover{background:transparent;color:var(--lat-soon)}
html.cn .nav a.soon .tag{color:var(--lat-soon);border-color:var(--lat-borde)}
html.cn .nav-foot{border-top-color:var(--lat-borde)}
html.cn .userbox .av{background:var(--lat-hover);border-color:var(--lat-borde);color:var(--lat-texto)}
html.cn .userbox .u{color:#e8f0ea}
html.cn .userbox .u small{color:var(--lat-texto-2)}
html.cn .userbox a{color:var(--lat-texto-2)}
html.cn .userbox a:hover{background:var(--lat-hover);color:#fff}
html.cn .sidebar :focus-visible{outline:2px solid var(--lat-foco);outline-offset:2px}

/* ---- el resto del portal que traía colores propios en app.css, config.css y las fichas ---- */
html.cn .btn:hover{border-color:#8fa292}
html.cn .btn.pri:hover,html.cn .login .card button:hover{background:var(--accent-fuerte)}
html.cn input:focus,html.cn .frow input:focus,html.cn .frow textarea:focus,html.cn .cond select:focus,html.cn .cond input:focus{box-shadow:0 0 0 3px var(--accent-aro)}
html.cn .na{color:#a5b3a7}
html.cn .tag-state.off{background:#e8eee8}
html.cn .switch .tr{background:#c4cfc5}
html.cn .grupo-al .gh{background:#e6ede6}
html.cn .preview-box,html.cn .rc-trabajo .log{background:var(--consola-fondo);color:var(--consola-texto)}
html.cn .preview-box .pv-t,html.cn .rc-trabajo .log .t{color:var(--consola-titulo)}
html.cn .zreset,html.cn .rg-ficha .rg-ver{background:#eef3ee;border-color:#c5cfc5}
html.cn .zreset:hover,html.cn .rg-ficha .rg-ver:hover{background:#e3eae3}

/* ---- inicio de sesión: fondo de tinta con dos resplandores verdes y la tarjeta blanca ---- */
html.cn body:has(>.login){background:#08130d}
html.cn .login{background:
  radial-gradient(900px 520px at 12% -8%,rgba(63,167,91,.30),transparent 62%),
  radial-gradient(820px 520px at 100% 108%,rgba(169,216,110,.16),transparent 60%),#08130d}
html.cn .login .card{position:relative;border-color:transparent;border-radius:6px;box-shadow:0 28px 70px rgba(0,0,0,.45)}
html.cn .login .card::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;border-radius:6px 6px 0 0;
  background:linear-gradient(90deg,#2f8f55,#a9d86e)}
