/* =====================================================================
   TOKENS · paleta principal: ROTOPLAS (azul corporativo), tema claro. Es el tema por defecto
   y no depende de prefers-color-scheme. El oscuro es opcional (data-rtp-theme="dark").
   La paleta secundaria Mint se activa con data-rtp-palette="mint".
   Fuente de color Rotoplas: paleta corporativa (Navy #003A70, Azul #1689CB, Cian #2DABE2, Celeste #7FCBF0, Azul claro #E8F4FB).
   Semántica intercambiable: --rtp-mint = acento suave, --rtp-green = color primario de datos, --rtp-orange = CTA.
   ===================================================================== */
:root{
  --rtp-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rtp-font-serif: "Instrument Serif", Georgia, serif;
  --rtp-font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* glass (nombres de token estándar del design system) */
  --rtp-g1: rgba(255,255,255,.72);
  --rtp-g2: rgba(255,255,255,.86);
  --rtp-g3: rgba(255,255,255,.95);
  --rtp-g-border: rgba(255,255,255,.90);
  --rtp-g-shine: #FFFFFF;
  --rtp-g-shadow: rgba(0,58,112,.08);
  --rtp-bg-base: #E8F4FB;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #BFE3F6 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #CFE9F8 0%, transparent 62%),
    linear-gradient(135deg, #E3F2FB 0%, #F4F9FD 55%, #DCEEF9 100%);

  /* texto */
  --rtp-t1: #0A2A4A;
  --rtp-t2: rgba(10,42,74,.62);
  --rtp-t3: rgba(10,42,74,.36);

  /* marca */
  --rtp-ink: #003A70;          /* sidebar, hero, chips activos (Navy) */
  --rtp-ink-2: #0B4F8F;
  --rtp-on-ink: #F2F9FE;
  --rtp-on-ink-2: rgba(242,249,254,.65);
  --rtp-mint: #7FCBF0;         /* acento suave, indicador del rail (Celeste) */
  --rtp-green: #1689CB;        /* color primario de datos: barras, progreso (Azul) */
  --rtp-peach: #CFE6F5;
  --rtp-orange: #2DABE2;       /* CTA (Cian) */
  --rtp-on-orange: #002845;
  --rtp-bar-off: #BFE0F3;      /* barras inactivas */
  --rtp-track: rgba(0,58,112,.07);

  /* semánticos (semáforo corporativo) */
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #1689CB;

  /* tiles pastel */
  --rtp-tile-mint: #A9DCF3;  --rtp-tile-salmon: #D6DDF5;  --rtp-tile-lime: #B8E8E4;  --rtp-tile-sky: #CFE6F5;
  --rtp-seg-3: #003A70;
  --rtp-blob-hi: #9FDDF7;  --rtp-blob-mid: #1689CB;  --rtp-blob-lo: #003A70;      /* blob azul */
  --rtp-blob2-hi: #B5F2EE; --rtp-blob2-mid: #2DABE2; --rtp-blob2-lo: #0B5C7A;     /* blob cian */
  --rtp-blob3-hi: #C9D1F7; --rtp-blob3-mid: #4B5FC0; --rtp-blob3-lo: #1B2A6E;     /* blob índigo */

  /* forma y elevación */
  --rtp-r-lg: 24px;  --rtp-r-md: 16px;  --rtp-r-sm: 12px;  --rtp-r-pill: 999px;
  --rtp-sh-card: 0 8px 30px rgba(0,58,112,.09);
  --rtp-sh-hover: 0 18px 44px rgba(0,58,112,.18);

  /* motion */
  --rtp-spring-smooth: linear(0, 0.012, 0.045, 0.09, 0.145, 0.204, 0.265, 0.326, 0.386, 0.443, 0.497, 0.548, 0.595, 0.638, 0.677, 0.713, 0.746, 0.775, 0.801, 0.825, 0.846, 0.865, 0.881, 0.896, 0.909, 0.92, 0.93, 0.939, 0.947, 0.954, 0.96, 0.965, 0.97, 0.974, 0.977, 0.98, 0.983, 0.985, 0.987, 0.989, 0.99, 0.992, 0.993, 0.994, 0.995, 0.995, 0.996, 0.997, 1);   /* amortiguado crítico: sin rebote */
  --rtp-spring-snappy: linear(0, 0.011, 0.042, 0.086, 0.139, 0.199, 0.262, 0.327, 0.391, 0.453, 0.512, 0.569, 0.621, 0.669, 0.713, 0.753, 0.789, 0.821, 0.85, 0.875, 0.897, 0.916, 0.932, 0.946, 0.958, 0.968, 0.976, 0.983, 0.989, 0.993, 0.997, 1, 1.002, 1.004, 1.005, 1.006, 1.006, 1.006, 1.006, 1.006, 1.006, 1.006, 1.005, 1.005, 1.005, 1.004, 1.004, 1.003, 1);   /* rebote casi imperceptible */
  --rtp-spring-bounce: linear(0, 0.011, 0.039, 0.082, 0.135, 0.196, 0.261, 0.329, 0.398, 0.466, 0.532, 0.595, 0.654, 0.709, 0.76, 0.806, 0.847, 0.883, 0.915, 0.942, 0.966, 0.986, 1.002, 1.015, 1.025, 1.033, 1.039, 1.043, 1.045, 1.046, 1.046, 1.045, 1.043, 1.041, 1.038, 1.035, 1.032, 1.029, 1.025, 1.022, 1.019, 1.017, 1.014, 1.012, 1.01, 1.008, 1.006, 1.004, 1);   /* rebote suave (~5%) */
  --rtp-spring: var(--rtp-spring-snappy);
  --rtp-ease-out: cubic-bezier(.22,1,.36,1);
  color-scheme: light;
}

/* ---------- Rotoplas oscuro (opcional) ---------- */
:root[data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #04111C;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(22,137,203,.38) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(45,171,226,.16) 0%, transparent 62%),
    linear-gradient(135deg, #061A2C 0%, #071420 55%, #0A1220 100%);
  --rtp-t1: rgba(240,248,254,.92);  --rtp-t2: rgba(240,248,254,.58);  --rtp-t3: rgba(240,248,254,.32);
  --rtp-ink: #0B3C66;  --rtp-ink-2: #124F85;
  --rtp-mint: #7FCBF0;  --rtp-green: #3DB4EC;  --rtp-orange: #2DABE2;
  --rtp-bar-off: rgba(127,203,240,.32);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #A8DCF5;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #5BB8F0;
  --rtp-tile-mint: #1B5F8A;  --rtp-tile-salmon: #2C4A86;  --rtp-tile-lime: #1D6B78;  --rtp-tile-sky: #2A5C86;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}

/* ---------- Paleta secundaria: MINT · data-rtp-palette="mint" ---------- */
:root[data-rtp-palette="mint"]{
  --rtp-g-shadow: rgba(18,48,42,.08);
  --rtp-bg-base: #E4F3EC;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #BDEBDD 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #F9D5BC 0%, transparent 62%),
    linear-gradient(135deg, #DDF2EA 0%, #F6F3EA 55%, #F9E3D2 100%);
  --rtp-t1: #12302A;  --rtp-t2: rgba(18,48,42,.58);  --rtp-t3: rgba(18,48,42,.34);
  --rtp-ink: #12302A;  --rtp-ink-2: #1D4B41;  --rtp-on-ink: #F4FBF8;  --rtp-on-ink-2: rgba(244,251,248,.62);
  --rtp-mint: #8FE3C8;  --rtp-green: #2E8B6E;  --rtp-peach: #F9DCC8;  --rtp-orange: #F59E5B;  --rtp-on-orange: #2B1A0B;
  --rtp-bar-off: #F8C9A8;  --rtp-track: rgba(18,48,42,.06);  --rtp-seg-3: var(--rtp-orange);
  --rtp-ok: #2E8B6E;  --rtp-warn: #E8913F;  --rtp-err: #E5604D;  --rtp-blue: #4A9BD1;
  --rtp-tile-mint: #9BE8CB;  --rtp-tile-salmon: #FDC9B0;  --rtp-tile-lime: #C9EBA8;  --rtp-tile-sky: #BFDDF2;
  --rtp-blob-hi: #9AF0D2;  --rtp-blob-mid: #2E9677;  --rtp-blob-lo: #0E4638;
  --rtp-blob2-hi: #9CC8F5; --rtp-blob2-mid: #35679E; --rtp-blob2-lo: #12283F;
  --rtp-blob3-hi: #F2A98A; --rtp-blob3-mid: #A8472D; --rtp-blob3-lo: #4A1B10;
  --rtp-sh-card: 0 8px 30px rgba(18,48,42,.08);  --rtp-sh-hover: 0 18px 44px rgba(18,48,42,.15);
}
:root[data-rtp-palette="mint"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #07120F;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(46,139,110,.38) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(245,158,91,.16) 0%, transparent 62%),
    linear-gradient(135deg, #0A1B16 0%, #0B1512 55%, #13120F 100%);
  --rtp-t1: rgba(244,251,248,.92);  --rtp-t2: rgba(244,251,248,.55);  --rtp-t3: rgba(244,251,248,.30);
  --rtp-ink: #123A31;  --rtp-ink-2: #18483D;
  --rtp-green: #4CC9A0;  --rtp-bar-off: rgba(245,158,91,.38);  --rtp-track: rgba(255,255,255,.07);
  --rtp-ok: #4CC9A0;  --rtp-warn: #F5A55B;  --rtp-err: #FF7A68;  --rtp-blue: #6DB6E8;
  --rtp-tile-mint: #2C7A63;  --rtp-tile-salmon: #9A5F48;  --rtp-tile-lime: #5D7F3E;  --rtp-tile-sky: #3E6B8C;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}

/* ---------- Paletas secundarias adicionales: Lavanda, Océano, Coral, Salvia (data-rtp-palette="<nombre>") ---------- */
/* Lavanda · claro */
:root[data-rtp-palette="lavanda"]{
  --rtp-g-shadow: rgba(43,42,107,.08);
  --rtp-bg-base: #EEEBFB;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #D9D1FA 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #FBD3E3 0%, transparent 62%),
    linear-gradient(135deg, #E9E4FB 0%, #F8F6FE 55%, #F6E5F0 100%);
  --rtp-t1: #1E1D4F;  --rtp-t2: rgba(30,29,79,.62);  --rtp-t3: rgba(30,29,79,.36);
  --rtp-ink: #2B2A6B;  --rtp-ink-2: #3B3A8A;  --rtp-on-ink: #F6F5FF;  --rtp-on-ink-2: rgba(246,245,255,.65);
  --rtp-mint: #B9A8F5;  --rtp-green: #5B54D6;  --rtp-peach: #E5DEFA;  --rtp-orange: #FF8FA3;  --rtp-on-orange: #4A0F1E;
  --rtp-bar-off: #D9D1FA;  --rtp-track: rgba(43,42,107,.07);  --rtp-seg-3: #2B2A6B;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #5B54D6;
  --rtp-tile-mint: #CFC4F7;  --rtp-tile-salmon: #FBCFE0;  --rtp-tile-lime: #C4E3F5;  --rtp-tile-sky: #E3DAFA;
  --rtp-blob-hi: #CDBFFB;  --rtp-blob-mid: #5B54D6;  --rtp-blob-lo: #2B2A6B;
  --rtp-blob2-hi: #FFC4D1; --rtp-blob2-mid: #E2658A; --rtp-blob2-lo: #6B1E3A;
  --rtp-blob3-hi: #BFE3F7; --rtp-blob3-mid: #3E8ED0; --rtp-blob3-lo: #173E6B;
  --rtp-sh-card: 0 8px 30px rgba(43,42,107,.09);  --rtp-sh-hover: 0 18px 44px rgba(43,42,107,.18);
}
/* Lavanda · oscuro */
:root[data-rtp-palette="lavanda"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #0D0C22;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(91,84,214,.38) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(255,143,163,.14) 0%, transparent 62%),
    linear-gradient(135deg, #14123A 0%, #0E0D26 55%, #17101F 100%);
  --rtp-t1: rgba(246,245,255,.92);  --rtp-t2: rgba(246,245,255,.58);  --rtp-t3: rgba(246,245,255,.32);
  --rtp-ink: #2A2870;  --rtp-ink-2: #38368C;
  --rtp-green: #8F88F5;  --rtp-orange: #FF8FA3;
  --rtp-bar-off: rgba(185,168,245,.32);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #CFC8FA;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #8F88F5;
  --rtp-tile-mint: #3B3590;  --rtp-tile-salmon: #6B2F55;  --rtp-tile-lime: #2C4E78;  --rtp-tile-sky: #4A3F8C;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}
/* Océano · claro */
:root[data-rtp-palette="oceano"]{
  --rtp-g-shadow: rgba(11,59,74,.08);
  --rtp-bg-base: #E6F5F7;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #BCE8EE 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #FBE6C4 0%, transparent 62%),
    linear-gradient(135deg, #DDF1F4 0%, #F4FAFB 55%, #FBEFD9 100%);
  --rtp-t1: #0A2E3A;  --rtp-t2: rgba(10,46,58,.62);  --rtp-t3: rgba(10,46,58,.36);
  --rtp-ink: #0B3B4A;  --rtp-ink-2: #14566B;  --rtp-on-ink: #F0FAFC;  --rtp-on-ink-2: rgba(240,250,252,.65);
  --rtp-mint: #8FE0E6;  --rtp-green: #0E8FA3;  --rtp-peach: #D4EEF2;  --rtp-orange: #FFB347;  --rtp-on-orange: #3A2200;
  --rtp-bar-off: #BDE6EB;  --rtp-track: rgba(11,59,74,.07);  --rtp-seg-3: #0B3B4A;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #0E8FA3;
  --rtp-tile-mint: #A8E3EA;  --rtp-tile-salmon: #FCD9A8;  --rtp-tile-lime: #BDEBD7;  --rtp-tile-sky: #CBE3F5;
  --rtp-blob-hi: #9AE7EE;  --rtp-blob-mid: #0E8FA3;  --rtp-blob-lo: #0B3B4A;
  --rtp-blob2-hi: #FFD99A; --rtp-blob2-mid: #E8921F; --rtp-blob2-lo: #6B3A00;
  --rtp-blob3-hi: #A9EBD2; --rtp-blob3-mid: #2BA37B; --rtp-blob3-lo: #0E4A38;
  --rtp-sh-card: 0 8px 30px rgba(11,59,74,.09);  --rtp-sh-hover: 0 18px 44px rgba(11,59,74,.18);
}
/* Océano · oscuro */
:root[data-rtp-palette="oceano"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #04141A;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(14,143,163,.36) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(255,179,71,.12) 0%, transparent 62%),
    linear-gradient(135deg, #06222B 0%, #071820 55%, #0F1712 100%);
  --rtp-t1: rgba(240,250,252,.92);  --rtp-t2: rgba(240,250,252,.58);  --rtp-t3: rgba(240,250,252,.32);
  --rtp-ink: #0E4A5C;  --rtp-ink-2: #16627A;
  --rtp-green: #2FC0D6;  --rtp-orange: #FFB347;
  --rtp-bar-off: rgba(143,224,230,.32);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #BDEFF4;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #2FC0D6;
  --rtp-tile-mint: #1A6677;  --rtp-tile-salmon: #7A5A22;  --rtp-tile-lime: #1F6B55;  --rtp-tile-sky: #2C5878;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}
/* Coral · claro */
:root[data-rtp-palette="coral"]{
  --rtp-g-shadow: rgba(74,31,43,.08);
  --rtp-bg-base: #FDEFE8;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #FFD9C8 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #F9D3DC 0%, transparent 62%),
    linear-gradient(135deg, #FCE6DC 0%, #FFF7F2 55%, #F9E0E5 100%);
  --rtp-t1: #3D1822;  --rtp-t2: rgba(61,24,34,.62);  --rtp-t3: rgba(61,24,34,.36);
  --rtp-ink: #4A1F2B;  --rtp-ink-2: #6A2E40;  --rtp-on-ink: #FFF6F3;  --rtp-on-ink-2: rgba(255,246,243,.65);
  --rtp-mint: #FFC9B5;  --rtp-green: #E5604D;  --rtp-peach: #FFE3D6;  --rtp-orange: #F2B134;  --rtp-on-orange: #3A2600;
  --rtp-bar-off: #FFD3C2;  --rtp-track: rgba(74,31,43,.07);  --rtp-seg-3: #4A1F2B;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #E5604D;
  --rtp-tile-mint: #FFCDB8;  --rtp-tile-salmon: #F9CBD6;  --rtp-tile-lime: #FFE3A6;  --rtp-tile-sky: #F4D7C8;
  --rtp-blob-hi: #FFC1AE;  --rtp-blob-mid: #E5604D;  --rtp-blob-lo: #6B1F18;
  --rtp-blob2-hi: #FFE19A; --rtp-blob2-mid: #E0A100; --rtp-blob2-lo: #6B4A00;
  --rtp-blob3-hi: #FBC1D2; --rtp-blob3-mid: #C93B6A; --rtp-blob3-lo: #5A1430;
  --rtp-sh-card: 0 8px 30px rgba(74,31,43,.09);  --rtp-sh-hover: 0 18px 44px rgba(74,31,43,.18);
}
/* Coral · oscuro */
:root[data-rtp-palette="coral"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #1A0A0E;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(229,96,77,.32) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(242,177,52,.12) 0%, transparent 62%),
    linear-gradient(135deg, #260F15 0%, #1B0B10 55%, #1E120A 100%);
  --rtp-t1: rgba(255,246,243,.92);  --rtp-t2: rgba(255,246,243,.58);  --rtp-t3: rgba(255,246,243,.32);
  --rtp-ink: #6A2638;  --rtp-ink-2: #823248;
  --rtp-green: #FF8A76;  --rtp-orange: #F2B134;
  --rtp-bar-off: rgba(255,201,181,.30);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #FFD3C2;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #FF8A76;
  --rtp-tile-mint: #7A3A2C;  --rtp-tile-salmon: #7A2F48;  --rtp-tile-lime: #7A5A1C;  --rtp-tile-sky: #6A3E34;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}
/* Salvia · claro */
:root[data-rtp-palette="salvia"]{
  --rtp-g-shadow: rgba(42,58,44,.08);
  --rtp-bg-base: #EEF3EA;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #D5E5D0 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #F6DFCF 0%, transparent 62%),
    linear-gradient(135deg, #E6EFE1 0%, #F7F9F3 55%, #F4E6DA 100%);
  --rtp-t1: #1F2D22;  --rtp-t2: rgba(31,45,34,.62);  --rtp-t3: rgba(31,45,34,.36);
  --rtp-ink: #2A3A2C;  --rtp-ink-2: #3E5640;  --rtp-on-ink: #F5F9F3;  --rtp-on-ink-2: rgba(245,249,243,.65);
  --rtp-mint: #CFE3CF;  --rtp-green: #6E9A72;  --rtp-peach: #EBDCCB;  --rtp-orange: #D9825B;  --rtp-on-orange: #3A1A0B;
  --rtp-bar-off: #EAD3C3;  --rtp-track: rgba(42,58,44,.07);  --rtp-seg-3: #2A3A2C;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #6E9A72;
  --rtp-tile-mint: #CFE3CF;  --rtp-tile-salmon: #F0D5C3;  --rtp-tile-lime: #DCE8B8;  --rtp-tile-sky: #D3E1E6;
  --rtp-blob-hi: #BFE0C2;  --rtp-blob-mid: #6E9A72;  --rtp-blob-lo: #2A3A2C;
  --rtp-blob2-hi: #F3C5AE; --rtp-blob2-mid: #D9825B; --rtp-blob2-lo: #5E2A12;
  --rtp-blob3-hi: #C9DDE6; --rtp-blob3-mid: #5C8DA8; --rtp-blob3-lo: #1E3A4A;
  --rtp-sh-card: 0 8px 30px rgba(42,58,44,.09);  --rtp-sh-hover: 0 18px 44px rgba(42,58,44,.18);
}
/* Salvia · oscuro */
:root[data-rtp-palette="salvia"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #0B120C;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(110,154,114,.32) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(217,130,91,.12) 0%, transparent 62%),
    linear-gradient(135deg, #101B12 0%, #0B130D 55%, #16110C 100%);
  --rtp-t1: rgba(245,249,243,.92);  --rtp-t2: rgba(245,249,243,.58);  --rtp-t3: rgba(245,249,243,.32);
  --rtp-ink: #2F4A33;  --rtp-ink-2: #3E5F43;
  --rtp-green: #8FC194;  --rtp-orange: #E8946B;
  --rtp-bar-off: rgba(207,227,207,.28);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #CFE3CF;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #8FC194;
  --rtp-tile-mint: #3A5C40;  --rtp-tile-salmon: #7A4A34;  --rtp-tile-lime: #58702F;  --rtp-tile-sky: #3A5A66;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}

/* ---------- Paletas secundarias adicionales: Grafito y Ámbar ---------- */
/* Grafito · claro */
:root[data-rtp-palette="grafito"]{
  --rtp-g-shadow: rgba(35,39,47,.08);
  --rtp-bg-base: #EEF0F3;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #D5DAE2 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #E3EBD0 0%, transparent 62%),
    linear-gradient(135deg, #E8EBF0 0%, #F7F8FA 55%, #EDF0E6 100%);
  --rtp-t1: #1B1F26;  --rtp-t2: rgba(27,31,38,.62);  --rtp-t3: rgba(27,31,38,.36);
  --rtp-ink: #23272F;  --rtp-ink-2: #343A46;  --rtp-on-ink: #F4F6F8;  --rtp-on-ink-2: rgba(244,246,248,.65);
  --rtp-mint: #CBD5E1;  --rtp-green: #475569;  --rtp-peach: #E2E8F0;  --rtp-orange: #C8F169;  --rtp-on-orange: #1B2A00;
  --rtp-bar-off: #D5DBE3;  --rtp-track: rgba(35,39,47,.07);  --rtp-seg-3: #23272F;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #475569;
  --rtp-tile-mint: #CBD5E1;  --rtp-tile-salmon: #E3EBC9;  --rtp-tile-lime: #D9DEE7;  --rtp-tile-sky: #E8E2D6;
  --rtp-blob-hi: #CBD5E1;  --rtp-blob-mid: #475569;  --rtp-blob-lo: #1F2937;
  --rtp-blob2-hi: #E3F7A8; --rtp-blob2-mid: #8FB82E; --rtp-blob2-lo: #3C5210;
  --rtp-blob3-hi: #BFD3EA; --rtp-blob3-mid: #4A6FA5; --rtp-blob3-lo: #1B2F4A;
  --rtp-sh-card: 0 8px 30px rgba(35,39,47,.09);  --rtp-sh-hover: 0 18px 44px rgba(35,39,47,.18);
}
/* Grafito · oscuro */
:root[data-rtp-palette="grafito"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #0C0E12;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(100,116,139,.30) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(200,241,105,.10) 0%, transparent 62%),
    linear-gradient(135deg, #14171D 0%, #0D0F13 55%, #11140D 100%);
  --rtp-t1: rgba(244,246,248,.92);  --rtp-t2: rgba(244,246,248,.58);  --rtp-t3: rgba(244,246,248,.32);
  --rtp-ink: #2B313B;  --rtp-ink-2: #394150;
  --rtp-green: #94A3B8;  --rtp-orange: #C8F169;
  --rtp-bar-off: rgba(203,213,225,.28);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #CBD5E1;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #94A3B8;
  --rtp-tile-mint: #3A4352;  --rtp-tile-salmon: #4D5A2E;  --rtp-tile-lime: #334155;  --rtp-tile-sky: #4A4538;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}
/* Ámbar · claro */
:root[data-rtp-palette="ambar"]{
  --rtp-g-shadow: rgba(59,42,15,.08);
  --rtp-bg-base: #FBF3E0;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #FFE3A8 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #CDE9EC 0%, transparent 62%),
    linear-gradient(135deg, #FBEBC8 0%, #FFF9EC 55%, #E3F0EE 100%);
  --rtp-t1: #33230A;  --rtp-t2: rgba(51,35,10,.62);  --rtp-t3: rgba(51,35,10,.36);
  --rtp-ink: #3B2A0F;  --rtp-ink-2: #5A4119;  --rtp-on-ink: #FFF8EA;  --rtp-on-ink-2: rgba(255,248,234,.65);
  --rtp-mint: #FFD98A;  --rtp-green: #D98E04;  --rtp-peach: #FFEBC2;  --rtp-orange: #1F7A8C;  --rtp-on-orange: #FFFFFF;
  --rtp-bar-off: #F5DFB0;  --rtp-track: rgba(59,42,15,.07);  --rtp-seg-3: #3B2A0F;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #D98E04;
  --rtp-tile-mint: #FFE2A1;  --rtp-tile-salmon: #CDE9EC;  --rtp-tile-lime: #F5D3B0;  --rtp-tile-sky: #E7E3B4;
  --rtp-blob-hi: #FFE099;  --rtp-blob-mid: #D98E04;  --rtp-blob-lo: #5A3A00;
  --rtp-blob2-hi: #A9E3EA; --rtp-blob2-mid: #1F7A8C; --rtp-blob2-lo: #0B3A44;
  --rtp-blob3-hi: #F0C7A4; --rtp-blob3-mid: #B8693A; --rtp-blob3-lo: #4A2210;
  --rtp-sh-card: 0 8px 30px rgba(59,42,15,.09);  --rtp-sh-hover: 0 18px 44px rgba(59,42,15,.18);
}
/* Ámbar · oscuro */
:root[data-rtp-palette="ambar"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #140E05;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(217,142,4,.30) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(31,122,140,.16) 0%, transparent 62%),
    linear-gradient(135deg, #201607 0%, #150F06 55%, #0C1416 100%);
  --rtp-t1: rgba(255,248,234,.92);  --rtp-t2: rgba(255,248,234,.58);  --rtp-t3: rgba(255,248,234,.32);
  --rtp-ink: #5A4119;  --rtp-ink-2: #6F5120;
  --rtp-green: #F0AE2E;  --rtp-orange: #23909F;
  --rtp-bar-off: rgba(255,217,138,.30);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #FFE3A8;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #F0AE2E;
  --rtp-tile-mint: #6B4E12;  --rtp-tile-salmon: #1D5C69;  --rtp-tile-lime: #6A4524;  --rtp-tile-sky: #58542A;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}

/* ---------- Paletas secundarias adicionales: Orquídea y Zafiro ---------- */
/* Orquídea · claro */
:root[data-rtp-palette="orquidea"]{
  --rtp-g-shadow: rgba(74,16,72,.08);
  --rtp-bg-base: #FBEAF6;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #F6C9EA 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #E3D3FA 0%, transparent 62%),
    linear-gradient(135deg, #F8DDF0 0%, #FEF6FB 55%, #F0E1F7 100%);
  --rtp-t1: #3B0F39;  --rtp-t2: rgba(59,15,57,.62);  --rtp-t3: rgba(59,15,57,.36);
  --rtp-ink: #4A1048;  --rtp-ink-2: #6A1E68;  --rtp-on-ink: #FFF5FD;  --rtp-on-ink-2: rgba(255,245,253,.65);
  --rtp-mint: #F5B8F0;  --rtp-green: #C026D3;  --rtp-peach: #F9DDF5;  --rtp-orange: #2EC4B6;  --rtp-on-orange: #00322D;
  --rtp-bar-off: #EDC9E8;  --rtp-track: rgba(74,16,72,.07);  --rtp-seg-3: #4A1048;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #C026D3;
  --rtp-tile-mint: #F2C4EC;  --rtp-tile-salmon: #FFD3DF;  --rtp-tile-lime: #D6C8F5;  --rtp-tile-sky: #C7EDE8;
  --rtp-blob-hi: #F5B8F0;  --rtp-blob-mid: #C026D3;  --rtp-blob-lo: #4A1048;
  --rtp-blob2-hi: #A8F0E6; --rtp-blob2-mid: #2EC4B6; --rtp-blob2-lo: #0B4A44;
  --rtp-blob3-hi: #FFC4D6; --rtp-blob3-mid: #E0447A; --rtp-blob3-lo: #5E1230;
  --rtp-sh-card: 0 8px 30px rgba(74,16,72,.09);  --rtp-sh-hover: 0 18px 44px rgba(74,16,72,.18);
}
/* Orquídea · oscuro */
:root[data-rtp-palette="orquidea"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #16081A;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(192,38,211,.34) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(46,196,182,.12) 0%, transparent 62%),
    linear-gradient(135deg, #220C28 0%, #16081A 55%, #0C1618 100%);
  --rtp-t1: rgba(255,245,253,.92);  --rtp-t2: rgba(255,245,253,.58);  --rtp-t3: rgba(255,245,253,.32);
  --rtp-ink: #5E1A5C;  --rtp-ink-2: #772376;
  --rtp-green: #E36CF2;  --rtp-orange: #2EC4B6;
  --rtp-bar-off: rgba(245,184,240,.30);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #F8CFF3;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #E36CF2;
  --rtp-tile-mint: #6A2468;  --rtp-tile-salmon: #7A2F4A;  --rtp-tile-lime: #4A3C8A;  --rtp-tile-sky: #1F6F68;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}
/* Zafiro · claro */
:root[data-rtp-palette="zafiro"]{
  --rtp-g-shadow: rgba(13,27,62,.08);
  --rtp-bg-base: #ECF0FB;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, #C3D0FA 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, #CDF5EE 0%, transparent 62%),
    linear-gradient(135deg, #E3E9FB 0%, #F6F8FE 55%, #E4F6F3 100%);
  --rtp-t1: #0D1B3E;  --rtp-t2: rgba(13,27,62,.62);  --rtp-t3: rgba(13,27,62,.36);
  --rtp-ink: #0D1B3E;  --rtp-ink-2: #1A2F66;  --rtp-on-ink: #F3F6FF;  --rtp-on-ink-2: rgba(243,246,255,.65);
  --rtp-mint: #B4C4FF;  --rtp-green: #2F5BFF;  --rtp-peach: #DCE4FF;  --rtp-orange: #00E0C6;  --rtp-on-orange: #003A33;
  --rtp-bar-off: #CBD6FA;  --rtp-track: rgba(13,27,62,.07);  --rtp-seg-3: #0D1B3E;
  --rtp-ok: #2E8540;  --rtp-warn: #E0A100;  --rtp-err: #C8102E;  --rtp-blue: #2F5BFF;
  --rtp-tile-mint: #C3D0FA;  --rtp-tile-salmon: #CDF5EE;  --rtp-tile-lime: #D6CCF7;  --rtp-tile-sky: #DDE6FA;
  --rtp-blob-hi: #B4C4FF;  --rtp-blob-mid: #2F5BFF;  --rtp-blob-lo: #0D1B3E;
  --rtp-blob2-hi: #A6F5EA; --rtp-blob2-mid: #00B8A3; --rtp-blob2-lo: #00403A;
  --rtp-blob3-hi: #D3C6FA; --rtp-blob3-mid: #7A5CE0; --rtp-blob3-lo: #2B1A6B;
  --rtp-sh-card: 0 8px 30px rgba(13,27,62,.09);  --rtp-sh-hover: 0 18px 44px rgba(13,27,62,.18);
}
/* Zafiro · oscuro */
:root[data-rtp-palette="zafiro"][data-rtp-theme="dark"]{
  --rtp-g1: rgba(255,255,255,.06);  --rtp-g2: rgba(255,255,255,.10);  --rtp-g3: rgba(255,255,255,.14);
  --rtp-g-border: rgba(255,255,255,.10);  --rtp-g-shine: rgba(255,255,255,.22);  --rtp-g-shadow: rgba(0,0,0,.50);
  --rtp-bg-base: #060B1C;
  --rtp-body-bg:
    radial-gradient(60% 50% at 0% 0%, rgba(47,91,255,.38) 0%, transparent 62%),
    radial-gradient(50% 50% at 100% 100%, rgba(0,224,198,.12) 0%, transparent 62%),
    linear-gradient(135deg, #0B1230 0%, #070C1E 55%, #08141A 100%);
  --rtp-t1: rgba(243,246,255,.92);  --rtp-t2: rgba(243,246,255,.58);  --rtp-t3: rgba(243,246,255,.32);
  --rtp-ink: #16296A;  --rtp-ink-2: #1F3A8A;
  --rtp-green: #7C9BFF;  --rtp-orange: #00E0C6;
  --rtp-bar-off: rgba(180,196,255,.30);  --rtp-track: rgba(255,255,255,.07);  --rtp-seg-3: #C6D3FF;
  --rtp-ok: #4CC27A;  --rtp-warn: #F2BC3A;  --rtp-err: #FF6B7D;  --rtp-blue: #7C9BFF;
  --rtp-tile-mint: #243E96;  --rtp-tile-salmon: #0F5E58;  --rtp-tile-lime: #4A3C9A;  --rtp-tile-sky: #2E4E8F;
  --rtp-sh-card: 0 8px 30px rgba(0,0,0,.40);  --rtp-sh-hover: 0 18px 44px rgba(0,0,0,.55);
  --rtp-av-fg: #F4FBF8;  color-scheme: dark;
}

@supports not (transition-timing-function: linear(0, 1)){
  :root{ --rtp-spring-smooth: cubic-bezier(.22,1,.36,1); --rtp-spring-snappy: cubic-bezier(.25,1,.5,1); --rtp-spring-bounce: cubic-bezier(.34,1.2,.64,1); }
}

/* ---------- Base ---------- */
/* Los íconos del sprite (.rtp-ic) y los de Lucide (.lucide) comparten tamaño y trazo */
.rtp-ic, .lucide{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.rtp-ic-sm, .lucide.ic-sm{ width:14px; height:14px; }
.rtp-ic-lg, .lucide.ic-lg{ width:24px; height:24px; }
.rtp-serif{ font-family:var(--rtp-font-serif); font-style:italic; font-weight:400; letter-spacing:0; }
.rtp-num{ font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.rtp-label{ font-size:11px; font-weight:500; color:var(--rtp-t2); }

/* ---------- Card glass ---------- */
.rtp-card{
  background:var(--rtp-g1);
  -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid var(--rtp-g-border); border-top-color:var(--rtp-g-shine);
  border-radius:var(--rtp-r-lg); box-shadow:var(--rtp-sh-card);
  padding:18px; min-width:0; position:relative;
}
/* Alzado, luz del borde, hover e inclinación son NATIVOS: no dependen de clases que añada JavaScript (seguro para la hidratación de React 19) */
.rtp-lift, .rtp-card, .rtp-tile{ transition:transform .35s var(--rtp-spring), box-shadow .35s var(--rtp-ease-out); }
.rtp-lift:hover, .rtp-card:hover, .rtp-tile:hover{ transform:translateY(-5px); box-shadow:var(--rtp-sh-hover); }  /* = whileHover { y: -5 } */
.rtp-card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; font-size:13px; font-weight:600; }

/* ---------- Layout ---------- */
.rtp-shell{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:18px; align-items:stretch; }
.rtp-dash{ display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:16px; align-items:start; }
.rtp-col{ display:grid; gap:16px; min-width:0; }
.rtp-row3{ display:grid; grid-template-columns:1.2fr 1fr .6fr; gap:16px; }
.rtp-row2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* ---------- Rail (sidebar píldora) ---------- */
.rtp-rail{
  position:relative; background:var(--rtp-ink); color:var(--rtp-on-ink);
  width:60px; border-radius:30px; padding:14px 0; min-height:min(560px, calc(100vh - 32px)); min-height:min(560px, calc(100dvh - 32px));
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); max-width:calc(100vw - 24px);   /* nunca sobrepasa la pantalla: lo que no cabe se desplaza por dentro */
  display:flex; flex-direction:column; align-items:center; gap:6px;
  transition:width .6s var(--rtp-spring-smooth), padding .6s var(--rtp-spring-smooth);
  box-shadow:0 12px 34px rgba(18,48,42,.28);
}
.rtp-logo{ font-family:var(--rtp-font-serif); font-style:italic; font-size:22px; line-height:1; margin-bottom:10px; color:var(--rtp-on-ink); }
/* El logo "//" es también el botón de menú (hamburguesa): expande y contrae el sidebar */
.rtp-rail-toggle{
  display:flex; align-items:center; justify-content:center; gap:0; width:40px; height:36px; padding:0; border:0; border-radius:12px; background:transparent; cursor:pointer;
  font:italic 22px/1 var(--rtp-font-serif); color:var(--rtp-on-ink); transition:background .3s var(--rtp-ease-out), width .6s var(--rtp-spring-smooth);
}
.rtp-rail-toggle:hover{ background:rgba(255,255,255,.1); }
.rtp-rail-toggle .rtp-ic{ width:20px; height:20px; transition:fill .35s var(--rtp-ease-out), transform .5s var(--rtp-spring-snappy); }
.rtp-rail-toggle:hover .rtp-ic{ transform:translateY(-1px) scale(1.08); }
.rtp-rail.is-expanded .rtp-rail-toggle .rtp-ic{ fill:color-mix(in srgb, var(--rtp-mint) 55%, transparent); stroke:var(--rtp-mint); }
/* el nombre del menú va en la tipografía de acento del sistema: Instrument Serif cursiva */
.rtp-rail-toggle .rtp-rail-label{ font:italic 400 24px/1 var(--rtp-font-serif); letter-spacing:0; }
.rtp-spacer{ flex:1; }
.rtp-rail-btn{
  position:relative; width:40px; height:40px; border-radius:14px; border:0; background:transparent; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:0; color:var(--rtp-on-ink-2);
  transform:translateY(var(--rtp-y,0px)) scale(var(--rtp-s,1));
  transition:background .3s var(--rtp-ease-out), color .3s var(--rtp-ease-out), width .6s var(--rtp-spring-smooth), gap .45s var(--rtp-spring-smooth);
}
.rtp-rail-btn:hover{ color:var(--rtp-on-ink); }
.rtp-rail-btn[aria-current="true"]{ color:var(--rtp-ink); }
.rtp-rail-ind{
  position:absolute; z-index:0; top:0; left:0; right:0; bottom:0; border-radius:14px; background:var(--rtp-mint); pointer-events:none;
  box-shadow:0 8px 18px rgba(0,0,0,.18);
  transition:top .6s var(--rtp-spring-smooth), bottom .6s var(--rtp-spring-smooth), left .6s var(--rtp-spring-smooth), right .6s var(--rtp-spring-smooth);
}
/* mismo estiramiento direccional que el calendario: el borde delantero avanza primero y el trasero lo alcanza */
.rtp-rail-ind.to-down{ transition:top .72s var(--rtp-spring-smooth) .05s, bottom .42s var(--rtp-spring-snappy), left .6s var(--rtp-spring-smooth), right .6s var(--rtp-spring-smooth); }
.rtp-rail-ind.to-up{ transition:top .42s var(--rtp-spring-snappy), bottom .72s var(--rtp-spring-smooth) .05s, left .6s var(--rtp-spring-smooth), right .6s var(--rtp-spring-smooth); }
.rtp-rail-ind.to-right{ transition:left .72s var(--rtp-spring-smooth) .05s, right .42s var(--rtp-spring-snappy), top .6s var(--rtp-spring-smooth), bottom .6s var(--rtp-spring-smooth); }
.rtp-rail-ind.to-left{ transition:left .42s var(--rtp-spring-snappy), right .72s var(--rtp-spring-smooth) .05s, top .6s var(--rtp-spring-smooth), bottom .6s var(--rtp-spring-smooth); }
.rtp-rail-ind::after{  /* muesca lateral del ítem activo */
  content:""; position:absolute; right:-17px; top:50%; width:7px; height:16px; margin-top:-8px;
  background:var(--rtp-ink); border-radius:0 8px 8px 0;
}
.rtp-rail-active{ position:absolute; inset:0; border-radius:14px; background:var(--rtp-mint); z-index:0; } /* variante layoutId (React) */
.rtp-rail-btn .rtp-ic{ position:relative; z-index:1; }

/* ---------- Hero ---------- */
.rtp-hero{
  background:var(--rtp-ink); color:var(--rtp-on-ink); border-color:transparent; padding:22px;
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:16px;
}
.rtp-hero h2{ margin:0; font-size:clamp(20px,3vw,28px); font-weight:600; letter-spacing:-.02em; }
.rtp-hero p{ margin:6px 0 14px; font-size:11px; color:var(--rtp-on-ink-2); max-width:34ch; }
.rtp-avatars{ display:flex; align-items:center; }
.rtp-avatars .rtp-av{ margin-left:-8px; border:2px solid var(--rtp-ink); }
.rtp-avatars .rtp-av:first-child{ margin-left:0; }
.rtp-online{ font-size:10px; color:var(--rtp-on-ink-2); margin-top:8px; text-align:right; display:flex; align-items:center; gap:6px; justify-content:flex-end; }
.rtp-dot{ width:6px; height:6px; border-radius:50%; background:var(--rtp-orange); display:inline-block; }

/* ---------- Avatares ---------- */
.rtp-av{
  width:34px; height:34px; border-radius:50%; display:grid; place-items:center; flex:none;
  font-size:11px; font-weight:700; color:var(--rtp-av-fg,var(--rtp-ink)); background:linear-gradient(135deg,var(--rtp-tile-mint),var(--rtp-tile-sky));
}
.rtp-av.b{ background:linear-gradient(135deg,var(--rtp-tile-salmon),var(--rtp-peach)); }
.rtp-av.c{ background:linear-gradient(135deg,var(--rtp-tile-lime),var(--rtp-tile-mint)); }
.rtp-av.d{ background:linear-gradient(135deg,var(--rtp-tile-sky),var(--rtp-tile-salmon)); }
.rtp-av-lg{ width:52px; height:52px; font-size:14px; box-shadow:0 0 0 3px var(--rtp-g3); }

/* ---------- Botones, chips, badges ---------- */
.rtp-btn{
  display:inline-flex; align-items:center; gap:6px; border:0; cursor:pointer; font:600 12px var(--rtp-font);
  padding:9px 16px; min-height:var(--rtp-ctl-h, 38px); border-radius:var(--rtp-r-pill); background:var(--rtp-ink); color:var(--rtp-on-ink);
  transition:transform .3s var(--rtp-spring), box-shadow .3s var(--rtp-ease-out);
}
.rtp-btn:hover{ transform:translateY(-2px); box-shadow:0 8px 20px rgba(18,48,42,.22); }
.rtp-btn-accent{ background:var(--rtp-orange); color:var(--rtp-on-orange); }
.rtp-btn-mint{ background:var(--rtp-mint); color:var(--rtp-ink); }
.rtp-btn-ghost{ background:var(--rtp-g2); color:var(--rtp-t1); border:1px solid var(--rtp-g-border); }
.rtp-chip{
  border:0; cursor:pointer; font:600 11px var(--rtp-font); padding:6px 14px; border-radius:var(--rtp-r-pill);
  background:var(--rtp-g2); color:var(--rtp-t2); transition:background .25s, color .25s, transform .25s var(--rtp-spring);
}
.rtp-chip:hover{ transform:translateY(-1px); color:var(--rtp-t1); }
.rtp-chip[aria-pressed="true"]{ background:var(--rtp-ink); color:var(--rtp-on-ink); }
.rtp-chips{ display:flex; gap:6px; flex-wrap:wrap; }
.rtp-badge{
  display:inline-flex; align-items:center; gap:5px; font-size:10px; font-weight:700; padding:3px 9px; border-radius:var(--rtp-r-pill);
  color:var(--rtp-c,var(--rtp-t2)); background:color-mix(in srgb, var(--rtp-c,var(--rtp-t2)) 14%, transparent);
  border:1px solid color-mix(in srgb, var(--rtp-c,var(--rtp-t2)) 28%, transparent);
}
.rtp-badge.ok{ --rtp-c:var(--rtp-ok); } .rtp-badge.warn{ --rtp-c:var(--rtp-warn); } .rtp-badge.err{ --rtp-c:var(--rtp-err); } .rtp-badge.info{ --rtp-c:var(--rtp-blue); }
.rtp-pill-dark{ background:var(--rtp-ink); color:var(--rtp-on-ink); font-size:10px; font-weight:600; padding:3px 9px; border-radius:var(--rtp-r-pill); }

/* ---------- Stat ---------- */
.rtp-stat .rtp-num{ font-size:34px; font-weight:600; line-height:1.1; margin:6px 0 4px; }
.rtp-stat .rtp-label{ display:flex; align-items:center; gap:6px; }
.rtp-seg{ display:flex; gap:3px; height:8px; margin:12px 0 8px; }
.rtp-seg i{ display:block; border-radius:99px; height:100%; flex:var(--rtp-f,1); background:var(--rtp-c,var(--rtp-green)); }
.rtp-legend{ display:flex; justify-content:space-between; font-size:10px; color:var(--rtp-t2); font-weight:600; }
.rtp-legend span::before{ content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--rtp-c); margin-right:5px; }
.rtp-ticks{ position:relative; display:grid; grid-template-columns:repeat(40,1fr); gap:2px; height:12px; margin:24px 0 14px; }
.rtp-ticks i{ border-radius:2px; background:var(--rtp-track); transform:scaleY(var(--rtp-s,1)); transform-origin:bottom; transition:transform .2s var(--rtp-ease-out), background .45s var(--rtp-ease-out); }
.rtp-ticks i.on{ background:var(--rtp-green); }
.rtp-ticks-tip{ position:absolute; bottom:calc(100% + 18px); transform:translateX(-50%); background:var(--rtp-ink); color:var(--rtp-on-ink); font:600 10px var(--rtp-font); padding:3px 8px; border-radius:var(--rtp-r-pill); white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .2s; }
.rtp-ticks-tip.show{ opacity:1; }
.rtp-mini{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rtp-mini > div{ background:var(--rtp-track); border-radius:var(--rtp-r-md); padding:14px; text-align:center; font-size:11px; color:var(--rtp-t2); }
.rtp-mini b{ display:block; font-size:22px; color:var(--rtp-t1); font-weight:600; margin:6px 0 2px; }

/* ---------- Impact (3 barras píldora) ---------- */
.rtp-impact{ display:flex; align-items:flex-end; justify-content:center; gap:8px; height:110px; }
.rtp-impact i{ width:22px; border-radius:99px; background:var(--rtp-bar-off); height:0; transition:height 1s var(--rtp-ease-out); }
.rtp-impact i:nth-child(2){ background:var(--rtp-green); }
.rtp-ready .rtp-impact i{ height:var(--rtp-h); }

/* ---------- Barras semanales ---------- */
.rtp-bars{ display:grid; grid-template-columns:repeat(7,1fr); gap:10px; align-items:end; }
.rtp-bar{ display:flex; flex-direction:column; align-items:center; gap:8px; position:relative; }
.rtp-bar-track{ width:100%; max-width:30px; height:130px; border-radius:99px; background:var(--rtp-track); display:flex; align-items:flex-end; overflow:hidden; }
.rtp-bar-fill{ width:100%; height:0; border-radius:99px; background:var(--rtp-bar-off); transition:height 1s var(--rtp-ease-out); }
.rtp-bar[aria-current="true"] .rtp-bar-fill{ background:var(--rtp-green); }
.rtp-ready .rtp-bar-fill{ height:var(--rtp-h); }
.rtp-bar .rtp-label{ font-size:10px; }
.rtp-bar-tip{ position:absolute; top:-8px; transform:translateY(-100%); background:var(--rtp-ink); color:var(--rtp-on-ink); font-size:10px; font-weight:700; padding:3px 8px; border-radius:var(--rtp-r-pill); white-space:nowrap; }
.rtp-bars-wrap{ padding-top:26px; }

/* ---------- Semana / calendario ---------- */
.rtp-week{ display:grid; grid-template-columns:repeat(6,1fr); gap:6px; text-align:center; }
.rtp-day{ border:0; background:transparent; cursor:pointer; font:600 12px var(--rtp-font); color:var(--rtp-t1); padding:8px 0 6px; border-radius:var(--rtp-r-sm); display:flex; flex-direction:column; align-items:center; gap:4px; position:relative; z-index:1; transition:color .22s var(--rtp-ease-out) .08s, transform .25s var(--rtp-spring); }
.rtp-day small{ font-size:9px; font-weight:500; color:var(--rtp-t2); }
.rtp-day:hover{ transform:translateY(-2px); }
.rtp-day[aria-pressed="true"]{ background:transparent; color:var(--rtp-on-ink); }
.rtp-day[aria-pressed="true"] small{ color:var(--rtp-on-ink-2); }
.rtp-day em{ width:3px; height:3px; border-radius:50%; background:currentColor; opacity:.5; display:block; }

/* ---------- Tabs ---------- */
.rtp-tabs{ display:flex; gap:14px; border-bottom:1px solid var(--rtp-track); margin-bottom:10px; }
.rtp-tab{ border:0; background:none; cursor:pointer; font:600 11px var(--rtp-font); color:var(--rtp-t2); padding:6px 0; position:relative; }
.rtp-tab:focus-visible{ outline:none; }
.rtp-tab[aria-selected="true"]{ color:var(--rtp-t1); }
.rtp-tabs{ position:relative; }   /* el indicador deslizante se posiciona respecto a la barra */
.rtp-tabs-ind{ position:absolute; bottom:-1px; left:0; height:2px; width:0; background:var(--rtp-green); border-radius:2px; transition:transform .45s var(--rtp-spring), width .45s var(--rtp-spring); }

/* ---------- Notificaciones ---------- */
.rtp-notif{ display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:10px; border-radius:var(--rtp-r-md); background:var(--rtp-g2); border:1px solid var(--rtp-g-border); font-size:11px; font-weight:600; line-height:1.35; }
.rtp-notif + .rtp-notif{ margin-top:8px; }
.rtp-notif small{ display:block; font-weight:500; color:var(--rtp-t2); font-size:10px; margin-top:2px; }
.rtp-notif .rtp-av{ width:30px; height:30px; font-size:10px; }

/* ---------- Colecciones ---------- */
.rtp-coll{ display:grid; gap:12px; }
.rtp-coll-item{ display:grid; grid-template-columns:34px 1fr auto; gap:10px; align-items:center; font-size:12px; font-weight:600; }
.rtp-coll-ico{ width:34px; height:34px; border-radius:var(--rtp-r-sm); display:grid; place-items:center; background:var(--rtp-c,var(--rtp-tile-mint)); color:var(--rtp-av-fg,var(--rtp-ink)); }
.rtp-coll-item[data-rtp-on="true"] .rtp-coll-ico{ background:var(--rtp-ink); color:var(--rtp-on-ink); }
.rtp-coll-item small{ font-size:10px; color:var(--rtp-t2); font-weight:500; }
.rtp-progress{ height:4px; border-radius:9px; background:var(--rtp-track); overflow:hidden; margin-top:6px; }
.rtp-progress > i{ display:block; height:100%; width:0; background:var(--rtp-green); border-radius:inherit; transition:width 1s var(--rtp-ease-out); }
.rtp-ready .rtp-progress > i{ width:var(--rtp-w); }

/* ---------- Tiles (Video / Doc / Link) ---------- */
.rtp-tile{
  position:relative; padding:8px; display:flex; flex-direction:column; gap:10px; border-radius:20px;
  background:var(--rtp-g1); -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid var(--rtp-g-border); border-top-color:var(--rtp-g-shine); box-shadow:var(--rtp-sh-card);
}
.rtp-tile-media{ position:relative; height:112px; border-radius:var(--rtp-r-md); display:grid; place-items:center; background:var(--rtp-bg-c,var(--rtp-tile-mint)); overflow:hidden; }
.rtp-tag{ position:absolute; top:8px; left:8px; background:var(--rtp-ink); color:var(--rtp-on-ink); font-size:10px; font-weight:600; padding:3px 9px; border-radius:var(--rtp-r-pill); }
.rtp-tile-icon{ width:42px; height:42px; border-radius:var(--rtp-r-sm); background:rgba(255,255,255,.85); display:grid; place-items:center; color:var(--rtp-ink); box-shadow:0 6px 16px rgba(18,48,42,.12); }
.rtp-tile-body{ padding:0 6px 4px; }
.rtp-tile-title{ font-size:12px; font-weight:600; line-height:1.3; }
.rtp-tile-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.rtp-tile-meta{ font-size:10px; color:var(--rtp-t2); }
.rtp-tile-acts{ display:flex; gap:4px; }
.rtp-icon-btn{ width:24px; height:24px; border-radius:8px; border:0; background:var(--rtp-track); color:var(--rtp-t1); display:grid; place-items:center; cursor:pointer; }
.rtp-icon-btn:hover{ background:var(--rtp-ink); color:var(--rtp-on-ink); }
.rtp-icon-btn.on{ background:var(--rtp-ink); color:var(--rtp-on-ink); }
.rtp-blob{
  width:78px; height:64px; border-radius:46% 54% 52% 48% / 55% 45% 55% 45%;
  background:radial-gradient(circle at 34% 28%, var(--rtp-blob-hi) 0%, var(--rtp-blob-mid) 38%, var(--rtp-blob-lo) 100%);
  box-shadow:0 14px 22px rgba(18,48,42,.28), inset -6px -8px 14px rgba(0,0,0,.22);
}
.rtp-blob.blue{ background:radial-gradient(circle at 34% 28%, var(--rtp-blob2-hi) 0%, var(--rtp-blob2-mid) 40%, var(--rtp-blob2-lo) 100%); }
.rtp-blob.rust{ background:radial-gradient(circle at 34% 28%, var(--rtp-blob3-hi) 0%, var(--rtp-blob3-mid) 42%, var(--rtp-blob3-lo) 100%); }
.rtp-tiles{ display:grid; grid-template-columns:repeat(auto-fill,minmax(168px,1fr)); gap:14px; }

/* ---------- Promo (Pro) ---------- */
.rtp-promo{ display:grid; grid-template-columns:auto 1fr; gap:14px; background:linear-gradient(160deg,var(--rtp-tile-salmon),var(--rtp-tile-mint) 120%); border-color:transparent; color:var(--rtp-t1); }
.rtp-promo h3{ margin:0 0 4px; font-size:16px; font-weight:700; letter-spacing:-.01em; }
.rtp-promo ul{ margin:0 0 12px; padding:0; list-style:none; font-size:10px; font-weight:600; display:grid; gap:4px; }
.rtp-promo .rtp-plan{ background:var(--rtp-g3); border-radius:var(--rtp-r-md); padding:12px; font-size:11px; font-weight:700; display:grid; gap:6px; align-content:start; }

/* ---------- Estado "now playing" ---------- */
.rtp-now{ background:var(--rtp-ink); color:var(--rtp-on-ink); border-color:transparent; padding:12px; }
.rtp-now > div{ display:flex; align-items:center; gap:10px; background:var(--rtp-ink-2); border-radius:var(--rtp-r-pill); padding:8px 12px; font-size:11px; font-weight:600; }
.rtp-now small{ display:block; color:var(--rtp-on-ink-2); font-weight:500; font-size:10px; }

/* =====================================================================
   MOTION v2 · comportamientos inspirados en bencho.dev, implementación propia
   Springs reales con linear(), coreografía con WAAPI, dock/tilt con seguimiento por rAF.
   JS asociado: módulo RTP (sección 7). Respeta prefers-reduced-motion.
   ===================================================================== */
.rtp-hero{ --rtp-edge:var(--rtp-mint); }
.rtp-rail{ z-index:20; }  /* las etiquetas del rail quedan por encima de las cards */
.rtp-view[hidden], .rtp-tile[hidden]{ display:none !important; }
.rtp-shell > .rtp-view{ grid-column:2; grid-row:1; }

/* Estado previo a la intro (con failsafe a 3 s) */
.rtp-pre .rtp-rail, .rtp-pre .rtp-card, .rtp-pre .rtp-tile{ opacity:0; animation:rtp-unhide .01s linear 2s forwards; }
.rtp-pre .rtp-shell--app .rtp-rail{ opacity:1; animation:none; }   /* el menú de una aplicación no espera a la animación: se ve desde el primer pintado */
@keyframes rtp-unhide{ to{ opacity:1; } }
.rtp-hide{ opacity:0; }

/* Nombre del menú: oculto en el sidebar contraído, visible al expandirlo */
.rtp-rail-label{ min-width:0; max-width:0; opacity:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 13px var(--rtp-font); transition:max-width .5s var(--rtp-spring-smooth), opacity .22s var(--rtp-ease-out); }
@media (min-width:701px){
  .rtp-rail.is-expanded{ width:var(--rtp-rail-w-open, 212px); padding-left:10px; padding-right:10px; align-items:stretch; }
  .rtp-rail.is-expanded .rtp-rail-btn, .rtp-rail.is-expanded .rtp-rail-toggle{ width:100%; justify-content:flex-start; gap:12px; padding-left:11px; }
  .rtp-rail.is-expanded .rtp-rail-toggle{ padding-left:11px; }
  .rtp-rail.is-expanded .rtp-rail-label{ max-width:calc(var(--rtp-rail-w-open, 212px) - 112px); opacity:1; transition-delay:0s, .12s; }
  .rtp-rail.is-expanded .rtp-rail-btn[aria-current="true"] .rtp-rail-label{ color:var(--rtp-ink); }
  .rtp-rail.is-expanded .rtp-rail-tip{ display:none; }
}
@media (max-width:700px){ .rtp-rail-label{ display:none; } }

/* Magnifying dock + Line sidebar */
.rtp-rail-tip{
  position:absolute; left:calc(100% + 24px); top:50%; z-index:5; pointer-events:none; white-space:nowrap;
  background:var(--rtp-ink); color:var(--rtp-on-ink); font:600 11px var(--rtp-font); padding:5px 11px; border-radius:var(--rtp-r-pill);
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  opacity:0; transform:translate(-8px,-50%) scale(calc(1 / var(--rtp-s,1))); transform-origin:left center;
  transition:opacity .25s var(--rtp-ease-out), transform .6s var(--rtp-spring-snappy);
}
.rtp-rail-tip::before{
  content:""; position:absolute; right:100%; top:50%; width:16px; height:1.5px; margin-right:2px; background:var(--rtp-green);
  transform:scaleX(0); transform-origin:right; transition:transform .45s var(--rtp-spring-smooth) .05s;
}
.rtp-rail-btn:hover .rtp-rail-tip, .rtp-rail-btn:focus-visible .rtp-rail-tip{ opacity:1; transform:translate(0,-50%) scale(calc(1 / var(--rtp-s,1))); }
.rtp-rail-btn:hover .rtp-rail-tip::before, .rtp-rail-btn:focus-visible .rtp-rail-tip::before{ transform:scaleX(1); }

/* Rolling counter (odómetro: 2 ciclos de dígitos) */
.rtp-roll{ display:inline-flex; vertical-align:bottom; font-variant-numeric:tabular-nums; }
.rtp-roll-col{ display:inline-block; height:1.15em; overflow:hidden; line-height:1.15; }
.rtp-roll-strip{ display:flex; flex-direction:column; transform:translateY(calc(var(--rtp-d,0) * -1.15em)); transition:transform 1.9s var(--rtp-spring-smooth) var(--rtp-delay,0ms); }
.rtp-roll-strip span{ display:block; height:1.15em; line-height:1.15; }
.rtp-roll-sep{ display:inline-block; height:1.15em; line-height:1.15; }
.rtp-stat{ cursor:default; }

/* Barras: alturas estáticas; la entrada la anima WAAPI */
.rtp-bar-fill{ height:var(--rtp-h,0); transition:opacity .3s; }
.rtp-impact i{ height:var(--rtp-h,0); transition:none; }
.rtp-progress > i{ width:var(--rtp-w,0); transition:none; }
.rtp-seg i{ transform-origin:left center; }
.rtp-bar-track{ transition:transform .6s var(--rtp-spring-snappy); }
.rtp-bar:hover .rtp-bar-track{ transform:scaleX(1.14); }
.rtp-bars:hover .rtp-bar:not(:hover) .rtp-bar-fill{ opacity:.5; }
.rtp-bar[data-rtp-v]:not([aria-current="true"])::before{
  content:attr(data-rtp-v); position:absolute; top:-8px; transform:translateY(-100%) scale(.85); opacity:0; pointer-events:none;
  background:var(--rtp-ink); color:var(--rtp-on-ink); font-size:10px; font-weight:700; padding:3px 8px; border-radius:var(--rtp-r-pill); white-space:nowrap;
  transition:opacity .2s, transform .5s var(--rtp-spring-snappy);
}
.rtp-bar[data-rtp-v]:not([aria-current="true"]):hover::before{ opacity:1; transform:translateY(-100%) scale(1); }

/* Progress ticks */
.rtp-ticks i.on{ animation:rtp-tick-pop .7s var(--rtp-spring-bounce); }
@keyframes rtp-tick-pop{ from{ transform:scaleY(.2); background:var(--rtp-mint); } }

/* Tilt card (JS) + brillo + Edge light */
.rtp-tilt, .rtp-tile, .rtp-promo{ transition:box-shadow .4s var(--rtp-ease-out); will-change:transform; }
.rtp-tilt.is-hover{ box-shadow:var(--rtp-sh-hover); }
.rtp-tilt::after, .rtp-tile::after, .rtp-promo::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; opacity:0; transition:opacity .4s;
  background:radial-gradient(240px circle at var(--rtp-gx,50%) var(--rtp-gy,50%), rgba(255,255,255,.4), transparent 62%);
}
.rtp-tilt.is-hover::after{ opacity:1; }
.rtp-edge::before, .rtp-card::before{
  content:""; position:absolute; inset:-1px; border-radius:inherit; padding:1.5px; pointer-events:none;
  opacity:0; transition:opacity .45s var(--rtp-ease-out);
  background:radial-gradient(190px circle at var(--rtp-ex,50%) var(--rtp-ey,50%), var(--rtp-edge,var(--rtp-green)), transparent 70%);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite:exclude;
}
.rtp-edge:hover::before, .rtp-card:hover::before{ opacity:1; }

/* Toast stack */
.rtp-toasts{ position:relative; height:calc(56px + 3 * 10px); transition:height .6s var(--rtp-spring-snappy); }
.rtp-toasts:hover, .rtp-toasts:focus-within{ height:calc(var(--rtp-n,3) * 66px); }
.rtp-toast{
  position:absolute; left:0; right:0; top:0; height:56px; display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:center; padding:0 14px;
  background:var(--rtp-g3); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-md); box-shadow:var(--rtp-sh-card); font-size:12px; font-weight:600;
  z-index:calc(10 - var(--rtp-i,0)); opacity:calc(1 - var(--rtp-i,0) * .22);
  transform:translateY(calc(var(--rtp-i,0) * 10px)) scale(calc(1 - var(--rtp-i,0) * .05)); transform-origin:center bottom;
  transition:transform .75s var(--rtp-spring-snappy), opacity .35s var(--rtp-ease-out);
}
.rtp-toasts:hover .rtp-toast, .rtp-toasts:focus-within .rtp-toast{ opacity:1; transform:translateY(calc(var(--rtp-i,0) * 66px)) scale(1); }
.rtp-toast small{ display:block; font-weight:500; font-size:10px; color:var(--rtp-t2); }
.rtp-toast-ic{ width:28px; height:28px; border-radius:50%; background:var(--rtp-mint); color:var(--rtp-ink); display:grid; place-items:center; }
.rtp-toast.enter{ animation:rtp-toast-in .8s var(--rtp-spring-bounce) backwards; }
.rtp-toast.leave{ opacity:0 !important; }
@keyframes rtp-toast-in{ from{ opacity:0; transform:translateY(-30px) scale(1.05); } }

/* ===== Tonos (info, éxito, advertencia, error) ===== */
[data-rtp-tone="info"]{ --rtp-tone:var(--rtp-green); --rtp-tone-fg:#fff; }
[data-rtp-tone="success"]{ --rtp-tone:var(--rtp-ok); --rtp-tone-fg:#fff; }
[data-rtp-tone="warn"]{ --rtp-tone:var(--rtp-warn); --rtp-tone-fg:#2B2100; }
[data-rtp-tone="error"]{ --rtp-tone:var(--rtp-err); --rtp-tone-fg:#fff; }
[data-rtp-tone="loading"]{ --rtp-tone:var(--rtp-green); --rtp-tone-fg:#fff; }
[data-rtp-tone="default"]{ --rtp-tone:var(--rtp-ink); --rtp-tone-fg:var(--rtp-on-ink); }
.rtp-toast[data-rtp-tone] .rtp-toast-ic{ background:color-mix(in srgb, var(--rtp-tone) 18%, transparent); color:var(--rtp-tone); }

/* Superficie opaca de burbujas y notificaciones (se adapta a la paleta y al tema) */
:root{ --rtp-pop-bg:color-mix(in srgb, var(--rtp-bg-base) 38%, #fff); }
:root[data-rtp-theme="dark"]{ --rtp-pop-bg:color-mix(in srgb, var(--rtp-bg-base) 82%, var(--rtp-mint)); }

/* ===== Notificaciones (RTP.notify): esquina elegida, pausa al pasar el cursor, acciones y barra de tiempo ===== */
.rtp-toaster{
  position:fixed; inset:auto; margin:0; padding:16px; border:0; background:transparent; overflow:visible; color:inherit;
  width:min(396px, 100vw); max-height:100vh; flex-direction:column; gap:10px; pointer-events:none; z-index:2147483000;
}
.rtp-toaster:not([popover]), .rtp-toaster:popover-open{ display:flex; }
.rtp-toaster[data-rtp-pos^="top"]{ top:0; bottom:auto; }
.rtp-toaster[data-rtp-pos^="bottom"]{ bottom:0; top:auto; }
.rtp-toaster[data-rtp-pos$="right"]{ right:0; left:auto; }
.rtp-toaster[data-rtp-pos$="left"]{ left:0; right:auto; }
.rtp-toaster[data-rtp-pos$="center"]{ left:50%; right:auto; transform:translateX(-50%); }
.rtp-note{
  position:relative; pointer-events:auto; display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:start; overflow:hidden;
  padding:12px 12px 12px 14px; background:var(--rtp-pop-bg); color:var(--rtp-t1);
  border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-md); box-shadow:var(--rtp-sh-hover);
  font:500 12.5px/1.45 var(--rtp-font);
}
.rtp-note[data-rtp-variant="soft"]{ box-shadow:var(--rtp-sh-hover), inset 3px 0 0 var(--rtp-tone, var(--rtp-green)); }
.rtp-note--noicon{ grid-template-columns:1fr auto; }
.rtp-note-ic{
  width:30px; height:30px; border-radius:50%; display:grid; place-items:center; flex:none;
  background:color-mix(in srgb, var(--rtp-tone, var(--rtp-green)) 16%, transparent); color:var(--rtp-tone, var(--rtp-green));
}
.rtp-note-body{ min-width:0; padding-top:1px; }
.rtp-note-body b{ display:block; font-weight:700; font-size:13px; color:var(--rtp-t1); }
.rtp-note-body p{ margin:2px 0 0; color:var(--rtp-t2); font-size:12px; }
.rtp-note-actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.rtp-note-actions .rtp-btn{ padding:6px 12px; font-size:11.5px; min-height:0; height:auto; }
.rtp-note-x{
  all:unset; box-sizing:border-box; width:24px; height:24px; border-radius:50%; display:grid; place-items:center; cursor:pointer; color:var(--rtp-t3);
  transition:background .2s, color .2s, transform .45s var(--rtp-spring-snappy);
}
.rtp-note-x:hover, .rtp-note-x:focus-visible{ background:color-mix(in srgb, var(--rtp-ink) 10%, transparent); color:var(--rtp-t1); transform:rotate(90deg); }
.rtp-note-bar{ position:absolute; left:0; right:0; bottom:0; height:3px; background:var(--rtp-tone, var(--rtp-green)); opacity:.65; transform-origin:left center; pointer-events:none; }
.rtp-note[data-rtp-variant="solid"]{
  background:var(--rtp-tone, var(--rtp-ink)); color:var(--rtp-tone-fg, #fff); border-color:transparent;
}
.rtp-note[data-rtp-variant="solid"] .rtp-note-body b, .rtp-note[data-rtp-variant="solid"] .rtp-note-body p{ color:inherit; }
.rtp-note[data-rtp-variant="solid"] .rtp-note-body p{ opacity:.88; }
.rtp-note[data-rtp-variant="solid"] .rtp-note-ic{ background:color-mix(in srgb, var(--rtp-tone-fg, #fff) 22%, transparent); color:var(--rtp-tone-fg, #fff); }
.rtp-note[data-rtp-variant="solid"] .rtp-note-x{ color:inherit; opacity:.8; }
.rtp-note[data-rtp-variant="solid"] .rtp-note-bar{ background:var(--rtp-tone-fg, #fff); opacity:.5; }
.rtp-note[data-rtp-variant="solid"] .rtp-btn{ background:color-mix(in srgb, var(--rtp-tone-fg, #fff) 20%, transparent); color:inherit; box-shadow:none; }
.rtp-note[data-rtp-variant="solid"] .rtp-ripples{ color:var(--rtp-tone-fg, #fff); }
.rtp-note .rtp-ripples{ color:var(--rtp-tone, var(--rtp-green)); }
.rtp-note--leaving{ pointer-events:none; }

/* ===== Tooltips y burbujas de información (popover) ===== */
.rtp-tooltip, .rtp-popover{ position:fixed; inset:auto; margin:0; border:0; overflow:visible; }
.rtp-tooltip{
  max-width:260px; padding:6px 10px; border-radius:10px; background:var(--rtp-ink); color:var(--rtp-on-ink);
  font:600 11px/1.4 var(--rtp-font); white-space:pre-line; box-shadow:var(--rtp-sh-hover); pointer-events:none;
}
.rtp-tooltip[hidden]{ display:none; }
.rtp-popover{
  width:max-content; max-width:min(340px, calc(100vw - 24px)); padding:14px 16px; border-radius:var(--rtp-r-md);
  background:var(--rtp-pop-bg); color:var(--rtp-t1); border:1px solid var(--rtp-g-border); box-shadow:var(--rtp-sh-hover);
  font:500 12.5px/1.5 var(--rtp-font);
}
.rtp-popover[hidden]{ display:none; }
.rtp-popover:focus{ outline:none; }
.rtp-tooltip::before, .rtp-popover::before{ content:""; position:absolute; width:10px; height:10px; background:inherit; transform:rotate(45deg); border-radius:2px; pointer-events:none; }
.rtp-tooltip[data-rtp-side="top"]::before, .rtp-tooltip[data-rtp-side="bottom"]::before{ left:var(--rtp-ax, 50%); margin-left:-5px; }
.rtp-tooltip[data-rtp-side="left"]::before, .rtp-tooltip[data-rtp-side="right"]::before{ top:var(--rtp-ay, 50%); margin-top:-5px; }
.rtp-tooltip[data-rtp-side="top"]::before{ bottom:-4px; }
.rtp-tooltip[data-rtp-side="bottom"]::before{ top:-4px; }
.rtp-tooltip[data-rtp-side="left"]::before{ right:-4px; }
.rtp-tooltip[data-rtp-side="right"]::before{ left:-4px; }
.rtp-popover[data-rtp-side="top"]::before, .rtp-popover[data-rtp-side="bottom"]::before{ left:var(--rtp-ax, 50%); margin-left:-5px; }
.rtp-popover[data-rtp-side="left"]::before, .rtp-popover[data-rtp-side="right"]::before{ top:var(--rtp-ay, 50%); margin-top:-5px; }
.rtp-popover[data-rtp-side="top"]::before{ bottom:-6px; border-right:1px solid var(--rtp-g-border); border-bottom:1px solid var(--rtp-g-border); }
.rtp-popover[data-rtp-side="bottom"]::before{ top:-6px; border-left:1px solid var(--rtp-g-border); border-top:1px solid var(--rtp-g-border); }
.rtp-popover[data-rtp-side="left"]::before{ right:-6px; border-top:1px solid var(--rtp-g-border); border-right:1px solid var(--rtp-g-border); }
.rtp-popover[data-rtp-side="right"]::before{ left:-6px; border-bottom:1px solid var(--rtp-g-border); border-left:1px solid var(--rtp-g-border); }
.rtp-popover[data-rtp-arrow="false"]::before{ display:none; }
.rtp-popover-head{ display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.rtp-popover-ic{
  width:28px; height:28px; border-radius:50%; display:grid; place-items:center; flex:none;
  background:color-mix(in srgb, var(--rtp-tone, var(--rtp-green)) 16%, transparent); color:var(--rtp-tone, var(--rtp-green));
}
.rtp-popover-title{ flex:1; font-weight:700; font-size:13px; color:var(--rtp-t1); }
.rtp-popover-body{ color:var(--rtp-t2); }
.rtp-popover-body p{ margin:0 0 8px; } .rtp-popover-body p:last-child{ margin-bottom:0; }
.rtp-popover-foot{ display:flex; gap:8px; justify-content:flex-end; margin-top:12px; flex-wrap:wrap; }
.rtp-popover-foot:empty{ display:none; }
.rtp-popover-foot .rtp-btn{ padding:6px 12px; font-size:11.5px; min-height:0; height:auto; }
.rtp-info-btn{
  all:unset; box-sizing:border-box; width:22px; height:22px; border-radius:50%; display:inline-grid; place-items:center; cursor:pointer; vertical-align:middle;
  background:color-mix(in srgb, var(--rtp-tone, var(--rtp-green)) 14%, transparent); color:var(--rtp-tone, var(--rtp-green));
  transition:transform .5s var(--rtp-spring-snappy), background .2s;
}
.rtp-info-btn:hover{ transform:scale(1.14); background:color-mix(in srgb, var(--rtp-tone, var(--rtp-green)) 24%, transparent); }
.rtp-info-btn:focus-visible{ outline:2px solid var(--rtp-tone, var(--rtp-green)); outline-offset:2px; }
.rtp-info-btn[aria-expanded="true"]{ background:var(--rtp-tone, var(--rtp-green)); color:var(--rtp-tone-fg, #fff); }


/* Avatar group */
.rtp-avgroup{ display:flex; align-items:center; }
.rtp-avgroup .rtp-av{ position:relative; margin-left:-10px; border:2px solid var(--rtp-g3); transition:margin .55s var(--rtp-spring-snappy), transform .55s var(--rtp-spring-snappy); }
.rtp-avgroup .rtp-av:first-child{ margin-left:0; }
.rtp-avgroup:hover .rtp-av:not(:first-child){ margin-left:-2px; }
.rtp-avgroup .rtp-av:hover{ transform:translateY(-6px) scale(1.12); z-index:2; }
.rtp-hero .rtp-avgroup .rtp-av{ border-color:var(--rtp-ink); }
.rtp-avgroup .rtp-av[data-rtp-name]::after{
  content:attr(data-rtp-name); position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%) translateY(4px);
  background:var(--rtp-ink); color:var(--rtp-on-ink); font:600 10px var(--rtp-font); padding:3px 8px; border-radius:var(--rtp-r-pill);
  white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .2s, transform .5s var(--rtp-spring-snappy);
}
.rtp-avgroup .rtp-av[data-rtp-name]:hover::after{ opacity:1; transform:translateX(-50%) translateY(0); }

/* Text rise (palabra por palabra, animado por WAAPI) */
.rtp-w{ display:inline-block; overflow:hidden; vertical-align:bottom; padding:0 .04em .14em; margin:0 -.04em -.14em; }
.rtp-w-in{ display:inline-block; }

/* Shimmer + dot loader */
.rtp-shimmer{ position:relative; overflow:hidden; background:var(--rtp-track); border-radius:var(--rtp-r-sm); }
.rtp-shimmer::after{ content:""; position:absolute; inset:0; background:linear-gradient(90deg, transparent, var(--rtp-g3), transparent); transform:translateX(-100%); animation:rtp-sweep 1.5s var(--rtp-ease-out) infinite; }
@keyframes rtp-sweep{ to{ transform:translateX(100%); } }
.rtp-shimmer-text{
  background:linear-gradient(100deg, var(--rtp-t2) 40%, var(--rtp-t1) 50%, var(--rtp-t2) 60%) 100% 0 / 250% 100% no-repeat;
  -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent; animation:rtp-shine 2.2s linear infinite;
}
@keyframes rtp-shine{ to{ background-position:-100% 0; } }
.rtp-dots{ display:inline-flex; gap:5px; align-items:center; }
.rtp-dots i{ width:7px; height:7px; border-radius:50%; background:var(--rtp-green); animation:rtp-bounce 1s var(--rtp-ease-out) infinite; }
.rtp-dots i:nth-child(2){ animation-delay:.12s; }
.rtp-dots i:nth-child(3){ animation-delay:.24s; }
@keyframes rtp-bounce{ 0%,60%,100%{ transform:translateY(0); opacity:.5; } 30%{ transform:translateY(-6px); opacity:1; } }

/* Toggle elástico */
.rtp-switch{ display:inline-flex; align-items:center; gap:10px; border:0; background:none; cursor:pointer; font:600 12px var(--rtp-font); color:var(--rtp-t1); padding:0; }
.rtp-switch-track{ position:relative; width:46px; height:26px; border-radius:99px; background:var(--rtp-track); box-shadow:inset 0 0 0 1px var(--rtp-g-border); transition:background .35s var(--rtp-ease-out); }
.rtp-switch-thumb{ position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:99px; background:#fff; box-shadow:0 2px 6px rgba(18,48,42,.28); transition:left .6s var(--rtp-spring-bounce), width .3s var(--rtp-spring-snappy); }
.rtp-switch:active .rtp-switch-thumb{ width:27px; }
.rtp-switch[aria-checked="true"] .rtp-switch-track{ background:var(--rtp-green); }
.rtp-switch[aria-checked="true"] .rtp-switch-thumb{ left:23px; }
.rtp-switch[aria-checked="true"]:active .rtp-switch-thumb{ left:16px; }

/* Hover: cada componente se sombrea por sí mismo; no viaja ningún halo ni se mueve nada por detrás */
.rtp-hl-item{ transition:background .3s var(--rtp-ease-out), box-shadow .3s var(--rtp-ease-out), color .3s var(--rtp-ease-out); }
.rtp-hl-item:hover{ background:var(--rtp-hl-bg, var(--rtp-g3)); box-shadow:var(--rtp-hl-sh, 0 8px 20px var(--rtp-g-shadow)), inset 0 1px 0 var(--rtp-g-shine); }
.rtp-row-item.rtp-hl-item, .rtp-coll-item.rtp-hl-item{ border-radius:12px; padding-left:8px; padding-right:8px; margin-left:-8px; margin-right:-8px; }
.rtp-coll-item.rtp-hl-item{ padding-top:6px; padding-bottom:6px; margin-top:-6px; margin-bottom:-6px; }
.rtp-tab.rtp-hl-item{ border-radius:10px; padding-left:6px; padding-right:6px; }
.rtp-rail{ --rtp-hl-bg:rgba(255,255,255,.11); --rtp-hl-sh:none; }
.rtp-rail-btn.rtp-hl-item[aria-current="true"]:hover, .rtp-day.rtp-hl-item[aria-pressed="true"]:hover{ background:transparent; box-shadow:none; }
/* Hover de ítems (rail, colecciones, filas, chips, pestañas y días): nativo, sin la clase .rtp-hl-item */
:where(.rtp-rail) .rtp-rail-btn, :where(.rtp-coll) .rtp-coll-item, .rtp-row-item, .rtp-notif, :where(.rtp-chips) .rtp-chip, :where(.rtp-tabs) .rtp-tab, :where(.rtp-week) .rtp-day{ transition:background .3s var(--rtp-ease-out), box-shadow .3s var(--rtp-ease-out), color .3s var(--rtp-ease-out); }
:where(.rtp-rail) .rtp-rail-btn:hover, :where(.rtp-coll) .rtp-coll-item:hover, .rtp-row-item:hover, .rtp-notif:hover, :where(.rtp-chips) .rtp-chip:hover, :where(.rtp-tabs) .rtp-tab:hover, :where(.rtp-week) .rtp-day:hover{ background:var(--rtp-hl-bg, var(--rtp-g3)); box-shadow:var(--rtp-hl-sh, 0 8px 20px var(--rtp-g-shadow)), inset 0 1px 0 var(--rtp-g-shine); }
.rtp-row-item.rtp-row-item, :where(.rtp-coll) .rtp-coll-item.rtp-coll-item{ border-radius:12px; padding-left:8px; padding-right:8px; margin-left:-8px; margin-right:-8px; }
:where(.rtp-coll) .rtp-coll-item.rtp-coll-item{ padding-top:6px; padding-bottom:6px; margin-top:-6px; margin-bottom:-6px; }
:where(.rtp-tabs) .rtp-tab.rtp-tab{ border-radius:10px; padding-left:6px; padding-right:6px; }
:where(.rtp-rail) .rtp-rail-btn.rtp-rail-btn[aria-current="true"]:hover, :where(.rtp-week) .rtp-day.rtp-day[aria-pressed="true"]:hover{ background:transparent; box-shadow:none; }
.rtp-chip.rtp-hl-item[aria-pressed="true"]:hover{ background:var(--rtp-ink); box-shadow:none; }
/* los ítems con fondo propio ceden el fondo a la tarjeta que viaja */
.rtp-notif, .rtp-chip{ transition:background .25s var(--rtp-ease-out), border-color .25s var(--rtp-ease-out), color .25s, transform .25s var(--rtp-spring); }

.rtp-pal-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--rtp-c); margin-right:6px; vertical-align:1px; }

/* Selector deslizante (calendario): la "tarjeta" activa se mueve de un día a otro */
.rtp-slide{ position:relative; }
.rtp-slide-ind{
  position:absolute; z-index:0; border-radius:var(--rtp-r-sm); background:var(--rtp-ink); box-shadow:0 8px 18px rgba(0,0,0,.16); pointer-events:none;
  transition:left .6s var(--rtp-spring-smooth), right .6s var(--rtp-spring-smooth), top .6s var(--rtp-spring-smooth), height .6s var(--rtp-spring-smooth);
}
/* el borde delantero avanza primero y el trasero lo alcanza: la tarjeta se estira y se acomoda */
.rtp-slide-ind.to-right{ transition:left .7s var(--rtp-spring-smooth) .05s, right .42s var(--rtp-spring-snappy), top .6s var(--rtp-spring-smooth), height .6s var(--rtp-spring-smooth); }
.rtp-slide-ind.to-left{ transition:left .42s var(--rtp-spring-snappy), right .7s var(--rtp-spring-smooth) .05s, top .6s var(--rtp-spring-smooth), height .6s var(--rtp-spring-smooth); }

/* Spinner de gota: una gota que se va llenando de líquido con olas, en bucle (o con valor fijo con --rtp-p de 0 a 100) */
.rtp-dropload{ display:inline-block; width:48px; height:60px; vertical-align:middle; flex:none; }
.rtp-dropload svg{ display:block; width:100%; height:100%; overflow:visible; }
.rtp-dropload--xs{ width:14px; height:18px; }
.rtp-dropload--sm{ width:28px; height:35px; }
.rtp-dropload--lg{ width:72px; height:90px; }
.rtp-dl-bg{ fill:color-mix(in srgb, var(--rtp-green) 9%, transparent); }
.rtp-dl-out{ fill:none; stroke:var(--rtp-green); stroke-width:2.6; stroke-linejoin:round; }
.rtp-dl-hl{ fill:none; stroke:#fff; stroke-width:2.6; stroke-linecap:round; opacity:.6; }
.rtp-dl-back{ fill:color-mix(in srgb, var(--rtp-green) 45%, var(--rtp-mint)); }
.rtp-dl-front{ fill:var(--rtp-green); }
.rtp-dropload-liq{ transform:translateY(84px); animation:rtp-dl-fill 3.4s cubic-bezier(.45,.05,.35,1) infinite; }
.rtp-dl-wave{ animation:rtp-dl-wave 2.4s linear infinite; }
.rtp-dl-back{ animation-duration:3.1s; animation-direction:reverse; transform:translateY(-3px); }
.rtp-dl-front{ animation-duration:1.9s; }
@keyframes rtp-dl-fill{
  0%{ transform:translateY(84px); opacity:1; }
  74%{ transform:translateY(3px); opacity:1; }
  90%{ transform:translateY(3px); opacity:1; }
  100%{ transform:translateY(3px); opacity:0; }
}
@keyframes rtp-dl-wave{ to{ translate:-64px 0; } }
/* valor fijo: <span class="rtp-dropload rtp-dropload--value" style="--rtp-p:65"> */
.rtp-dropload--value .rtp-dropload-liq{ animation:none; opacity:1; transform:translateY(calc(84px - var(--rtp-p,0) * .81px)); transition:transform .9s var(--rtp-spring-smooth); }
.rtp-btn .rtp-dropload{ margin-right:2px; }
.rtp-btn .rtp-dl-out{ stroke:currentColor; }
.rtp-btn .rtp-dl-front{ fill:currentColor; }
.rtp-btn .rtp-dl-back{ fill:color-mix(in srgb, currentColor 55%, transparent); }
.rtp-btn .rtp-dl-bg{ fill:color-mix(in srgb, currentColor 12%, transparent); }

/* Spinner de esferas líquidas: tres esferas orbitan a distinta velocidad y se funden al cruzarse */
.rtp-orbs{
  position:relative; display:inline-block; font-size:16px; width:3.5em; height:3.5em; vertical-align:middle; flex:none;
  filter:url(#rtp-goo-s) drop-shadow(0 .25em .4em color-mix(in srgb, var(--rtp-green) 32%, transparent));
}
.rtp-orbs--xs{ font-size:8px;  filter:url(#rtp-goo-xs); }
.rtp-orbs--sm{ font-size:10px; filter:url(#rtp-goo-xs) drop-shadow(0 .25em .4em color-mix(in srgb, var(--rtp-green) 32%, transparent)); }
.rtp-orbs--lg{ font-size:26px; filter:url(#rtp-goo-l) drop-shadow(0 .25em .4em color-mix(in srgb, var(--rtp-green) 32%, transparent)); }
.rtp-orbs i{
  position:absolute; left:50%; top:50%; width:.9em; height:.9em; margin:-.45em 0 0 -.45em; border-radius:50%; background:var(--rtp-c);
  transform:rotate(0deg) translateX(var(--rtp-r));
  animation:rtp-orbit var(--rtp-t) linear infinite, rtp-orb-pulse 1.3s ease-in-out infinite alternate;
}
.rtp-orbs i:nth-child(1){ --rtp-c:var(--rtp-green);  --rtp-t:1.5s; --rtp-r:1.15em; --rtp-k:0; }
.rtp-orbs i:nth-child(2){ --rtp-c:var(--rtp-mint);   --rtp-t:2.2s; --rtp-r:.95em; --rtp-k:1; animation-delay:-.7s, -.4s; }
.rtp-orbs i:nth-child(3){ --rtp-c:var(--rtp-orange); --rtp-t:3.1s; --rtp-r:1.3em; --rtp-k:2; animation-direction:reverse, alternate; animation-delay:-1.2s, -.9s; }
@keyframes rtp-orbit{ to{ transform:rotate(360deg) translateX(var(--rtp-r)); } }
@keyframes rtp-orb-pulse{ from{ scale:.85; } to{ scale:1.15; } }
.rtp-btn .rtp-orbs{ filter:url(#rtp-goo-xs); }
.rtp-btn .rtp-orbs i{ --rtp-c:currentColor; }
.rtp-btn .rtp-orbs i:nth-child(2){ opacity:.7; }
.rtp-btn .rtp-orbs i:nth-child(3){ opacity:.45; }

/* Spinners de ondas concéntricas y barras píldora (todo en em: cambia el tamaño con font-size o con .rtp-spin-sm / .rtp-spin-lg) */
.rtp-ripples.rtp-spin-sm, .rtp-pillbars.rtp-spin-sm{ font-size:10px; } .rtp-ripples.rtp-spin-lg, .rtp-pillbars.rtp-spin-lg{ font-size:22px; }

/* Ondas concéntricas */
.rtp-ripples{ position:relative; display:inline-block; font-size:16px; width:3.5em; height:3.5em; vertical-align:middle; flex:none; }
.rtp-ripples i{ position:absolute; inset:0; border-radius:50%; border:.14em solid var(--rtp-green); opacity:0; animation:rtp-rp 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.rtp-ripples i:nth-child(2){ animation-delay:.8s; border-color:var(--rtp-mint); }
.rtp-ripples i:nth-child(3){ animation-delay:1.6s; border-color:var(--rtp-orange); }
.rtp-ripples::after{ content:""; position:absolute; left:50%; top:50%; width:.7em; height:.7em; margin:-.35em 0 0 -.35em; border-radius:50%; background:var(--rtp-green); animation:rtp-rp-core 2.4s ease-in-out infinite; }
@keyframes rtp-rp{ 0%{ transform:scale(.12); opacity:.95; } 70%{ opacity:.35; } 100%{ transform:scale(1); opacity:0; } }
@keyframes rtp-rp-core{ 0%,100%{ transform:scale(.85); } 50%{ transform:scale(1.2); } }

/* Barras píldora ondulantes */
.rtp-pillbars{ display:inline-flex; align-items:center; justify-content:center; gap:.32em; font-size:16px; height:3em; vertical-align:middle; flex:none; }
.rtp-pillbars i{ width:.52em; height:1em; border-radius:99px; background:linear-gradient(180deg, var(--rtp-mint), var(--rtp-green)); animation:rtp-pb 1.25s ease-in-out infinite; }
.rtp-pillbars i:nth-child(1){ animation-delay:-1.15s; } .rtp-pillbars i:nth-child(2){ animation-delay:-1.0s; }
.rtp-pillbars i:nth-child(3){ animation-delay:-.85s; background:linear-gradient(180deg, var(--rtp-orange), var(--rtp-green)); }
.rtp-pillbars i:nth-child(4){ animation-delay:-.7s; } .rtp-pillbars i:nth-child(5){ animation-delay:-.55s; }
@keyframes rtp-pb{ 0%,100%{ height:.8em; opacity:.6; } 50%{ height:3em; opacity:1; } }

/* En botones los spinners toman el color del texto */
.rtp-btn .rtp-ripples i{ border-color:currentColor; }
.rtp-btn .rtp-ripples::after{ background:currentColor; }
.rtp-btn .rtp-pillbars i, .rtp-btn .rtp-pillbars i:nth-child(3){ background:currentColor; }

/* NProgress: barra de progreso superior. Mismo DOM que la librería nprogress (#nprogress .bar .peg .spinner), así que estos estilos también sirven si usas el paquete original */
#nprogress{ pointer-events:none; }
#nprogress .bar{
  position:fixed; z-index:2147483000; top:env(safe-area-inset-top,0px); left:0; width:100%; height:3px;
  background:linear-gradient(90deg, var(--rtp-green), var(--rtp-mint) 72%, var(--rtp-orange));
}
#nprogress .peg{ position:absolute; right:0; width:110px; height:100%; opacity:1; transform:rotate(3deg) translate(0,-4px); box-shadow:0 0 12px var(--rtp-green), 0 0 6px var(--rtp-mint); }
/* El spinner es uno de los del sistema (gota, esferas, ondas o barras), solo el spinner, sin contenedor de fondo */
#nprogress .spinner{
  position:fixed; z-index:2147483000; top:calc(14px + env(safe-area-inset-top,0px)); right:16px;
  display:grid; place-items:center; background:none; border:0; padding:0; box-shadow:none;
}
/* Spinner predeterminado de la librería nprogress: anillo giratorio (.spinner-icon), con los colores de la paleta */
#nprogress .spinner-icon{
  width:18px; height:18px; box-sizing:border-box; border:2px solid transparent; border-top-color:var(--rtp-green); border-left-color:var(--rtp-green);
  border-radius:50%; animation:nprogress-spinner .4s linear infinite;
}
.nprogress-custom-parent{ overflow:hidden; position:relative; }
.nprogress-custom-parent #nprogress .bar, .nprogress-custom-parent #nprogress .spinner{ position:absolute; }
@keyframes nprogress-spinner{ to{ transform:rotate(360deg); } }

/* Modales (dialog nativo): cuatro tamaños sm 400 · md 560 · lg 760 · xl 980 px */
dialog.rtp-modal{
  --rtp-w:560px; width:min(var(--rtp-w), calc(100vw - 24px)); max-height:min(88vh, 860px); padding:0; font-family:var(--rtp-font); color:var(--rtp-t1);
  border:1px solid var(--rtp-g-border); border-top-color:var(--rtp-g-shine); border-radius:var(--rtp-r-lg);
  background:color-mix(in srgb, var(--rtp-bg-base) 88%, var(--rtp-g3)); box-shadow:0 30px 80px rgba(0,0,0,.30); overflow:hidden;
}
dialog.rtp-modal[open]{ display:flex; flex-direction:column; overscroll-behavior:contain; margin:auto; }   /* siempre centrado; el diálogo y su contenido son una sola pieza */
.rtp-modal-body{ overscroll-behavior:contain; }
dialog.rtp-modal::backdrop{ background:rgba(6,18,36,.42); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); animation:rtp-backdrop-in .35s var(--rtp-ease-out); }
dialog.rtp-modal.is-closing::backdrop{ animation:rtp-backdrop-out .24s var(--rtp-ease-out) forwards; }
@keyframes rtp-backdrop-in{ from{ opacity:0; } }
@keyframes rtp-backdrop-out{ to{ opacity:0; } }
dialog.rtp-modal.rtp-modal--sm{ --rtp-w:400px; } dialog.rtp-modal.rtp-modal--md{ --rtp-w:560px; } dialog.rtp-modal.rtp-modal--lg{ --rtp-w:760px; } dialog.rtp-modal.rtp-modal--xl{ --rtp-w:980px; }
.rtp-modal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 22px 12px; }
.rtp-modal-head h3{ margin:0; font-size:17px; font-weight:700; letter-spacing:-.01em; }
.rtp-modal-head p{ margin:4px 0 0; font-size:12px; color:var(--rtp-t2); }
.rtp-modal-body{ padding:6px 22px 18px; overflow:auto; flex:1; min-height:0; font-size:13px; line-height:1.55; }
.rtp-modal-foot{ display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; padding:14px 22px; border-top:1px solid var(--rtp-track); }
.rtp-modal-cols{ display:grid; grid-template-columns:1.4fr 1fr; gap:16px; }
.rtp-modal .rtp-stat .rtp-num{ font-size:28px; white-space:nowrap; }
@media (max-width:760px){ .rtp-modal-cols{ grid-template-columns:1fr; } }
@media (max-width:600px){ dialog.rtp-modal{ width:calc(100vw - 24px); margin:auto; max-height:92vh; max-height:92dvh; } }

/* Campos de formulario */
.rtp-field{ display:grid; align-content:start; gap:6px; font-size:12px; font-weight:600; margin-bottom:14px; }   /* align-content:start: las filas no se estiran, así los controles de campos vecinos quedan al mismo nivel */
.rtp-text, .rtp-select, .rtp-textarea{
  width:100%; padding:10px 14px; border-radius:var(--rtp-r-md); border:1px solid var(--rtp-g-border); background:var(--rtp-g2); color:var(--rtp-t1);
  font:500 13px var(--rtp-font); outline:none; transition:box-shadow .25s var(--rtp-ease-out), border-color .25s;
}
.rtp-text::placeholder, .rtp-textarea::placeholder{ color:var(--rtp-t3); }
.rtp-text:focus, .rtp-select:focus, .rtp-textarea:focus{ border-color:var(--rtp-green); box-shadow:0 0 0 3px color-mix(in srgb, var(--rtp-green) 22%, transparent); }

/* Tabla de datos: búsqueda, filtros, orden por columna, selección, paginación y estado de carga */
.rtp-table-card{ padding:0; overflow:hidden; }
.rtp-table-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:16px 18px 12px; }
.rtp-table-bar .left, .rtp-table-bar .right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rtp-search{ position:relative; display:inline-grid; align-items:center; }
.rtp-search > .rtp-text, .rtp-search > .rtp-ic{ grid-area:1 / 1; }   /* el ícono y el campo comparten celda: el ícono se centra con el campo, no con una posición calculada */
.rtp-search > .rtp-ic{ justify-self:start; align-self:center; margin-left:12px; width:18px; height:18px; color:var(--rtp-t3); pointer-events:none; z-index:1; }
.rtp-search .rtp-text{ padding-left:36px; min-width:220px; }
.rtp-table-scroll{ overflow:auto; max-height:var(--rtp-tbl-h, none); container:rtptable / inline-size; }
table.rtp-table{ width:100%; border-collapse:separate; border-spacing:0; font-size:12px; }
.rtp-table thead th{
  position:sticky; top:0; z-index:2; text-align:left; padding:10px 16px; white-space:nowrap;
  font:600 10px/1 var(--rtp-font); letter-spacing:.06em; text-transform:uppercase; color:var(--rtp-t2);
  background:color-mix(in srgb, var(--rtp-bg-base) 70%, var(--rtp-g3)); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border-top:1px solid var(--rtp-track); border-bottom:1px solid var(--rtp-track);
}
.rtp-table tbody td{ padding:12px 16px; border-bottom:1px solid var(--rtp-track); vertical-align:middle; white-space:nowrap; }
.rtp-table tbody tr{ transition:background .3s var(--rtp-ease-out), box-shadow .3s var(--rtp-ease-out); }
.rtp-table tbody tr:hover{ background:var(--rtp-g3); box-shadow:inset 3px 0 0 var(--rtp-green); }
.rtp-table tbody tr[aria-selected="true"]{ background:color-mix(in srgb, var(--rtp-mint) 22%, transparent); box-shadow:inset 3px 0 0 var(--rtp-green); }
.rtp-table tbody tr[hidden]{ display:none; }
.rtp-table .num{ text-align:right; font-variant-numeric:tabular-nums; }
.rtp-table th.num .rtp-th-sort{ justify-content:flex-end; }
.rtp-table th.chk, .rtp-table td.chk{ width:44px; padding-right:0; }
.rtp-table td.act{ text-align:right; }
.rtp-table td.act{ white-space:nowrap; }
.rtp-table td.act .rtp-icon-btn{ display:inline-grid; vertical-align:middle; }
.rtp-table td.act .rtp-icon-btn + .rtp-icon-btn{ margin-left:4px; }
.rtp-th-sort{ all:unset; cursor:pointer; display:inline-flex; align-items:center; gap:6px; font:inherit; letter-spacing:inherit; text-transform:inherit; color:inherit; border-radius:6px; }
.rtp-th-sort:focus-visible{ outline:2px solid var(--rtp-green); outline-offset:3px; }
.rtp-th-sort .rtp-ic{ width:12px; height:12px; opacity:0; transition:opacity .25s, transform .45s var(--rtp-spring-snappy); }
.rtp-th-sort:hover .rtp-ic{ opacity:.45; }
th[aria-sort="ascending"] .rtp-ic, th[aria-sort="descending"] .rtp-ic{ opacity:1; color:var(--rtp-green); }
th[aria-sort="descending"] .rtp-ic{ transform:rotate(180deg); }
.rtp-cell-person{ display:flex; align-items:center; gap:12px; font-weight:600; }
.rtp-cell-person small{ display:block; font-weight:500; font-size:10px; color:var(--rtp-t2); margin-top:2px; }
.rtp-cell-prog{ display:flex; align-items:center; gap:10px; min-width:130px; }
.rtp-cell-prog .rtp-progress{ flex:1; margin-top:0; height:6px; }
.rtp-cell-prog .rtp-num{ font-size:11px; font-weight:700; min-width:34px; text-align:right; }
.rtp-table .rtp-avgroup .rtp-av{ width:26px; height:26px; font-size:9px; margin-left:-8px; }
.rtp-table .rtp-avgroup .rtp-av:first-child{ margin-left:0; }
.rtp-table-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 18px 16px; }
.rtp-table-foot .rtp-select{ width:auto; min-width:74px; padding-right:38px; }
.rtp-pager{ display:flex; align-items:center; gap:6px; }
.rtp-pager .rtp-chip{ min-width:30px; padding:6px 0; text-align:center; }
.rtp-pager .rtp-icon-btn[disabled]{ opacity:.35; cursor:default; }
.rtp-table-empty{ display:none; padding:34px 18px; text-align:center; color:var(--rtp-t2); font-size:12px; }
.rtp-table-card.is-empty .rtp-table-empty{ display:block; }
.rtp-table--compact tbody td{ padding:7px 16px; }
/* checkbox */
.rtp-check{ position:relative; display:inline-grid; place-items:center; width:18px; height:18px; cursor:pointer; vertical-align:middle; }
.rtp-check input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.rtp-check span{ width:18px; height:18px; border-radius:6px; border:1.5px solid var(--rtp-t3); background:var(--rtp-g2); display:grid; place-items:center; transition:background .25s var(--rtp-ease-out), border-color .25s, transform .35s var(--rtp-spring-snappy); }
.rtp-check span::after{ content:""; width:9px; height:5px; border-left:2px solid var(--rtp-on-ink); border-bottom:2px solid var(--rtp-on-ink); transform:rotate(-45deg) scale(0); margin-top:-2px; transition:transform .3s var(--rtp-spring-snappy); }
.rtp-check input:checked + span, .rtp-check input:indeterminate + span{ background:var(--rtp-green); border-color:var(--rtp-green); }
.rtp-check input:checked + span::after{ transform:rotate(-45deg) scale(1); }
.rtp-check input:indeterminate + span::after{ width:8px; height:0; border-left:0; transform:scale(1); margin-top:0; }
.rtp-check input:focus-visible + span{ box-shadow:0 0 0 3px color-mix(in srgb, var(--rtp-green) 28%, transparent); }
.rtp-check:active span{ transform:scale(.88); }
/* estado de carga */
.rtp-table-card.is-loading tbody td > *{ opacity:0; }
.rtp-table-card.is-loading tbody td{ position:relative; }
.rtp-table-card.is-loading tbody td::after{
  content:""; position:absolute; left:16px; right:16px; top:50%; height:10px; margin-top:-5px; border-radius:99px; overflow:hidden;
  background:linear-gradient(90deg, var(--rtp-track) 25%, var(--rtp-g3) 50%, var(--rtp-track) 75%) 100% 0 / 300% 100%; animation:rtp-tbl-shim 1.3s linear infinite;
}
.rtp-table-card.is-loading tbody td.chk::after, .rtp-table-card.is-loading tbody td.act::after{ right:auto; width:18px; left:16px; }
@keyframes rtp-tbl-shim{ to{ background-position:-100% 0; } }
/* en pantallas angostas: modo tarjeta (añade rtp-table--stack y data-rtp-label en cada td) */
@container rtptable (max-width:640px){
  .rtp-table--stack thead{ display:none; }
  .rtp-table--stack, .rtp-table--stack tbody, .rtp-table--stack tr, .rtp-table--stack td{ display:block; }
  .rtp-table--stack tbody tr{ padding:12px 16px; border-bottom:1px solid var(--rtp-track); }
  .rtp-table--stack tbody td{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:6px 0; border:0; white-space:normal; text-align:right; }
  .rtp-table--stack tbody td::before{ content:attr(data-rtp-label); font:600 10px/1 var(--rtp-font); letter-spacing:.06em; text-transform:uppercase; color:var(--rtp-t2); text-align:left; }
  .rtp-table--stack tbody td.chk, .rtp-table--stack tbody td[data-rtp-label=""]::before{ display:none; }
  .rtp-table--stack .rtp-cell-person{ text-align:left; }
  .rtp-table--stack tbody td.act{ justify-content:flex-end; gap:8px; }
}
@media (prefers-reduced-motion: reduce){ .rtp-table-card.is-loading tbody td::after{ animation:none; } .rtp-th-sort .rtp-ic, .rtp-check span, .rtp-check span::after{ transition:none; } }


/* ===== Layout de aplicación: rail fuera del flujo normal (patrón Zeus) =====
   <div class="rtp-shell rtp-shell--app"> <rtp-sidebar> o <nav class="rtp-rail"> + <main> </div>: el rail ocupa todo el alto, <main> hace su propio scroll y el body no se desplaza. */
.rtp-shell--app{ display:flex; gap:18px; height:100vh; height:100dvh; padding:16px; box-sizing:border-box; overflow:hidden; }
.rtp-shell--app > .rtp-rail, .rtp-shell--app > rtp-sidebar > .rtp-rail{ position:relative; align-self:stretch; flex:none; min-height:0; }
.rtp-shell--app > rtp-sidebar{ align-self:stretch; flex:none; }
.rtp-shell--app > main{ flex:1 1 auto; min-width:0; overflow-y:auto; scrollbar-gutter:stable; }
/* Página que ocupa todo el alto (listados): cabecera arriba y la tabla llena el resto con su propio desplazamiento */
.rtp-shell--app > main.rtp-fill{ display:flex; flex-direction:column; overflow:visible; padding:4px 8px 8px; scrollbar-gutter:auto; }
.rtp-fill > .rtp-topbar{ flex:none; }
.rtp-fill > .rtp-container, .rtp-fill > rtp-table{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
rtp-table[fill]{ display:flex; flex-direction:column; flex:1 1 auto; min-height:0; height:100%; }
rtp-table[fill] > .rtp-table-card, .rtp-table-card--fill{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
rtp-table[fill] .rtp-table-scroll, .rtp-table-card--fill .rtp-table-scroll{ flex:1 1 auto; min-height:0; max-height:none; }
.rtp-shell--app > main, .rtp-table-scroll, .rtp-modal-body{ scrollbar-width:thin; scrollbar-color:color-mix(in srgb, var(--rtp-t3) 75%, transparent) transparent; }
rtp-sidebar{ display:flex; min-width:60px; }   /* reserva el ancho del rail mientras se registra el componente */
rtp-sidebar:not(:defined), rtp-sidebar[data-rtp-defer]{ display:block; width:60px; flex:none; align-self:stretch; border-radius:30px; background:var(--rtp-ink); box-shadow:0 12px 34px rgba(18,48,42,.28); min-height:min(560px, calc(100dvh - 32px)); }   /* silueta del menú desde el primer pintado */

/* Rail con muchos ítems: se desplaza por dentro; el logo queda fijo y el indicador sigue al ítem marcado */
.rtp-rail-scroll{ position:relative; flex:1 1 auto; min-height:0; width:100%; display:flex; flex-direction:column; align-items:center; gap:6px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:none; }
.rtp-rail-scroll::-webkit-scrollbar{ display:none; }
.rtp-rail.is-expanded .rtp-rail-scroll{ align-items:stretch; }
.rtp-rail-scroll > .rtp-spacer{ flex:1 0 8px; }

/* ===== Fondo de la página sin background-attachment: fixed =====
   .rtp-bg-layer (en <body>): el fondo vive en una capa fija detrás del contenido; evita el bug de compositing de Chrome con hijos sticky, transform o filter.
   .rtp-bg-scroll: el mismo fondo, pero se desplaza con la página. */
.rtp-bg-layer{ background-color:var(--rtp-bg-base); isolation:isolate; }
.rtp-bg-layer::before{ content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; background-image:var(--rtp-body-bg); }
.rtp-bg-scroll{ background-color:var(--rtp-bg-base); background-image:var(--rtp-body-bg); background-attachment:scroll; }


/* ============================================================
   FORMULARIOS · todos los controles nativos con el estilo del sistema
   ============================================================ */
:root{ color-scheme:light; }
:root[data-rtp-theme="dark"]{ color-scheme:dark; }
.rtp-form{ display:grid; gap:16px; container-type:inline-size; width:100%; }
.rtp-form .rtp-field{ margin-bottom:0; }
.rtp-form-row{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; align-items:start; }
@container (max-width:560px){ .rtp-form-row{ grid-template-columns:1fr; } }
.rtp-form-actions{ display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; padding-top:4px; }
.rtp-fieldset{ border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-md); background:var(--rtp-g1); padding:16px 18px 18px; margin:0; min-width:0; display:grid; gap:14px; }
.rtp-fieldset > legend{ padding:0 8px; margin-left:-8px; font:700 12px var(--rtp-font); color:var(--rtp-t1); }
.rtp-field-label{ display:flex; align-items:center; gap:6px; font:600 12px var(--rtp-font); color:var(--rtp-t1); }
.rtp-req::after{ content:" *"; color:var(--rtp-err); }
.rtp-help{ font:500 11.5px/1.45 var(--rtp-font); color:var(--rtp-t2); }
.rtp-error{ font:600 11.5px/1.4 var(--rtp-font); color:var(--rtp-err); max-height:0; opacity:0; overflow:hidden; transition:max-height .35s var(--rtp-spring-smooth), opacity .25s var(--rtp-ease-out); }
.rtp-field:has([aria-invalid="true"]) .rtp-error, .rtp-field.is-invalid .rtp-error{ max-height:5em; opacity:1; }
:is(.rtp-text, .rtp-select, .rtp-textarea)[aria-invalid="true"], .rtp-field.is-invalid :is(.rtp-text, .rtp-select, .rtp-textarea){ border-color:var(--rtp-err); box-shadow:0 0 0 3px color-mix(in srgb, var(--rtp-err) 16%, transparent); }
.rtp-field.is-valid :is(.rtp-text, .rtp-select, .rtp-textarea){ border-color:var(--rtp-ok); }
:is(.rtp-text, .rtp-select, .rtp-textarea):disabled{ opacity:.55; cursor:not-allowed; background:var(--rtp-track); }
:is(.rtp-text, .rtp-textarea):read-only:not(:disabled){ background:transparent; border-style:dashed; }
.rtp-textarea{ min-height:96px; resize:vertical; line-height:1.5; }
.rtp-select{ appearance:none; -webkit-appearance:none; padding-right:38px; cursor:pointer;
  background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size:6px 6px, 6px 6px; background-repeat:no-repeat; }
.rtp-select[multiple], .rtp-select[size]:not([size="1"]){ background-image:none; padding-right:14px; min-height:110px; }
.rtp-select option, .rtp-select optgroup{ background:var(--rtp-pop-bg); color:var(--rtp-t1); }
.rtp-text[type="color"]{ padding:4px; height:40px; width:64px; cursor:pointer; }
.rtp-text[type="file"], .rtp-file{ padding:8px 10px; cursor:pointer; }
.rtp-text[type="file"]::file-selector-button, .rtp-file::file-selector-button{ margin-right:12px; border:0; border-radius:999px; padding:7px 14px; cursor:pointer; background:var(--rtp-ink); color:var(--rtp-on-ink); font:600 12px var(--rtp-font); transition:transform .3s var(--rtp-spring-snappy); }
.rtp-text[type="file"]::file-selector-button:hover, .rtp-file::file-selector-button:hover{ transform:translateY(-1px); }
.rtp-text[type="search"]::-webkit-search-cancel-button{ cursor:pointer; }
.rtp-dropzone{ display:grid; place-items:center; gap:6px; text-align:center; padding:28px 18px; border:1.5px dashed var(--rtp-t3); border-radius:var(--rtp-r-md); background:var(--rtp-g1); color:var(--rtp-t2); font:600 12.5px var(--rtp-font); cursor:pointer; transition:border-color .25s, background .25s, transform .4s var(--rtp-spring-snappy); }
.rtp-dropzone:hover, .rtp-dropzone.is-over{ border-color:var(--rtp-green); background:color-mix(in srgb, var(--rtp-mint) 18%, transparent); transform:translateY(-2px); }
.rtp-dropzone input{ position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.rtp-input-group{ display:flex; align-items:stretch; }
.rtp-input-group > .rtp-text{ border-radius:0; min-width:0; flex:1; }
.rtp-input-group > :first-child{ border-radius:var(--rtp-r-md) 0 0 var(--rtp-r-md); }
.rtp-input-group > :last-child{ border-radius:0 var(--rtp-r-md) var(--rtp-r-md) 0; }
.rtp-input-addon{ display:grid; place-items:center; padding:0 14px; border:1px solid var(--rtp-g-border); background:var(--rtp-track); color:var(--rtp-t2); font:600 12px var(--rtp-font); white-space:nowrap; }
.rtp-input-icon{ position:relative; display:grid; align-items:center; }
.rtp-input-icon > .rtp-text, .rtp-input-icon > .rtp-ic{ grid-area:1 / 1; }
.rtp-input-icon > .rtp-ic{ justify-self:start; align-self:center; margin-left:12px; width:18px; height:18px; color:var(--rtp-t3); pointer-events:none; z-index:1; }
.rtp-input-icon > .rtp-text{ padding-left:38px; }
.rtp-choices{ display:flex; flex-wrap:wrap; gap:10px 20px; }
.rtp-choice{ display:inline-flex; align-items:center; gap:10px; cursor:pointer; font:600 13px var(--rtp-font); color:var(--rtp-t1); }
.rtp-radio{ position:relative; display:inline-grid; place-items:center; width:18px; height:18px; flex:none; cursor:pointer; vertical-align:middle; }
.rtp-radio input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.rtp-radio span{ width:18px; height:18px; border-radius:50%; border:1.5px solid var(--rtp-t3); background:var(--rtp-g2); display:grid; place-items:center; transition:background .25s var(--rtp-ease-out), border-color .25s, transform .35s var(--rtp-spring-snappy); }
.rtp-radio span::after{ content:""; width:8px; height:8px; border-radius:50%; background:var(--rtp-on-ink); transform:scale(0); transition:transform .3s var(--rtp-spring-snappy); }
.rtp-radio input:checked + span{ background:var(--rtp-green); border-color:var(--rtp-green); }
.rtp-radio input:checked + span::after{ transform:scale(1); }
.rtp-radio input:focus-visible + span{ box-shadow:0 0 0 3px color-mix(in srgb, var(--rtp-green) 28%, transparent); }
.rtp-radio:active span{ transform:scale(.88); }
:is(.rtp-check, .rtp-radio) input:disabled + span{ opacity:.5; }
.rtp-choice:has(input:disabled){ cursor:not-allowed; opacity:.7; }
.rtp-toggle{ position:relative; display:inline-flex; align-items:center; gap:10px; cursor:pointer; font:600 13px var(--rtp-font); color:var(--rtp-t1); }
.rtp-toggle input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.rtp-toggle input:checked + .rtp-switch-track{ background:var(--rtp-green); }
.rtp-toggle input:checked + .rtp-switch-track .rtp-switch-thumb{ left:23px; }
.rtp-toggle input:focus-visible + .rtp-switch-track{ box-shadow:0 0 0 3px color-mix(in srgb, var(--rtp-green) 28%, transparent); }
.rtp-toggle input:disabled + .rtp-switch-track{ opacity:.5; }
.rtp-range{ -webkit-appearance:none; appearance:none; width:100%; height:6px; border-radius:99px; outline:none; cursor:pointer; margin:8px 0;
  background:linear-gradient(to right, var(--rtp-green) var(--rtp-fill, 50%), var(--rtp-track) var(--rtp-fill, 50%)); }
.rtp-range::-webkit-slider-thumb{ -webkit-appearance:none; width:20px; height:20px; border-radius:50%; background:#fff; border:0; box-shadow:0 2px 8px rgba(0,0,0,.28), 0 0 0 3px color-mix(in srgb, var(--rtp-green) 35%, transparent); transition:transform .3s var(--rtp-spring-snappy); }
.rtp-range::-moz-range-thumb{ width:20px; height:20px; border-radius:50%; background:#fff; border:0; box-shadow:0 2px 8px rgba(0,0,0,.28), 0 0 0 3px color-mix(in srgb, var(--rtp-green) 35%, transparent); }
.rtp-range:active::-webkit-slider-thumb{ transform:scale(1.18); }
.rtp-range:focus-visible{ box-shadow:0 0 0 3px color-mix(in srgb, var(--rtp-green) 28%, transparent); }
@keyframes rtp-shake{ 10%, 90%{ transform:translateX(-1px); } 20%, 80%{ transform:translateX(3px); } 30%, 50%, 70%{ transform:translateX(-5px); } 40%, 60%{ transform:translateX(5px); } }
.rtp-shake{ animation:rtp-shake .45s cubic-bezier(.36,.07,.19,.97); }
@media (prefers-reduced-motion: reduce){ .rtp-shake{ animation:none; } .rtp-error{ transition:none; } .rtp-range::-webkit-slider-thumb, .rtp-dropzone{ transition:none; } }

/* ============================================================
   CAPA BASE · aplica el sistema a TODOS los elementos HTML (opt-in: class="rtp-base" en <body> o en un contenedor).
   Usa :where() (especificidad 0): cualquier clase .rtp-*, o utilidades de Tailwind, siguen ganando.
   ============================================================ */
:where(.rtp-base){ font-family:var(--rtp-font); font-size:14px; line-height:1.55; color:var(--rtp-t1); accent-color:var(--rtp-green); -webkit-font-smoothing:antialiased; scrollbar-color:color-mix(in srgb, var(--rtp-t3) 80%, transparent) transparent; }
:where(.rtp-base) :where(*){ scrollbar-color:color-mix(in srgb, var(--rtp-t3) 80%, transparent) transparent; }
:where(.rtp-base) ::selection{ background:color-mix(in srgb, var(--rtp-green) 28%, transparent); }
:where(.rtp-base) :where(:focus-visible){ outline:2px solid var(--rtp-green); outline-offset:2px; }
:where(.rtp-base) :is(h1, h2, h3, h4, h5, h6){ font-family:var(--rtp-font); color:var(--rtp-t1); margin:0 0 .5em; line-height:1.15; letter-spacing:-.02em; font-weight:700; }
:where(.rtp-base) h1{ font-size:clamp(28px, 4vw, 38px); font-weight:800; }
:where(.rtp-base) h2{ font-size:26px; } :where(.rtp-base) h3{ font-size:20px; } :where(.rtp-base) h4{ font-size:16px; } :where(.rtp-base) h5{ font-size:14px; }
:where(.rtp-base) h6{ font:500 11px var(--rtp-font-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--rtp-t2); }
:where(.rtp-base) p{ margin:0 0 1em; }
:where(.rtp-base) a{ color:var(--rtp-green); text-underline-offset:3px; text-decoration-color:color-mix(in srgb, var(--rtp-green) 45%, transparent); transition:color .2s, text-decoration-color .2s; }
:where(.rtp-base) a:hover{ color:var(--rtp-ink-2); text-decoration-color:currentColor; }
:where(.rtp-base) :is(small, figcaption, caption){ font-size:12px; color:var(--rtp-t2); }
:where(.rtp-base) strong, :where(.rtp-base) b{ font-weight:700; }
:where(.rtp-base) mark{ background:color-mix(in srgb, var(--rtp-warn) 32%, transparent); color:inherit; padding:0 .25em; border-radius:4px; }
:where(.rtp-base) :is(code, kbd, samp, pre){ font-family:var(--rtp-font-mono); font-size:.9em; }
:where(.rtp-base) code{ background:var(--rtp-track); padding:.1em .4em; border-radius:6px; }
:where(.rtp-base) pre{ background:var(--rtp-track); padding:14px 16px; border-radius:var(--rtp-r-md); overflow:auto; margin:0 0 1em; }
:where(.rtp-base) pre code{ background:none; padding:0; }
:where(.rtp-base) kbd{ border:1px solid var(--rtp-g-border); border-bottom-width:2px; background:var(--rtp-g2); border-radius:6px; padding:.1em .45em; }
:where(.rtp-base) blockquote{ margin:0 0 1em; padding:8px 16px; border-left:3px solid var(--rtp-green); background:var(--rtp-g1); border-radius:0 var(--rtp-r-md) var(--rtp-r-md) 0; color:var(--rtp-t2); }
:where(.rtp-base) hr{ border:0; height:1px; background:var(--rtp-track); margin:20px 0; }
:where(.rtp-base) :is(ul, ol){ padding-left:1.4em; margin:0 0 1em; }
:where(.rtp-base) li::marker{ color:var(--rtp-green); }
:where(.rtp-base) dt{ font-weight:700; } :where(.rtp-base) dd{ margin:0 0 .6em; color:var(--rtp-t2); }
:where(.rtp-base) :is(img, video, canvas, picture, iframe){ max-width:100%; border-radius:var(--rtp-r-md); }
:where(.rtp-base) figure{ margin:0 0 1em; }
:where(.rtp-base) abbr[title]{ text-decoration:underline dotted; cursor:help; }
:where(.rtp-base) address{ font-style:normal; }
:where(.rtp-base) :is(sub, sup){ font-size:.75em; }
:where(.rtp-base) del{ color:var(--rtp-t2); } :where(.rtp-base) ins{ text-decoration-color:var(--rtp-ok); }
:where(.rtp-base) details{ border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-md); background:var(--rtp-g1); padding:0 16px; margin:0 0 10px; }
:where(.rtp-base) summary{ cursor:pointer; padding:12px 0; font-weight:700; list-style:none; display:flex; align-items:center; justify-content:space-between; gap:12px; }
:where(.rtp-base) summary::-webkit-details-marker{ display:none; }
:where(.rtp-base) summary::after{ content:""; width:8px; height:8px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); transition:transform .35s var(--rtp-spring-snappy); flex:none; }
:where(.rtp-base) details[open] summary::after{ transform:rotate(-135deg); }
:where(.rtp-base) details[open] > :not(summary){ animation:rtp-detail-in .4s var(--rtp-ease-out); }
@keyframes rtp-detail-in{ from{ opacity:0; transform:translateY(-6px); } }
:where(.rtp-base) progress{ -webkit-appearance:none; appearance:none; width:100%; height:6px; border:0; border-radius:99px; background:var(--rtp-track); overflow:hidden; }
:where(.rtp-base) progress::-webkit-progress-bar{ background:var(--rtp-track); border-radius:99px; }
:where(.rtp-base) progress::-webkit-progress-value{ background:var(--rtp-green); border-radius:99px; transition:width .6s var(--rtp-ease-out); }
:where(.rtp-base) progress::-moz-progress-bar{ background:var(--rtp-green); border-radius:99px; }
:where(.rtp-base) meter{ width:100%; height:8px; accent-color:var(--rtp-green); }
:where(.rtp-base) label{ font-weight:600; }
:where(.rtp-base) :is(input, select, textarea, button):where(:not([class])){ font-family:var(--rtp-font); }
:where(.rtp-base) input:where(:not([class])):not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="hidden"]),
:where(.rtp-base) select:where(:not([class])), :where(.rtp-base) textarea:where(:not([class])){
  width:100%; box-sizing:border-box; padding:10px 14px; border-radius:var(--rtp-r-md); border:1px solid var(--rtp-g-border); background:var(--rtp-g2); color:var(--rtp-t1);
  font:500 13px var(--rtp-font); outline:none; transition:box-shadow .25s var(--rtp-ease-out), border-color .25s; }
:where(.rtp-base) :is(input, select, textarea):where(:not([class])):focus{ border-color:var(--rtp-green); box-shadow:0 0 0 3px color-mix(in srgb, var(--rtp-green) 22%, transparent); }
:where(.rtp-base) :is(input, select, textarea):where(:not([class]))[aria-invalid="true"]{ border-color:var(--rtp-err); }
:where(.rtp-base) :is(input, select, textarea):where(:not([class])):disabled{ opacity:.55; cursor:not-allowed; background:var(--rtp-track); }
:where(.rtp-base) textarea:where(:not([class])){ min-height:96px; resize:vertical; line-height:1.5; }
:where(.rtp-base) select:where(:not([class])){ appearance:none; -webkit-appearance:none; padding-right:38px; cursor:pointer;
  background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size:6px 6px, 6px 6px; background-repeat:no-repeat; }
:where(.rtp-base) :is(input[type="checkbox"], input[type="radio"]):where(:not([class])){ width:18px; height:18px; accent-color:var(--rtp-green); cursor:pointer; vertical-align:middle; }
:where(.rtp-base) input[type="range"]:where(:not([class])){ width:100%; accent-color:var(--rtp-green); }
:where(.rtp-base) :is(button, input[type="submit"], input[type="button"], input[type="reset"]):where(:not([class])){
  display:inline-flex; align-items:center; justify-content:center; gap:6px; border:0; cursor:pointer; font:600 12px var(--rtp-font); padding:9px 16px; border-radius:var(--rtp-r-pill);
  background:var(--rtp-ink); color:var(--rtp-on-ink); transition:transform .3s var(--rtp-spring), box-shadow .3s var(--rtp-ease-out); }
:where(.rtp-base) :is(button, input[type="submit"], input[type="button"], input[type="reset"]):where(:not([class])):hover{ transform:translateY(-1px); box-shadow:var(--rtp-sh-card); }
:where(.rtp-base) :is(button, input[type="submit"], input[type="button"], input[type="reset"]):where(:not([class])):disabled{ opacity:.55; cursor:not-allowed; transform:none; }
:where(.rtp-base) fieldset:where(:not([class])){ border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-md); background:var(--rtp-g1); padding:16px 18px; margin:0 0 14px; min-width:0; }
:where(.rtp-base) legend:where(:not([class])){ padding:0 8px; font-weight:700; font-size:12px; }
:where(.rtp-base) table:where(:not([class])){ width:100%; border-collapse:separate; border-spacing:0; font-size:12px; margin:0 0 1em; }
:where(.rtp-base) table:where(:not([class])) :is(th, td){ padding:12px 16px; text-align:left; border-bottom:1px solid var(--rtp-track); vertical-align:middle; }
:where(.rtp-base) table:where(:not([class])) th{ font:600 10px/1 var(--rtp-font); letter-spacing:.06em; text-transform:uppercase; color:var(--rtp-t2); background:color-mix(in srgb, var(--rtp-green) 8%, transparent); white-space:nowrap; }
:where(.rtp-base) table:where(:not([class])) tbody tr{ transition:background .3s var(--rtp-ease-out); }
:where(.rtp-base) table:where(:not([class])) tbody tr:hover{ background:var(--rtp-g3); }
:where(.rtp-base) dialog:where(:not(.rtp-modal)){ border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-lg); background:var(--rtp-pop-bg); color:var(--rtp-t1); box-shadow:var(--rtp-sh-hover); padding:20px 22px; margin:auto; }
:where(.rtp-base) dialog:where(:not(.rtp-modal))::backdrop{ background:rgba(6,18,36,.42); backdrop-filter:blur(6px); }
@media (prefers-reduced-motion: reduce){ :where(.rtp-base) details[open] > :not(summary){ animation:none; } :where(.rtp-base) summary::after{ transition:none; } }

/* ============================================================
   LAYOUT CENTRADO, CABECERA DE PÁGINA Y BOTÓN DE TEMA
   ============================================================ */
.rtp-container{ width:min(100% - 2 * var(--rtp-gutter, 24px), var(--rtp-container, 1200px)); margin-inline:auto; }
.rtp-container--narrow{ --rtp-container:760px; } .rtp-container--wide{ --rtp-container:1480px; }
.rtp-container--full{ width:auto; max-width:none; margin-inline:var(--rtp-gutter, 24px); }   /* ancho completo: listados y tablas */
.rtp-center{ display:grid; place-items:center; min-height:var(--rtp-center-h, 60vh); text-align:center; }
.rtp-stack-center{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:12px; }
.rtp-topbar{ position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:14px; padding:12px 76px 12px 18px; margin-bottom:18px;
  border-radius:var(--rtp-r-lg); background:var(--rtp-g2); border:1px solid var(--rtp-g-border); box-shadow:var(--rtp-sh-card); -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%); }
.rtp-topbar-title{ margin:0; font:700 16px var(--rtp-font); letter-spacing:-.01em; color:var(--rtp-t1); }
.rtp-topbar-main{ min-width:0; display:grid; gap:3px; }
.rtp-topbar-desc{ margin:0; font:500 13px/1.4 var(--rtp-font); color:var(--rtp-t2); }
.rtp-eyebrow{ display:inline-flex; align-items:center; width:fit-content; padding:3px 10px; border-radius:99px; font:500 10.5px/1.4 var(--rtp-font-mono); letter-spacing:.14em; text-transform:uppercase;
  color:var(--rtp-green); background:color-mix(in srgb, var(--rtp-mint) 26%, transparent); border:1px solid color-mix(in srgb, var(--rtp-green) 30%, transparent); }
.rtp-kpis{ display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:16px; margin-bottom:18px; }
.rtp-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(var(--rtp-grid-min, 280px), 1fr)); gap:16px; }
.rtp-stack{ display:grid; gap:var(--rtp-gap, 16px); }
/* ===== Inicio de sesión ===== */
.rtp-auth{ min-height:100vh; min-height:100dvh; display:grid; place-items:center; padding:24px; box-sizing:border-box; }
.rtp-auth-card{ width:min(100%, 420px); display:grid; gap:20px; padding:34px 30px 28px; text-align:center; }
.rtp-auth-brand{ display:grid; justify-items:center; gap:14px; }
.rtp-auth-logo{ width:58px; height:58px; border-radius:19px; display:grid; place-items:center; background:var(--rtp-ink); color:var(--rtp-on-ink); box-shadow:var(--rtp-sh-card); }
.rtp-auth-logo .rtp-ic{ width:27px; height:27px; }
.rtp-auth-name{ margin:0; font:italic 400 38px/1 var(--rtp-font-serif); color:var(--rtp-t1); letter-spacing:0; }
.rtp-auth-title{ margin:0; font:700 17px/1.3 var(--rtp-font); color:var(--rtp-t1); letter-spacing:-.01em; }
.rtp-auth-desc{ margin:0; font:500 13px/1.5 var(--rtp-font); color:var(--rtp-t2); }
.rtp-auth-note{ margin:0; font:500 12px/1.5 var(--rtp-font); color:var(--rtp-t2); }
.rtp-auth-note code{ font-family:var(--rtp-font-mono); font-size:11.5px; color:var(--rtp-t1); }
.rtp-auth-link{ justify-self:center; font:600 12px var(--rtp-font); color:var(--rtp-green); text-decoration:underline; text-underline-offset:3px; cursor:pointer; background:none; border:0; padding:2px 4px; transition:color .2s; }
.rtp-auth-link:hover{ color:var(--rtp-ink-2); }
.rtp-btn-block{ display:flex; width:100%; justify-content:center; }
.rtp-btn-provider{ display:inline-flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:13px 18px; border-radius:var(--rtp-r-pill); border:1px solid var(--rtp-g-border); background:var(--rtp-g3);
  color:var(--rtp-t1); font:700 13px var(--rtp-font); cursor:pointer; box-shadow:var(--rtp-sh-card); transition:transform .35s var(--rtp-spring), box-shadow .35s var(--rtp-ease-out); }
.rtp-btn-provider:hover{ transform:translateY(-2px); box-shadow:var(--rtp-sh-hover); }
.rtp-btn-provider:active{ transform:scale(.98); }
.rtp-btn-provider svg{ width:18px; height:18px; flex:none; }
.rtp-divider{ display:flex; align-items:center; gap:12px; color:var(--rtp-t3); font:500 10.5px var(--rtp-font-mono); text-transform:uppercase; letter-spacing:.14em; }
.rtp-divider::before, .rtp-divider::after{ content:""; flex:1; height:1px; background:var(--rtp-track); }
@media (prefers-reduced-motion: reduce){ .rtp-btn-provider{ transition:none; } }
.rtp-topbar-crumbs{ font:500 12px var(--rtp-font); color:var(--rtp-t2); }
.rtp-topbar-actions{ margin-left:auto; display:flex; align-items:center; gap:10px; }
rtp-theme-toggle{ position:fixed; top:16px; right:16px; z-index:60; display:block; }
rtp-theme-toggle[inline]{ position:static; display:inline-block; }
.rtp-theme-btn{ width:42px; height:42px; border-radius:50%; border:1px solid var(--rtp-g-border); background:var(--rtp-g3); color:var(--rtp-t1); display:grid; place-items:center; cursor:pointer; box-shadow:var(--rtp-sh-card);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); transition:transform .45s var(--rtp-spring-snappy), background .25s, box-shadow .3s; }
.rtp-theme-btn:hover{ transform:translateY(-2px) scale(1.06); box-shadow:var(--rtp-sh-hover); }
.rtp-theme-btn:active{ transform:scale(.92); }
.rtp-theme-btn:focus-visible{ outline:2px solid var(--rtp-green); outline-offset:2px; }
rtp-appearance{ display:block; }
.rtp-appearance{ display:block; }
.rtp-settings{ container-type:inline-size; display:grid; }
.rtp-setting{ display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:10px 24px; padding:18px 0; border-top:1px solid var(--rtp-track); }
.rtp-settings > .rtp-setting:first-child{ border-top:0; padding-top:4px; }
.rtp-settings > .rtp-setting:last-child{ padding-bottom:4px; }
.rtp-setting--stack{ grid-template-columns:1fr; }
.rtp-setting-title{ font:700 13px/1.3 var(--rtp-font); color:var(--rtp-t1); }
.rtp-setting-desc{ margin:3px 0 0; font:500 12px/1.45 var(--rtp-font); color:var(--rtp-t2); max-width:60ch; }
.rtp-setting .rtp-chips{ display:flex; flex-wrap:wrap; gap:8px; }
@container (max-width:520px){ .rtp-setting{ grid-template-columns:1fr; } }

/* ============================================================
   SIDEBAR · submenús (acordeón con el rail expandido, flyout con el rail contraído)
   ============================================================ */
.rtp-rail-group{ display:flex; flex-direction:column; align-items:center; width:100%; gap:6px; }
.rtp-rail.is-expanded .rtp-rail-group{ align-items:stretch; }
.rtp-rail-chev{ display:none; margin-left:auto; width:14px; height:14px; flex:none; transition:transform .45s var(--rtp-spring-snappy), opacity .2s; opacity:.75; }
.rtp-rail.is-expanded .rtp-rail-parent .rtp-rail-chev{ display:block; }
.rtp-rail-parent[aria-expanded="true"] .rtp-rail-chev{ transform:rotate(90deg); }
.rtp-rail-sub{ display:none; }
.rtp-rail.is-expanded .rtp-rail-sub:not([popover]){ display:grid; grid-template-rows:0fr; transition:grid-template-rows .5s var(--rtp-spring-smooth); }
.rtp-rail.is-expanded .rtp-rail-parent[aria-expanded="true"] + .rtp-rail-sub:not([popover]){ grid-template-rows:1fr; }
.rtp-rail-sub-inner{ min-height:0; overflow:hidden; display:flex; flex-direction:column; gap:2px; margin-left:19px; padding-left:12px; border-left:1px solid color-mix(in srgb, var(--rtp-on-ink) 18%, transparent); }
.rtp-rail.is-expanded .rtp-rail-parent[aria-expanded="true"][aria-current="true"], .rtp-rail.is-expanded .rtp-rail-parent[aria-expanded="true"][aria-current="true"] .rtp-rail-label{ color:var(--rtp-on-ink); }
.rtp-rail.is-expanded .rtp-rail-parent .rtp-rail-label{ flex:1; text-align:left; }
.rtp-rail-sub-title{ display:none; font:700 11px var(--rtp-font-mono); letter-spacing:.08em; text-transform:uppercase; color:var(--rtp-t2); padding:6px 12px 4px; }
.rtp-rail-subbtn{ display:flex; align-items:center; gap:8px; border:0; background:transparent; color:var(--rtp-on-ink-2); font:600 12.5px var(--rtp-font); text-align:left; padding:8px 12px; border-radius:10px; cursor:pointer; white-space:nowrap; transition:background .25s var(--rtp-ease-out), color .25s; }
.rtp-rail-subbtn svg{ flex-shrink:0; }
.rtp-rail-subbtn:hover{ background:rgba(255,255,255,.11); color:var(--rtp-on-ink); }
.rtp-rail-subbtn{ position:relative; z-index:1; }
.rtp-rail-subbtn[aria-current="true"], .rtp-rail-subbtn[aria-current="true"]:hover{ background:transparent; color:var(--rtp-ink); box-shadow:none; }   /* el fondo lo da el indicador deslizante */
.rtp-rail-ind.on-sub{ border-radius:10px; box-shadow:0 5px 12px rgba(0,0,0,.16); }
.rtp-rail-ind.on-sub::after{ display:none; }
.rtp-rail-sub-pill{ display:none; position:absolute; left:0; right:0; top:0; height:0; z-index:0; border-radius:10px; background:var(--rtp-ink); pointer-events:none; opacity:0;
  transition:transform .5s var(--rtp-spring-smooth), height .3s var(--rtp-spring-smooth), opacity .2s var(--rtp-ease-out); }
.rtp-rail-sub[popover] .rtp-rail-sub-pill{ display:block; }
.rtp-rail-sub[popover]{ position:fixed; inset:auto; margin:0; min-width:200px; padding:8px; overflow:visible; border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-md); background:var(--rtp-pop-bg); color:var(--rtp-t1); box-shadow:var(--rtp-sh-hover); }
.rtp-rail-sub[popover]:popover-open{ display:block; }
.rtp-rail-sub[popover] .rtp-rail-sub-inner{ position:relative; margin:0; padding:0; border:0; overflow:visible; }
.rtp-rail-sub[popover] .rtp-rail-sub-title{ display:block; }
.rtp-rail-sub[popover] .rtp-rail-subbtn{ width:100%; color:var(--rtp-t1); }
.rtp-rail-sub[popover] .rtp-rail-subbtn:hover{ background:var(--rtp-track); }
.rtp-rail-sub[popover] .rtp-rail-subbtn[aria-current="true"], .rtp-rail-sub[popover] .rtp-rail-subbtn[aria-current="true"]:hover{ background:transparent; color:var(--rtp-on-ink); }
@media (prefers-reduced-motion: reduce){ .rtp-rail-sub, .rtp-rail-chev, .rtp-rail-sub-pill{ transition:none !important; } }

/* ============================================================
   TABLAS ADAPTABLES · el espacio disponible es el del CONTENEDOR (no el de la pantalla)
   .rtp-table--stack: tarjetas por fila (≤ 640 px) · .rtp-table--priority: oculta columnas de prioridad baja (≤ 900 px) y media (≤ 720 px)
   ============================================================ */
@container rtptable (min-width:641px) and (max-width:900px){ .rtp-table--priority [data-rtp-priority="low"]{ display:none; } }
@container rtptable (min-width:641px) and (max-width:720px){ .rtp-table--priority [data-rtp-priority="medium"]{ display:none; } }

/* ============================================================
   ALINEACIÓN · todos los controles miden lo mismo y se alinean entre sí
   --rtp-ctl-h es la altura de campos, selectores, grupos y botones: en una misma fila siempre quedan al mismo nivel.
   ============================================================ */
:root{ --rtp-ctl-h:38px; }
input.rtp-text:not([type="file"]):not([type="color"]):not([type="range"]), .rtp-select:not([multiple]):not([size]){ height:var(--rtp-ctl-h); padding-top:0; padding-bottom:0; box-sizing:border-box; }
.rtp-text[type="color"]{ height:var(--rtp-ctl-h); }
.rtp-text[type="file"], .rtp-file{ min-height:var(--rtp-ctl-h); box-sizing:border-box; }
.rtp-text::-webkit-datetime-edit, .rtp-text::-webkit-datetime-edit-fields-wrapper{ padding:0; font:inherit; color:inherit; }
.rtp-text::-webkit-calendar-picker-indicator{ cursor:pointer; opacity:.65; }
.rtp-error{ margin-top:-6px; }
.rtp-field:has([aria-invalid="true"]) .rtp-error, .rtp-field.is-invalid .rtp-error{ margin-top:0; }
.rtp-form-actions, .rtp-table-bar .left, .rtp-table-bar .right, .rtp-topbar-actions{ align-items:center; }
:where(.rtp-base) :is(input, select):where(:not([class])):not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="submit"], [type="button"], [type="reset"], [type="image"]){ height:var(--rtp-ctl-h); padding-top:0; padding-bottom:0; box-sizing:border-box; }
:where(.rtp-base) :is(button, input[type="submit"], input[type="button"], input[type="reset"]):where(:not([class])){ min-height:var(--rtp-ctl-h); }
rtp-theme-toggle[inline] .rtp-theme-btn{ width:var(--rtp-ctl-h); height:var(--rtp-ctl-h); }   /* en una fila con botones y campos mide lo mismo */
.rtp-card--static:hover{ transform:none; box-shadow:var(--rtp-sh-card); }
.rtp-card--static:hover::before{ opacity:0; }
.rtp-resizable{ resize:horizontal; overflow:auto; max-width:100%; min-width:300px; width:100%; border:1.5px dashed var(--rtp-t3); border-radius:var(--rtp-r-md); padding:6px; }

/* Componentes web (custom elements, DOM propio): bloques o en línea según el caso */
rtp-counter, rtp-rise{ display:inline-block; }
rtp-ticks, rtp-bars, rtp-week, rtp-tabs, rtp-toasts, rtp-table{ display:block; }
rtp-table{ width:100%; min-width:0; }

/* Vistas secundarias (Perfil, Nube, Mensajes, Ajustes, Llamadas) */
.rtp-page{ display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:16px; align-content:start; min-width:0; }
.rtp-page > .s12{ grid-column:span 12; } .rtp-page > .s8{ grid-column:span 8; } .rtp-page > .s6{ grid-column:span 6; }
.rtp-page > .s4{ grid-column:span 4; } .rtp-page > .s3{ grid-column:span 3; }
.rtp-row-item{ display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid var(--rtp-track); font-size:12px; font-weight:600; }
.rtp-row-item:last-child{ border-bottom:0; }
.rtp-row-item.two{ grid-template-columns:1fr auto; }
.rtp-row-item small{ display:block; font-weight:500; font-size:10px; color:var(--rtp-t2); margin-top:2px; }
.rtp-row-item .meta{ font-size:10px; color:var(--rtp-t2); font-weight:600; text-align:right; }
.rtp-bubbles{ display:flex; flex-direction:column; gap:10px; margin:14px 0; }
.rtp-bubble{ max-width:78%; padding:10px 14px; border-radius:18px 18px 18px 6px; background:var(--rtp-g2); border:1px solid var(--rtp-g-border); font-size:12px; font-weight:500; line-height:1.4; }
.rtp-bubble.me{ align-self:flex-end; background:var(--rtp-ink); color:var(--rtp-on-ink); border-color:transparent; border-radius:18px 18px 6px 18px; }
.rtp-input{ display:flex; align-items:center; gap:10px; background:var(--rtp-g2); border:1px solid var(--rtp-g-border); border-radius:var(--rtp-r-pill); padding:6px 6px 6px 16px; font-size:12px; color:var(--rtp-t2); }
.rtp-input span{ flex:1; }
.rtp-call-live{ background:var(--rtp-ink); color:var(--rtp-on-ink); border-color:transparent; text-align:center; }
.rtp-call-live .rtp-label{ color:var(--rtp-on-ink-2); }
@media (max-width:1100px){
  .rtp-page > .s8, .rtp-page > .s6, .rtp-page > .s4{ grid-column:span 12; }
  .rtp-page > .s3{ grid-column:span 6; }
}
@media (max-width:400px){ .rtp-page > .s3{ grid-column:span 12; } }

/* Vista Guardados */
.rtp-saved{ display:grid; grid-template-columns:minmax(0,2.2fr) minmax(0,1fr); gap:16px; align-content:start; min-width:0; }
.rtp-saved > .rtp-saved-head{ grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.rtp-saved-head h2{ margin:0; font-size:clamp(20px,3vw,26px); font-weight:600; letter-spacing:-.02em; }
.rtp-saved-head p{ margin:4px 0 0; }
.rtp-saved-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(172px,1fr)); gap:14px; align-content:start; }

@media (max-width:1100px){ .rtp-saved{ grid-template-columns:1fr; } }
@media (max-width:700px){
  .rtp-rail-tip{ display:none; }
  .rtp-shell > .rtp-view{ grid-column:1; grid-row:2; }
}
@media (prefers-reduced-motion: reduce){
  .rtp-shimmer::after, .rtp-shimmer-text, .rtp-dots i, .rtp-ticks i.on, .rtp-toast.enter{ animation:none; }
  .rtp-dropload:not(.rtp-dropload--value) .rtp-dropload-liq{ animation:none; transform:translateY(42px); }
  .rtp-dl-wave{ animation:none; }
  .rtp-orbs i{ animation:none; transform:rotate(calc(var(--rtp-k) * 120deg)) translateX(var(--rtp-r)); }
  .rtp-ripples::after{ animation:none; }
  #nprogress .spinner-icon{ animation:none; }
  .rtp-ripples i{ animation:none; opacity:.5; } .rtp-ripples i:nth-child(1){ transform:scale(.4); } .rtp-ripples i:nth-child(2){ transform:scale(.7); } .rtp-ripples i:nth-child(3){ transform:scale(1); opacity:.25; }
  .rtp-pillbars i{ animation:none; } .rtp-pillbars i:nth-child(odd){ height:2.2em; } .rtp-pillbars i:nth-child(even){ height:1.2em; }
  dialog.rtp-modal::backdrop, dialog.rtp-modal.is-closing::backdrop{ animation:none; }
  .rtp-roll-strip, .rtp-toast, .rtp-toasts, .rtp-ticks i, .rtp-tabs-ind, .rtp-switch-thumb, .rtp-avgroup .rtp-av, .rtp-bar-track, .rtp-slide-ind, .rtp-slide-ind.to-left, .rtp-slide-ind.to-right, .rtp-hl, .rtp-glide, .rtp-rail-ind{ transition:none !important; }
  .rtp-pre .rtp-rail, .rtp-pre .rtp-card, .rtp-pre .rtp-tile{ opacity:1; animation:none; }
}

/* ---------- Responsive (breakpoints del DS: 1100 / 700 / 600 / 400) ---------- */
@media (max-width:1100px){
  .rtp-dash{ grid-template-columns:1fr; }
  .rtp-row3{ grid-template-columns:1fr 1fr; }
  .rtp-row3 > :last-child{ grid-column:1 / -1; }   /* evita celdas vacías en tableta */
}
@media (max-width:700px){
  .rtp-shell{ grid-template-columns:1fr; }
  .rtp-rail{ width:auto; min-height:0; flex-direction:row; padding:8px 12px; border-radius:26px; overflow-x:auto; }
  .rtp-logo{ margin:0 6px 0 0; }
  .rtp-rail-ind::after{ display:none; }
  .rtp-row3, .rtp-row2{ grid-template-columns:1fr; }
}
@media (max-width:400px){
  .rtp-week{ gap:2px; }
  .rtp-promo{ grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce){
  .rtp-lift, .rtp-card, .rtp-tile, .rtp-btn, .rtp-chip, .rtp-day, .rtp-rail-btn{ transition:none; }
  .rtp-bar-fill, .rtp-impact i, .rtp-progress > i{ transition:none; }
}
