/* ALL WR · Clarity OS — landing pública.
   Light mode dominante (Off White), Navy para estructura, Gold como acento.
   Tipografía: Satoshi (titulares), Inter (cuerpo). Self-hosted en /assets/fonts/.
   El browser carga sólo el subset que necesita gracias a `unicode-range`. */

/* --- Satoshi (titulares, 3 pesos: 500 / 700 / 900) ----------------------- */
@font-face {
    font-family: "Satoshi";
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/satoshi-500.woff2") format("woff2");
}
@font-face {
    font-family: "Satoshi";
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/satoshi-700.woff2") format("woff2");
}
@font-face {
    font-family: "Satoshi";
    font-weight: 900;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/satoshi-900.woff2") format("woff2");
}

/* --- Inter (cuerpo, variable font: 1 archivo cubre 400-700 por subset) --- */
/* Latin (mayoría EU/LATAM/APAC) */
@font-face {
    font-family: "Inter";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Latin Extended (PL CZ HU RO HR SK SL IS BG-rom...) */
@font-face {
    font-family: "Inter";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cyrillic (RU UK SR-cyrl BG) */
@font-face {
    font-family: "Inter";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Cyrillic Extended */
@font-face {
    font-family: "Inter";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/inter-cyrillic-ext.woff2") format("woff2");
    unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* Greek (GR CY) */
@font-face {
    font-family: "Inter";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/inter-greek.woff2") format("woff2");
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Greek Extended */
@font-face {
    font-family: "Inter";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/inter-greek-ext.woff2") format("woff2");
    unicode-range: U+1F00-1FFF;
}
/* Vietnamese (VN) */
@font-face {
    font-family: "Inter";
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/inter-vietnamese.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* --- Novarese Pro (display serif — sólo títulos/cabeceras, corte Bold 700) ---- */
@font-face {
    font-family: "Novarese Pro";
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/novarese-bold.woff2") format("woff2");
}

:root {
    /* Paleta oficial · ficha de marca v1 */
    --allwr-navy:        #02152B;
    --allwr-gold:        #DEAD39;
    --allwr-off-white:   #F8F7F4;

    /* Derivados con contraste reforzado para AA */
    --allwr-navy-soft:   #1B2A45;
    --allwr-gold-soft:   #F1CD7A;
    --allwr-gold-deep:   #B58A23;
    --allwr-line:        #E5E0D6;
    --allwr-line-strong: #C9C2B5;
    --allwr-text:        #02152B;
    --allwr-text-strong: #2A3245;   /* body copy — 8.5:1 sobre off-white */
    --allwr-muted:       #5C6473;   /* sólo placeholders / metadatos pequeños */
    --allwr-loss:        #B23A48;   /* pérdidas, vencidos, errores (rojo de la app) */

    /* Paleta categórica del donut de distribución (orden fijo = taxonomía de
       clases de activo, nunca ciclada). Validada con el método dataviz:
       banda de luminosidad, separación CVD y visión normal en PASS; el suelo
       de croma queda por debajo a propósito (familia tierra de la marca) y se
       compensa con codificación secundaria: huecos entre segmentos y leyenda
       con etiqueta + porcentaje siempre visibles. */
    --allwr-chart-1:     #1D5385;   /* equity_developed */
    --allwr-chart-2:     #C89B2A;   /* equity_emerging */
    --allwr-chart-3:     #7A4A1A;   /* fixed_income_government */
    --allwr-chart-4:     #D9AC61;   /* fixed_income_corporate */
    --allwr-chart-5:     #566B84;   /* fixed_income_inflation_linked */
    --allwr-chart-6:     #C0A863;   /* cash */
    --allwr-chart-7:     #5D7150;   /* mixed */
    --allwr-chart-8:     #BFA089;   /* other */
    --allwr-chart-none:  #6E675E;   /* unclassified — neutro deliberado */
    --allwr-card:        #FFFFFF;
    --allwr-shadow:      0 24px 60px rgba(2, 21, 43, 0.10);
    --allwr-shadow-soft: 0 6px 20px rgba(2, 21, 43, 0.05);
    --allwr-radius:      18px;
    --allwr-radius-sm:   12px;
    --allwr-radius-pill: 999px;

    --allwr-font:        "Satoshi", "Neue Haas Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --allwr-font-body:   "Inter", "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
    --allwr-font-mono:   ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Motion tokens. Cada componente declara qué propiedades anima usando
       estas duraciones — nunca hardcodeadas. Reglas de uso en AGENTS.md §3.5. */
    --allwr-transition-fast: 150ms ease-out;   /* color, background, border, opacity */
    --allwr-transition-base: 200ms ease-out;   /* sombra, underline-grow, layout sutil */
    --allwr-transition-slow: 300ms ease-out;   /* paneles que entran/salen */

    /* Display serif — sólo títulos de página y cabeceras de sección. NUNCA cifras
       ni cuerpo (regla del rediseño ERP). Inerte hasta que un selector lo consuma. */
    --allwr-font-display: "Novarese Pro", Georgia, "Times New Roman", serif;

    /* Escala de espaciado (base 4 / 8) — fuente única para el ritmo de layout. */
    --allwr-space-1: 4px;
    --allwr-space-2: 8px;
    --allwr-space-3: 12px;
    --allwr-space-4: 16px;
    --allwr-space-5: 24px;
    --allwr-space-6: 32px;
    --allwr-space-7: 48px;
    --allwr-space-8: 64px;

    color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--allwr-off-white);
    color: var(--allwr-text);
    font-family: var(--allwr-font-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* Sin zoom por doble pulsación (evita el zoom accidental al tocar dos veces
       un botón). El pinch-zoom sigue vivo — no es user-scalable=no. Un
       descendiente con su propio touch-action (drags, scroll-magnet) lo
       restringe más; esto sólo pone el suelo de la página. */
    touch-action: manipulation;
}

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

::selection { background: var(--allwr-gold-soft); color: var(--allwr-navy); }

/* -----------------------------------------------------------------
   Container y rejillas base
----------------------------------------------------------------- */
.allwr-container {
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
    width: 100%;
}

.allwr-section {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.allwr-section__head {
    max-width: 56ch;
    margin: 0 auto 2.75rem;
    text-align: center;
}

.allwr-section h2 {
    margin: 0 0 0.6rem;
    font-family: var(--allwr-font);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: var(--allwr-navy);
}

.allwr-section__intro {
    margin: 0;
    color: var(--allwr-text-strong);
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    line-height: 1.6;
}

/* -----------------------------------------------------------------
   Header / nav
----------------------------------------------------------------- */
.allwr-nav {
    padding-block: 1.25rem;
    border-bottom: 1px solid transparent;
}

.allwr-nav__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
}

.allwr-nav__brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
.allwr-nav__brand img { height: clamp(42px, 7vw, 65px); width: auto; }

.allwr-nav__links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    color: var(--allwr-navy);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Enlaces de navegación: underline grow (de izquierda a derecha) + sin background.
   El subrayado dorado aparece bajo el texto al pasar el ratón. Sin scale, sin pill. */
.allwr-nav__links a {
    position: relative;
    padding: 0.5rem 0.6rem;
    color: var(--allwr-navy);
    transition: color var(--allwr-transition-fast);
}
.allwr-nav__links a::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.25rem;
    height: 2px;
    background: var(--allwr-gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--allwr-transition-base);
}
.allwr-nav__links a:hover::after,
.allwr-nav__links a:focus-visible::after { transform: scaleX(1); }

.allwr-nav__login {
    margin-left: 0.4rem;
    padding: 0.55rem 1.1rem !important;
    border: 1.5px solid var(--allwr-navy);
    color: var(--allwr-navy);
    font-weight: 600;
}
.allwr-nav__login:hover { background: var(--allwr-navy) !important; color: var(--allwr-off-white); }

/* Selector país→idioma. Estructura:
   - Botón: bandera circular + país nativo + (opcional) idioma activo en pequeño.
   - Dropdown 380px: search sticky + grupos por región + países (single | multi).
   - Sin "genéricos", sin códigos BCP-47 visibles, sin globe icons. */
.allwr-region {
    position: static;
    margin-left: 0.4rem;
}
.allwr-region > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--allwr-line-strong);
    border-radius: var(--allwr-radius-pill);
    transition: border-color var(--allwr-transition-fast);
}
.allwr-region > summary::-webkit-details-marker,
.allwr-region > summary::marker { display: none; }
.allwr-region > summary:hover,
.allwr-region[open] > summary { border-color: var(--allwr-navy); }
.allwr-region__flag-circle {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.allwr-region__flag-circle--emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    background: var(--allwr-card);
}
.allwr-region__current {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
    min-width: 0;
}
.allwr-region__current-country {
    color: var(--allwr-navy);
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
}
.allwr-region__current-lang {
    color: var(--allwr-muted);
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 1px;
}
.allwr-region__chevron {
    width: 14px;
    height: 14px;
    color: var(--allwr-muted);
    flex-shrink: 0;
    transition: transform var(--allwr-transition-base);
}
.allwr-region[open] .allwr-region__chevron { transform: rotate(180deg); }

/* Dropdown */
.allwr-region__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 2rem);
    max-height: 480px;
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius-sm);
    box-shadow: var(--allwr-shadow);
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    z-index: 30;
}

.allwr-region__head {
    padding: 0.65rem 0.65rem 0.5rem;
    border-bottom: 1px solid var(--allwr-line);
    background: var(--allwr-card);
}
.allwr-region__search {
    width: 100%;
    padding: 0.6rem 0.85rem 0.6rem 2.4rem;
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius-pill);
    font-family: var(--allwr-font-body);
    font-size: 0.9rem;
    color: var(--allwr-text);
    background: var(--allwr-off-white) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 0.7rem center;
    background-size: 16px 16px;
    transition: border-color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-region__search:focus {
    outline: 0;
    border-color: var(--allwr-navy);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--allwr-gold-soft);
}

.allwr-region__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.35rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--allwr-line-strong) transparent;
}
.allwr-region__body::-webkit-scrollbar { width: 8px; }
.allwr-region__body::-webkit-scrollbar-track { background: transparent; }
.allwr-region__body::-webkit-scrollbar-thumb {
    background: var(--allwr-line-strong);
    border-radius: 4px;
    border: 2px solid var(--allwr-card);
}
.allwr-region__body::-webkit-scrollbar-thumb:hover { background: var(--allwr-muted); }

.allwr-region__group { padding: 0.3rem 0; }
.allwr-region__group[hidden] { display: none; }
.allwr-region__group-title {
    margin: 0;
    padding: 0.55rem 1rem 0.35rem;
    font-family: var(--allwr-font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--allwr-muted);
}

.allwr-region__country,
.allwr-region__country-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    color: var(--allwr-text);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background var(--allwr-transition-fast);
    list-style: none;
}
.allwr-region__country-row::-webkit-details-marker,
.allwr-region__country-row::marker { display: none; }
.allwr-region__country:hover,
.allwr-region__country--multi:hover > .allwr-region__country-row { background: var(--allwr-off-white); }

.allwr-region__country[hidden],
.allwr-region__country--multi[hidden] { display: none; }

.allwr-region__country-name {
    flex: 1;
    color: var(--allwr-navy);
    font-weight: 500;
}
.allwr-region__country-lang,
.allwr-region__country-langs-count {
    color: var(--allwr-muted);
    font-size: 0.82rem;
}
.allwr-region__country-chevron {
    width: 14px;
    height: 14px;
    color: var(--allwr-muted);
    flex-shrink: 0;
    transition: transform var(--allwr-transition-base);
}
.allwr-region__country--multi[open] .allwr-region__country-chevron { transform: rotate(180deg); }

/* Banderas: 22×16 rectangulares en filas (lipis/flag-icons 4x3) */
.allwr-region__flag {
    width: 22px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.allwr-region__flag--emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    box-shadow: none;
}

/* Sub-idiomas (acordeón) — sin bandera, indentación a la izquierda */
.allwr-region__sublangs {
    display: grid;
    padding: 0.15rem 0 0.4rem;
}
.allwr-region__sublang {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem 0.5rem 3rem;
    color: var(--allwr-text);
    font-size: 0.88rem;
    font-weight: 400;
    transition: background var(--allwr-transition-fast);
    position: relative;
}
.allwr-region__sublang::before {
    content: "";
    position: absolute;
    left: 2.15rem;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--allwr-line-strong);
    border-radius: 50%;
    transform: translateY(-50%);
}
.allwr-region__sublang:hover { background: var(--allwr-off-white); }
.allwr-region__sublang[hidden] { display: none; }

/* Estado activo: fondo + check a la derecha */
.allwr-region__country[aria-selected="true"],
.allwr-region__sublang[aria-selected="true"] {
    background: var(--allwr-off-white);
    font-weight: 600;
    color: var(--allwr-navy);
}
.allwr-region__country[aria-selected="true"]::after,
.allwr-region__sublang[aria-selected="true"]::after {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2302152B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    margin-left: auto;
    flex-shrink: 0;
}
.allwr-region__sublang[aria-selected="true"]::before {
    background: var(--allwr-gold);
    width: 6px;
    height: 6px;
}

/* -----------------------------------------------------------------
   Hero
----------------------------------------------------------------- */
.allwr-hero {
    padding-block: clamp(3rem, 7vw, 5rem);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
@media (max-width: 920px) {
    .allwr-hero { grid-template-columns: 1fr; }
    .allwr-hero__visual { max-width: 480px; margin-inline: auto; }
}

.allwr-hero__copy h1 {
    margin: 0.7rem 0 1.2rem;
    font-family: var(--allwr-font);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.04;
    font-size: clamp(2.4rem, 5.4vw, 4rem);
    color: var(--allwr-navy);
}
.allwr-hero__copy h1 em {
    font-style: normal;
    color: var(--allwr-gold-deep);
}

.allwr-eyebrow {
    margin: 0;
    color: var(--allwr-gold-deep);
    font-family: var(--allwr-font);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.allwr-lead {
    margin: 0 0 1.75rem;
    max-width: 36rem;
    color: var(--allwr-text-strong);
    font-size: clamp(1.05rem, 1.4vw, 1.18rem);
    line-height: 1.6;
}

.allwr-cta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

/* Visual ligero del hero (mockup, sin recuadro azul oscuro) */
.allwr-hero__visual {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--allwr-off-white) 100%);
    border: 1px solid var(--allwr-line);
    border-radius: calc(var(--allwr-radius) * 1.2);
    box-shadow: var(--allwr-shadow);
}
.allwr-hero__visual svg { width: 100%; height: auto; }

/* -----------------------------------------------------------------
   Botones
----------------------------------------------------------------- */
/* Botones: hover por cambio de color de fondo + sombra. NUNCA scale ni translateY. */
.allwr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--allwr-radius-pill);
    font-family: var(--allwr-font);
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid transparent;
    transition: background var(--allwr-transition-fast),
                box-shadow var(--allwr-transition-fast),
                border-color var(--allwr-transition-fast),
                color var(--allwr-transition-fast);
    cursor: pointer;
}
.allwr-btn:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 3px;
}

.allwr-btn--primary {
    background: var(--allwr-navy);
    color: var(--allwr-off-white);
    box-shadow: 0 12px 30px rgba(2, 21, 43, 0.18);
}
.allwr-btn--primary:hover { background: var(--allwr-navy-soft); box-shadow: 0 16px 38px rgba(2, 21, 43, 0.22); }

.allwr-btn--gold {
    background: var(--allwr-gold);
    color: var(--allwr-navy);
}
.allwr-btn--gold:hover { background: var(--allwr-gold-soft); }

.allwr-btn--ghost {
    background: transparent;
    color: var(--allwr-navy);
    border-color: var(--allwr-navy);
}
.allwr-btn--ghost:hover { background: var(--allwr-navy); color: var(--allwr-off-white); }

.allwr-btn--small { padding: 0.55rem 1rem; font-size: 0.88rem; }

/* -----------------------------------------------------------------
   Pillars (sección de propuesta de valor)
----------------------------------------------------------------- */
.allwr-pillars__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* Tarjetas: hover = sombra elevada + borde reforzado. Sin transform. */
.allwr-pillar {
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius);
    padding: 1.6rem 1.5rem;
    box-shadow: var(--allwr-shadow-soft);
    transition: box-shadow var(--allwr-transition-base),
                border-color var(--allwr-transition-base);
}
.allwr-pillar:hover {
    border-color: var(--allwr-line-strong);
    box-shadow: var(--allwr-shadow);
}

.allwr-pillar__icon {
    width: 28px;
    height: 28px;
    color: var(--allwr-gold-deep);
    margin-bottom: 1rem;
    stroke-width: 1.75;
}

.allwr-pillar h3 {
    margin: 0 0 0.5rem;
    font-family: var(--allwr-font);
    font-weight: 700;
    color: var(--allwr-navy);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}
.allwr-pillar p {
    margin: 0;
    color: var(--allwr-text-strong);
    font-size: 0.93rem;
    line-height: 1.55;
}

/* -----------------------------------------------------------------
   Trust strip — bancos / cumplimiento
----------------------------------------------------------------- */
.allwr-trust {
    padding-block: 2.5rem;
    border-top: 1px solid var(--allwr-line);
    border-bottom: 1px solid var(--allwr-line);
    background: var(--allwr-card);
}
.allwr-trust__label {
    color: var(--allwr-muted);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1.25rem;
}
.allwr-trust__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.allwr-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    background: var(--allwr-off-white);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius-pill);
    font-size: 0.85rem;
    color: var(--allwr-navy);
    font-weight: 500;
}
.allwr-chip svg { width: 14px; height: 14px; color: var(--allwr-gold-deep); }

/* -----------------------------------------------------------------
   Availability module — banks waitlist; registro abierto en todo el mundo
----------------------------------------------------------------- */
.allwr-availability {
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius);
    padding: clamp(1.75rem, 3vw, 2.75rem);
    box-shadow: var(--allwr-shadow);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    max-width: 980px;
    margin-inline: auto;
}
@media (max-width: 800px) { .allwr-availability { grid-template-columns: 1fr; } }

.allwr-availability__copy h2 {
    margin: 0 0 0.6rem;
    font-family: var(--allwr-font);
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    color: var(--allwr-navy);
}
.allwr-availability__copy p {
    margin: 0 0 1.25rem;
    color: var(--allwr-text-strong);
    line-height: 1.6;
}
.allwr-availability__alt {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--allwr-navy);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid var(--allwr-gold);
    transition: border-color var(--allwr-transition-fast);
}
.allwr-availability__alt:hover { border-color: var(--allwr-navy); }

.allwr-availability__form {
    background: var(--allwr-off-white);
    border-radius: var(--allwr-radius-sm);
    padding: 1.25rem;
}
.allwr-availability__form label {
    display: block;
    color: var(--allwr-navy);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}
.allwr-availability__form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.allwr-availability__form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--allwr-line-strong);
    border-radius: var(--allwr-radius-pill);
    font-family: var(--allwr-font-body);
    font-size: 0.95rem;
    background: var(--allwr-card);
    color: var(--allwr-text);
}
.allwr-availability__form input[type="email"]:focus {
    outline: 0;
    border-color: var(--allwr-navy);
    box-shadow: 0 0 0 3px var(--allwr-gold-soft);
}
.allwr-availability__form-help {
    margin: 0.6rem 0 0;
    color: var(--allwr-muted);
    font-size: 0.78rem;
}

/* -----------------------------------------------------------------
   Footer (4 columnas + bottom)
----------------------------------------------------------------- */
.allwr-foot {
    background: var(--allwr-card);
    border-top: 1px solid var(--allwr-line);
    padding-block: 3rem 1.5rem;
    margin-top: clamp(3rem, 6vw, 5rem);
}
.allwr-foot__columns {
    display: grid;
    grid-template-columns: 1.4fr repeat(5, 1fr);
    gap: 2rem;
}
@media (max-width: 1100px) { .allwr-foot__columns { grid-template-columns: 1.4fr repeat(3, 1fr); } }
@media (max-width: 960px) { .allwr-foot__columns { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 600px) { .allwr-foot__columns { grid-template-columns: 1fr 1fr; } }

.allwr-foot__brand {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}
.allwr-foot__brand img { height: 26px; width: auto; }
.allwr-foot__brand-tagline {
    margin: 0;
    color: var(--allwr-navy);
    font-family: var(--allwr-font);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.005em;
    max-width: 28ch;
}
.allwr-foot__brand-desc {
    margin: 0;
    color: var(--allwr-text-strong);
    font-size: 0.85rem;
    line-height: 1.55;
    max-width: 32ch;
}
.allwr-foot__social {
    display: inline-flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.allwr-foot__social a {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: var(--allwr-muted);
    background: var(--allwr-off-white);
    border: 1px solid var(--allwr-line);
    border-radius: 50%;
    transition: color var(--allwr-transition-fast),
                background var(--allwr-transition-fast),
                border-color var(--allwr-transition-fast);
}
.allwr-foot__social a:hover {
    color: var(--allwr-navy);
    background: var(--allwr-card);
    border-color: var(--allwr-navy);
}
.allwr-foot__regulation {
    margin: 1.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--allwr-line);
    color: var(--allwr-muted);
    font-size: 0.78rem;
    line-height: 1.55;
    max-width: 80ch;
}

.allwr-foot__col h4 {
    margin: 0 0 0.9rem;
    font-family: var(--allwr-font);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--allwr-navy);
    font-weight: 700;
}
.allwr-foot__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}
.allwr-foot__col a {
    color: var(--allwr-text-strong);
    font-size: 0.9rem;
    transition: color var(--allwr-transition-fast);
}
.allwr-foot__col a:hover { color: var(--allwr-navy); }

.allwr-foot__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--allwr-line);
    color: var(--allwr-muted);
    font-size: 0.82rem;
}
.allwr-foot__powered { letter-spacing: 0.04em; }
.allwr-foot__legal {
    display: inline-flex;
    gap: 1rem;
}
.allwr-foot__legal a:hover { color: var(--allwr-navy); }

/* -----------------------------------------------------------------
   Error
----------------------------------------------------------------- */
.allwr-error {
    max-width: 540px;
    margin: 12vh auto;
    padding: 2.5rem 2rem;
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius);
    box-shadow: var(--allwr-shadow);
    text-align: center;
}
.allwr-error h1 {
    margin: 0.5rem 0;
    font-family: var(--allwr-font);
    color: var(--allwr-navy);
}

/* -----------------------------------------------------------------
   Auth shell (login / signup) — fondo SVG + tarjeta centrada
----------------------------------------------------------------- */
.allwr-auth-shell {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    background: transparent;
    isolation: isolate;
}

/* Fondo SVG a pantalla completa (curvas doradas + marfil cálido). */
.allwr-auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.allwr-auth-bg svg {
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

.allwr-auth-header {
    position: relative;
    z-index: 1;
    padding: 1.25rem clamp(1rem, 4vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.allwr-auth-header__right {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.allwr-auth-header__greeting {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    color: var(--allwr-navy);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1.5px solid var(--allwr-line-strong);
    border-radius: var(--allwr-radius-pill);
    background: rgba(255, 255, 255, 0.72);
    transition: border-color var(--allwr-transition-fast),
                background var(--allwr-transition-fast);
}
.allwr-auth-header__greeting:hover {
    border-color: var(--allwr-navy);
    background: #fff;
}
.allwr-auth-header img { height: 28px; width: auto; display: block; }
/* Region selector sobre el fondo cálido: pill blanca como en el mockup. */
.allwr-auth-header .allwr-region > summary {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
}

/* Rename notice (docs/agents/sumanza.md): its own row under the logo, as wide as the card; without the modifier the header is untouched. */
.allwr-auth-header--notice {
    flex-wrap: wrap;
}
.allwr-auth-notice {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
}
.allwr-auth-notice__body {
    width: 100%;
    max-width: 500px;
    margin: 0;
    padding: 0.75rem 1rem;
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-inline-start: 3px solid var(--allwr-gold);
    border-radius: var(--allwr-radius-sm);
    box-shadow: var(--allwr-shadow-soft);
    color: var(--allwr-text-strong);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: start;
}
.allwr-auth-notice strong {
    display: block;
    color: var(--allwr-navy);
    font-weight: 700;
}

.allwr-auth-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vh, 2rem) 1rem;
}

.allwr-auth-card {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: clamp(1.85rem, 3.5vw, 2.4rem) clamp(1.75rem, 4.5vw, 2.75rem);
    background: #fff;
    border: 1px solid rgba(15, 53, 84, 0.06);
    border-radius: 22px;
    /* Sombra corta y precisa: menos “nube”, más calidad. */
    box-shadow:
        0 10px 28px rgba(15, 53, 84, 0.07),
        0 2px 8px rgba(15, 53, 84, 0.04);
    text-align: center;
}

.allwr-auth-card__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--allwr-gold);
    border-radius: 50%;
    color: var(--allwr-gold-deep);
    background: rgba(222, 173, 57, 0.08);
}
.allwr-auth-card__icon svg {
    width: 20px;
    height: 20px;
    max-width: none;
}

.allwr-auth-card h1 {
    margin: 0;
    font-family: var(--allwr-font);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    font-size: clamp(1.7rem, 3.2vw, 2.05rem);
    color: var(--allwr-navy);
}

.allwr-auth-card__accent {
    display: block;
    width: 36px;
    height: 3px;
    margin: 0.75rem auto 1rem;
    border-radius: 999px;
    background: var(--allwr-gold);
}

.allwr-auth-card__lead {
    color: var(--allwr-muted);
    margin: 0 auto 1.5rem;
    line-height: 1.55;
    font-size: 1rem; /* 16px — secundario legible */
    max-width: 34ch;
}

/* Botón principal de auth (login/signup). Navy primary full-width. */
.allwr-auth-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 52px;
    padding: 0.9rem 1.5rem;
    border: 1.5px solid var(--allwr-navy);
    border-radius: var(--allwr-radius-pill);
    background: var(--allwr-navy);
    color: #fff;
    font-family: var(--allwr-font-body);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 6px 16px rgba(15, 53, 84, 0.14);
    cursor: pointer;
    transition: background var(--allwr-transition-fast),
                box-shadow var(--allwr-transition-fast),
                border-color var(--allwr-transition-fast);
}
.allwr-auth-btn:hover:not(:disabled) {
    background: var(--allwr-navy-soft);
    border-color: var(--allwr-navy-soft);
    box-shadow: 0 8px 20px rgba(15, 53, 84, 0.18);
}
.allwr-auth-btn:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 3px;
}
.allwr-auth-btn:disabled { cursor: not-allowed; opacity: 0.85; }
.allwr-auth-btn__g {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
}
.allwr-auth-btn__g svg {
    width: 14px;
    height: 14px;
    max-width: none;
}

.allwr-auth-social {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.allwr-auth-btn--microsoft {
    background: #fff;
    color: var(--allwr-navy);
    border-color: var(--allwr-line);
    box-shadow: none;
}
.allwr-auth-btn--microsoft:hover:not(:disabled) {
    background: var(--allwr-off-white);
    border-color: var(--allwr-navy-soft);
    box-shadow: 0 6px 16px rgba(15, 53, 84, 0.08);
}
.allwr-auth-btn__g--microsoft svg {
    width: 16px;
    height: 16px;
}

.allwr-auth-divider {
    text-align: center;
    margin: 1.2rem 0 0;
    color: var(--allwr-muted);
    font-size: 0.95rem; /* ~15px */
}
.allwr-auth-divider a {
    color: var(--allwr-navy);
    font-weight: 600;
    margin-left: 0.25rem;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
    transition: border-color var(--allwr-transition-fast),
                color var(--allwr-transition-fast);
}
.allwr-auth-divider a:hover {
    border-color: var(--allwr-gold);
}
.allwr-auth-divider a:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
    border-radius: 2px;
}

.allwr-auth-banks {
    margin-top: 1.75rem;
    padding-top: 0;
}
.allwr-auth-banks__head {
    margin-bottom: 1rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--allwr-line);
}
.allwr-auth-banks__label {
    text-align: center;
    color: var(--allwr-muted);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
}
.allwr-auth-banks__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}
.allwr-auth-banks__cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0.55rem 0.6rem;
    background: #f7f5f0;
    border: 1px solid rgba(15, 53, 84, 0.04);
    border-radius: 12px;
}
/* Logos de bancos: decorativos. Sin hover (no son interactivos). */
.allwr-auth-banks__cell img {
    max-height: 28px;
    max-width: 100%;
    width: auto;
    height: auto;
    opacity: 0.95;
}
.allwr-auth-bank-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--allwr-navy);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}
.allwr-auth-banks__more {
    margin: 0.85rem 0 0;
    text-align: center;
    color: var(--allwr-muted);
    font-size: 0.875rem; /* 14px — pie del grid */
    font-weight: 500;
}

/* Pills de confianza bajo el grid de bancos (login). */
.allwr-auth-trust {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0.6rem 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 1.15rem;
    background: #f7f5f0;
    border-radius: 999px;
}
.allwr-auth-trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--allwr-muted);
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
}
.allwr-auth-trust__icon {
    display: inline-grid;
    place-items: center;
    color: var(--allwr-gold-deep);
}
.allwr-auth-trust__icon svg {
    width: 13px;
    height: 13px;
    max-width: none;
}

.allwr-auth-footer {
    position: relative;
    z-index: 1;
    padding: 1.1rem clamp(1rem, 4vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--allwr-muted);
    font-size: 0.8rem;
    background: transparent;
    border-top: 0;
}
.allwr-auth-footer__legal {
    display: inline-flex;
    align-items: center;
    gap: 0;
}
.allwr-auth-footer__legal a {
    color: var(--allwr-muted);
    margin-left: 0;
    padding: 0 0.55rem;
    transition: color var(--allwr-transition-fast);
}
.allwr-auth-footer__legal a + a {
    border-left: 1px solid var(--allwr-line-strong);
}
.allwr-auth-footer__legal a:hover { color: var(--allwr-navy); }
.allwr-auth-footer__legal a:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
    border-radius: 2px;
}

@media (max-width: 520px) {
    .allwr-auth-banks__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .allwr-auth-trust {
        border-radius: 16px;
        gap: 0.45rem 0.85rem;
    }
    .allwr-auth-card {
        max-width: 100%;
        padding: 1.6rem 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .allwr-auth-btn,
    .allwr-auth-divider a,
    .allwr-auth-header__greeting,
    .allwr-auth-footer__legal a {
        transition-duration: 0.01ms;
    }
}

/* Switcher de perfil — usa <details> nativo, sin JS, mismo patrón que region */
.allwr-profile { position: relative; margin-left: 0.4rem; }
.allwr-profile > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--allwr-line-strong);
    border-radius: var(--allwr-radius-pill);
    color: var(--allwr-navy);
    font-size: 0.85rem;
    font-weight: 600;
    transition: border-color var(--allwr-transition-fast);
}
.allwr-profile > summary::-webkit-details-marker,
.allwr-profile > summary::marker { display: none; }
.allwr-profile > summary:hover,
.allwr-profile[open] > summary { border-color: var(--allwr-navy); }
.allwr-profile__active { line-height: 1; }
.allwr-profile__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius-sm);
    padding: 0.35rem;
    min-width: 220px;
    box-shadow: var(--allwr-shadow);
    display: grid;
    gap: 0.1rem;
    z-index: 20;
    margin: 0;
}
.allwr-profile__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    background: transparent;
    border-radius: calc(var(--allwr-radius-sm) - 4px);
    color: var(--allwr-text);
    font-family: var(--allwr-font-body);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: background var(--allwr-transition-fast);
}
.allwr-profile__item:hover:not(:disabled) { background: var(--allwr-off-white); }
.allwr-profile__item[aria-current="true"],
.allwr-profile__item:disabled {
    background: var(--allwr-off-white);
    font-weight: 600;
    color: var(--allwr-navy);
    cursor: default;
}
.allwr-profile__badge { color: var(--allwr-gold-deep); font-weight: 700; }

/* Tipo ya declarado (T9489): el resto se ve pero no actúa. Sin `disabled`
   nativo a propósito, igual que en app.css — perdería los eventos de ratón
   que arman el tooltip de marca. */
.allwr-profile__item--locked {
    color: var(--allwr-muted);
    opacity: 0.55;
    cursor: not-allowed;
}
.allwr-profile__item--locked:hover:not(:disabled) { background: transparent; color: var(--allwr-muted); }

/* Selector de workspace (/auth/select-workspace) — misma pinta que el menú del
   switcher, pero como página completa: reutiliza .allwr-profile__item para
   cada botón y sólo añade la lista y la línea del tenant. */
.allwr-select-workspace__list { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.allwr-select-workspace__tenant {
    display: block;
    font-size: 0.78rem;
    color: var(--allwr-muted);
    font-weight: 400;
}

/* Panel de superadmin (/<locale>/admin) — read-only V1 */
.allwr-admin { padding-block: clamp(2rem, 4vw, 3rem); }
.allwr-admin__head { margin-bottom: 1.75rem; }
.allwr-admin__head h1 {
    margin: 0 0 0.5rem;
    font-family: var(--allwr-font);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--allwr-navy);
    font-size: clamp(1.6rem, 3vw, 2rem);
}
.allwr-admin__intro {
    color: var(--allwr-text-strong);
    margin: 0;
    line-height: 1.55;
}
.allwr-admin__intro code {
    background: var(--allwr-off-white);
    border: 1px solid var(--allwr-line);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
}
.allwr-admin__table-wrap {
    overflow-x: auto;
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius);
    box-shadow: var(--allwr-shadow-soft);
}
.allwr-admin__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.allwr-admin__table th,
.allwr-admin__table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--allwr-line);
    vertical-align: top;
}
.allwr-admin__table th {
    background: var(--allwr-off-white);
    font-family: var(--allwr-font);
    font-weight: 700;
    color: var(--allwr-navy);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--allwr-line);
}
.allwr-admin__table tbody tr:last-child td { border-bottom: 0; }
.allwr-admin__table tbody tr:hover td { background: var(--allwr-off-white); }
.allwr-admin__profile-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--allwr-radius-pill);
    background: var(--allwr-off-white);
    border: 1px solid var(--allwr-line);
    color: var(--allwr-navy);
    font-size: 0.74rem;
    font-weight: 600;
    margin-right: 0.25rem;
    margin-bottom: 0.2rem;
}
.allwr-admin__profile-pill--admin {
    background: var(--allwr-navy);
    color: var(--allwr-gold);
    border-color: var(--allwr-navy);
}
.allwr-admin__clerk-id {
    font-family: ui-monospace, "SFMono-Regular", monospace;
    font-size: 0.78rem;
    color: var(--allwr-muted);
}

/* Placeholder de slug en construcción */
.allwr-placeholder {
    max-width: 640px;
    margin: clamp(3rem, 10vh, 6rem) auto;
    padding: clamp(2rem, 4vw, 3rem);
    text-align: center;
}
.allwr-placeholder h1 {
    font-family: var(--allwr-font);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--allwr-navy);
    margin: 0.5rem 0 0.75rem;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
}
.allwr-placeholder p {
    color: var(--allwr-text-strong);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* -----------------------------------------------------------------
   Accesibilidad y motion
----------------------------------------------------------------- */
:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
    border-radius: 4px;
}

/* prefers-reduced-motion: las transiciones (color, sombra, fondo) siguen
   ocurriendo pero ultra-rápidas (~instantáneas), y se anulan los transforms
   en estados interactivos. Mantenemos el estado final visible — sin animar. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    *:hover, *:focus-visible, *:active {
        transform: none !important;
    }
    /* underline-grow se muestra como underline estático sin animar */
    .allwr-nav__links a:hover::after,
    .allwr-nav__links a:focus-visible::after { transform: scaleX(1) !important; }
}

/* =============================================================================
   App autenticada — V1 personal (Clarity OS)
   ============================================================================= */
.allwr-app {
    padding: clamp(2rem, 4vw, 3rem) 0;
    background: var(--allwr-off-white);
    min-height: 70vh;
}
.allwr-app__page-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.allwr-app__eyebrow {
    text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem;
    color: var(--allwr-gold); font-weight: 600; margin: 0 0 0.5rem;
}
.allwr-app__h1 {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 900;
    color: var(--allwr-navy);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin: 0;
    line-height: 1.1;
}
.allwr-app__h2 {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    color: var(--allwr-navy);
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    margin: 1.5rem 0 0.75rem;
}
.allwr-app__lead {
    color: var(--allwr-muted, #4a5b6a);
    max-width: 60ch;
    margin: 0.75rem 0 0;
}
.allwr-app__muted { color: var(--allwr-muted, #4a5b6a); }
.allwr-app__back {
    display: inline-block; margin-bottom: 1rem;
    color: var(--allwr-navy);
    text-decoration: none;
    font-weight: 500;
}
.allwr-app__back:hover { color: var(--allwr-gold); }

/* CTAs */
.allwr-app__cta {
    display: inline-block;
    background: var(--allwr-navy);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--allwr-transition-base, 200ms ease-out),
                box-shadow var(--allwr-transition-base, 200ms ease-out);
}
.allwr-app__cta:hover {
    background: #03203F;
    box-shadow: 0 12px 30px rgba(2,21,43,0.18);
}

.allwr-app__link {
    color: var(--allwr-navy);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app__link:hover { color: var(--allwr-gold); border-bottom-color: var(--allwr-gold); }
.allwr-app__link--subtle {
    appearance: none; background: none; border: none; cursor: pointer;
    font: 400 0.78rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-muted, #4a5b6a); opacity: 0.7;
    transition: opacity var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app__link--subtle:hover { opacity: 1; color: var(--allwr-navy); }

/* KPI grid */
.allwr-app__kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2.5rem;
}
.allwr-app__kpi {
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 8px 22px rgba(2,21,43,0.04);
}
.allwr-app__kpi-label {
    margin: 0; font-size: 0.78rem; color: var(--allwr-muted, #4a5b6a);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.allwr-app__kpi-value {
    margin: 0.5rem 0 0;
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    color: var(--allwr-navy);
    font-size: clamp(1.4rem, 2.3vw, 1.85rem);
}

.allwr-app__section { margin: 2rem 0; }
.allwr-app__section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin: 0 0 0.75rem;
}

.allwr-app__empty {
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 18px;
    padding: clamp(2rem, 4vw, 3rem);
    text-align: center;
    box-shadow: 0 24px 60px rgba(2,21,43,0.06);
    max-width: 640px;
    margin: 2rem auto;
}
.allwr-app__empty h2 {
    color: var(--allwr-navy);
    margin: 0 0 0.5rem;
    font-family: 'Satoshi', system-ui, sans-serif;
}
.allwr-app__empty p { color: var(--allwr-muted, #4a5b6a); margin: 0 0 1.5rem; }

/* Cuentas */
.allwr-app__accounts { list-style: none; padding: 0; margin: 0; }
.allwr-app__account-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.25rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    margin-bottom: 0.5rem;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                box-shadow var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app__account-row:hover {
    border-color: var(--allwr-navy);
    box-shadow: 0 8px 18px rgba(2,21,43,0.08);
}
.allwr-app__account-link {
    display: flex; gap: 0.75rem; align-items: baseline;
    color: var(--allwr-navy);
    text-decoration: none;
}
.allwr-app__account-name { font-weight: 600; }
.allwr-app__account-iban {
    color: var(--allwr-muted, #4a5b6a);
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
}
.allwr-app__account-balance {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    color: var(--allwr-navy);
    font-variant-numeric: tabular-nums;
}

/* Tabla de movimientos */
.allwr-app__table {
    width: 100%; border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    overflow: hidden;
}
.allwr-app__table th, .allwr-app__table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--allwr-line, #E6E2D8);
    font-variant-numeric: tabular-nums;
}
.allwr-app__table th {
    background: var(--allwr-off-white);
    font-weight: 600; color: var(--allwr-navy);
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.allwr-app__table tr:last-child td { border-bottom: 0; }
.allwr-app__table .right, .allwr-app__table th.right { text-align: right; }
.allwr-app__table a { color: var(--allwr-navy); text-decoration: none; }
.allwr-app__table a:hover { color: var(--allwr-gold); }
.allwr-movements-table-wrap {
    position: relative;
    overflow-x: auto;
}
.allwr-app__table--movements {
    min-width: 860px;
}
.allwr-mov-export-th,
.allwr-mov-export-cell {
    width: 88px;
    min-width: 88px;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}
.allwr-mov-export-th {
    text-align: right;
}
.allwr-mov-export {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}
.allwr-mov-export__download {
    position: relative;
}
.allwr-mov-export__btn {
    appearance: none;
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--allwr-navy, #02152B);
    cursor: pointer;
    transition: background-color var(--allwr-transition-fast), border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-mov-export__btn:hover,
.allwr-mov-export__btn.is-active {
    background: #fff;
    border-color: var(--allwr-line, #E6E2D8);
    box-shadow: 0 8px 20px rgba(2, 21, 43, 0.08);
}
.allwr-mov-export__btn:focus-visible,
.allwr-mov-export__item:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
}
.allwr-mov-export__icon {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}
.allwr-mov-export__menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 130px;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(2, 21, 43, 0.14);
}
.allwr-mov-export__menu[hidden] {
    display: none;
}
.allwr-mov-export__item {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--allwr-navy, #02152B);
    font: 600 0.9rem 'Inter', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--allwr-transition-fast);
}
.allwr-mov-export__item:hover {
    background: color-mix(in srgb, var(--allwr-gold, #DEAD39) 12%, #fff);
}
.allwr-mov-export__item-icon {
    width: 17px;
    height: 17px;
    stroke-width: 1.7;
    color: var(--allwr-muted, #4a5b6a);
}

/* Connect: reauthentication explainer — full-width card, two columns
   (why-left / steps-right) with a divider, trust pill centered below. */
.allwr-connect-reauth__card {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: 1.5rem 1.75rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(2,21,43,0.08);
}
.allwr-connect-reauth__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2rem;
}
.allwr-connect-reauth__col--steps {
    border-left: 1px solid var(--allwr-line, #E6E2D8);
    padding-left: 2rem;
}
.allwr-connect-reauth__lede {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}
.allwr-connect-reauth__icon {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-navy) 8%, #fff);
    color: var(--allwr-navy);
}
.allwr-connect-reauth__icon-svg { width: 22px; height: 22px; }
.allwr-connect-reauth__text {
    margin: 0;
    color: var(--allwr-navy);
    font: 400 0.95rem/1.55 'Inter', system-ui, sans-serif;
}
.allwr-connect-reauth__reason {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 45%, #fff);
    background: color-mix(in srgb, var(--allwr-gold) 10%, #fff);
    border-radius: 12px;
    color: var(--allwr-navy);
    font: 400 0.95rem/1.55 'Inter', system-ui, sans-serif;
}
.allwr-connect-reauth__steps-title {
    margin: 0;
    color: var(--allwr-navy);
    font-family: 'Satoshi', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}
.allwr-connect-reauth__steps {
    margin: 0.9rem 0 0;
    padding-left: 1.4rem;
    color: var(--allwr-navy);
    font: 400 0.95rem/1.9 'Inter', system-ui, sans-serif;
}
.allwr-connect-reauth__trust {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: color-mix(in srgb, #43A047 14%, #fff);
    color: #1B6E2D;
    font: 700 0.82rem 'Inter', system-ui, sans-serif;
}
.allwr-connect-reauth__trust-icon { width: 16px; height: 16px; }
@media (max-width: 900px) {
    .allwr-connect-reauth__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
    .allwr-connect-reauth__col--steps {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--allwr-line, #E6E2D8);
        padding-top: 1.25rem;
    }
}

/* Connect: configuration panel */
.allwr-connect-config__card {
    background: #fff; border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px; padding: 1.25rem; max-width: 520px;
}
.allwr-connect-config__products {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem;
}
.allwr-connect-config__check {
    display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer;
    font: 400 0.85rem 'Inter', system-ui, sans-serif; color: var(--allwr-navy);
    padding: 0.3rem 0.6rem; border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 8px;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-connect-config__check:has(input:checked) { border-color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 5%, transparent); }
.allwr-connect-config__check--all { font-weight: 600; }
.allwr-connect-config__dates { margin-bottom: 1rem; }
.allwr-connect-config__radios { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.allwr-connect-config__radio {
    display: grid; grid-template-columns: auto 1fr; gap: 0 0.5rem;
    padding: 0.5rem 0.65rem; border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 10px; cursor: pointer;
}
.allwr-connect-config__radio:has(input:checked) { border-color: var(--allwr-navy); }
.allwr-connect-config__radio input { grid-row: 1 / 3; align-self: start; margin-top: 0.15rem; }
.allwr-connect-config__radio-label { font: 500 0.88rem 'Inter', system-ui, sans-serif; color: var(--allwr-navy); }
.allwr-connect-config__radio-warn {
    grid-column: 2; font: 400 0.78rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-muted); margin-top: 0.15rem;
}
.allwr-connect-config__submit { margin-top: 0.5rem; }

/* Connect: contenedor del widget oficial Wealthreader (sin selector propio). */
.allwr-app__widget-card {
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2,21,43,0.10);
    padding: 1rem;
    min-height: 640px;
    display: flex; flex-direction: column;
}
.allwr-app__widget-card #wr-iframe {
    flex: 1 1 auto;
    min-height: 600px;
    border: 0;
    background: #fff;
}
.allwr-app__widget-disclaimer {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}
.allwr-app__widget-back { margin-top: 1.5rem; }

.allwr-app__consent-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.allwr-app__consent {
    display: flex; align-items: center; gap: 0.75rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    margin-bottom: 0.4rem;
}
.allwr-app__consent-logo {
    /* Logos Wealthreader = wordmarks apaisados; caja fija + contain evita
       deformarlos y mantiene los nombres de banco alineados en columna. */
    width: 72px;
    height: 32px;
    object-fit: contain;
    object-position: left center;
    flex: 0 0 auto;
}
.allwr-app__consent-name { flex: 1; color: var(--allwr-navy); font-weight: 500; }
.allwr-app__consent-status {
    font-size: 0.78rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-gold) 16%, transparent);
    color: var(--allwr-navy);
    font-weight: 600;
}
.allwr-app__consent-status[data-status="active"] {
    background: color-mix(in srgb, #43A047 18%, transparent);
}
.allwr-app__consent-status[data-status="error"], .allwr-app__consent-status[data-status="expired"] {
    background: color-mix(in srgb, #C44569 18%, transparent);
}
/* Doble factor pendiente: acción controlada del banco, ámbar en vez de rojo. */
.allwr-app__consent-status[data-status="2fa"] {
    background: color-mix(in srgb, var(--allwr-gold) 22%, transparent);
    color: #9A6A0A;
}

/* Estado del widget oficial (loading / importing / completed / failed). */
.allwr-app__widget-status {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--allwr-muted, #4a5b6a);
    font-size: 0.95rem;
    margin: 0;
}
.allwr-app__widget-status[data-state="importing"],
.allwr-app__widget-status[data-state="completed"] {
    color: var(--allwr-navy);
    font-weight: 600;
}
.allwr-app__widget-status[data-state="failed"] {
    color: #C44569;
    font-weight: 600;
}

.allwr-app__dl {
    display: grid; grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.2rem; margin: 1rem 0;
}
.allwr-app__dl dt { color: var(--allwr-muted, #4a5b6a); font-weight: 500; }
.allwr-app__dl dd { color: var(--allwr-navy); margin: 0; }
.allwr-app__amount {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 900;
    color: var(--allwr-navy);
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0.5rem 0 1.5rem;
    font-variant-numeric: tabular-nums;
}

/* Settings */
.allwr-settings {
    max-width: 860px;
}
.allwr-settings__panel {
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius);
    box-shadow: var(--allwr-shadow-soft);
    padding: clamp(1.2rem, 3vw, 1.8rem);
}
.allwr-settings__section {
    display: grid;
    gap: 1.1rem;
}
.allwr-settings__section-head {
    border-bottom: 1px solid var(--allwr-line);
    padding-bottom: 0.85rem;
}
.allwr-settings__section-head h2 {
    margin: 0;
    color: var(--allwr-navy);
    font-family: var(--allwr-font);
    font-weight: 700;
    font-size: 1.1rem;
}
.allwr-settings__toggle {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;
    gap: 0.85rem;
    min-height: 36px;
    color: var(--allwr-navy);
    font-weight: 600;
    cursor: pointer;
}
.allwr-settings__toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.allwr-settings__toggle-ui {
    position: relative;
    width: 46px;
    height: 28px;
    border-radius: var(--allwr-radius-pill);
    background: var(--allwr-line);
    border: 1px solid var(--allwr-line-strong);
    transition: background-color var(--allwr-transition-fast),
                border-color var(--allwr-transition-fast),
                box-shadow var(--allwr-transition-fast);
}
.allwr-settings__toggle-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--allwr-card);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--allwr-navy) 12%, transparent);
    transition: transform var(--allwr-transition-fast);
}
.allwr-settings__toggle input:checked + .allwr-settings__toggle-ui {
    background: var(--allwr-navy);
    border-color: var(--allwr-navy);
}
.allwr-settings__toggle input:checked + .allwr-settings__toggle-ui::after {
    transform: translateX(18px);
}
.allwr-settings__toggle:hover .allwr-settings__toggle-ui {
    border-color: var(--allwr-navy);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--allwr-navy) 8%, transparent);
}
.allwr-settings__toggle input:focus-visible + .allwr-settings__toggle-ui {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 3px;
}
.allwr-settings__range-row {
    display: grid;
    gap: 0.65rem;
}
.allwr-settings__range-row label {
    color: var(--allwr-navy);
    font-weight: 600;
}
.allwr-settings__range-control {
    display: grid;
    grid-template-columns: 1fr 4ch;
    align-items: center;
    gap: 0.85rem;
}
.allwr-settings__range-control input[type="range"] {
    width: 100%;
    accent-color: var(--allwr-navy);
}
.allwr-settings__range-control output {
    color: var(--allwr-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.allwr-settings__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--allwr-line);
}
.allwr-settings__status {
    min-height: 1.2em;
    margin: 0;
    color: var(--allwr-muted);
    font-weight: 600;
}
.allwr-settings__status[data-state="ok"] { color: var(--allwr-navy); }
.allwr-settings__status[data-state="error"] { color: var(--allwr-gold-deep); }

/* =============================================================================
   Dashboard V2 — Clarity OS (Wealth Eye, Conexiones, Productos, Refresh actions)
   ============================================================================= */

.allwr-app__page-head--actions {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.allwr-app__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.allwr-app__btn {
    appearance: none;
    border: 1px solid var(--allwr-line, #E6E2D8);
    background: #fff;
    color: var(--allwr-navy);
    border-radius: 999px;
    padding: 0.6rem 1.1rem;
    font: 500 0.95rem 'Inter', system-ui, sans-serif;
    display: inline-flex; align-items: center; gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--allwr-transition-fast, 150ms ease-out),
                border-color var(--allwr-transition-fast, 150ms ease-out),
                box-shadow var(--allwr-transition-fast, 150ms ease-out),
                color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app__btn:hover {
    border-color: var(--allwr-navy);
    box-shadow: 0 4px 14px rgba(2,21,43,0.08);
}
.allwr-app__btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-app__btn[disabled], .allwr-app__btn.is-busy {
    opacity: 0.65; cursor: not-allowed; box-shadow: none;
}
.allwr-app__btn.is-busy .allwr-app__btn-icon { display: inline-block; }
/* Refresh spinner: eased per revolution (never fully stops) so it reads as
   crafted rather than mechanical. Scoped to refresh triggers only — other
   busy buttons (terminal, download…) must not spin their icons. */
.allwr-app__btn.is-busy .allwr-app__btn-icon,
[data-allwr-refresh-all].is-busy .allwr-app__btn-icon-svg,
[data-allwr-refresh-consent].is-busy .allwr-app__btn-icon-svg {
    animation: allwr-spin 850ms cubic-bezier(0.5, 0.15, 0.5, 0.85) infinite;
}
@keyframes allwr-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    /* No rotation: a gentle opacity pulse still signals "working". */
    .allwr-app__btn.is-busy .allwr-app__btn-icon,
    [data-allwr-refresh-all].is-busy .allwr-app__btn-icon-svg,
    [data-allwr-refresh-consent].is-busy .allwr-app__btn-icon-svg {
        animation: allwr-busy-pulse 1.6s ease-in-out infinite;
    }
}
@keyframes allwr-busy-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.allwr-app__btn--primary {
    background: var(--allwr-navy);
    color: #fff;
    border-color: var(--allwr-navy);
}
.allwr-app__btn--primary:hover {
    background: #03203e;
    border-color: #03203e;
    box-shadow: 0 8px 22px rgba(2,21,43,0.18);
}
.allwr-app__btn--ghost { background: rgba(255,255,255,0.6); }
.allwr-app__btn--sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
.allwr-app__btn--warn { color: #B23A48; border-color: #E0B7BC; }
.allwr-app__btn--warn:hover { border-color: #B23A48; }
.allwr-app__btn--gold { color: #9A6A0A; border-color: color-mix(in srgb, var(--allwr-gold) 55%, transparent); }
.allwr-app__btn--gold:hover { border-color: #9A6A0A; }
.allwr-app__btn-icon { font-size: 1rem; line-height: 1; }
.allwr-app__btn-icon-svg { width: 16px; height: 16px; flex-shrink: 0; }

.allwr-app__kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.allwr-app__kpi-sub {
    font-size: 0.78rem; color: var(--allwr-muted, #4a5b6a);
    margin: 0.35rem 0 0;
}
.allwr-app__tooltip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1rem; height: 1rem; margin-left: 0.25rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-gold) 18%, transparent);
    color: var(--allwr-navy);
    font-size: 0.7rem; cursor: help;
    position: relative;
}
.allwr-app__tooltip::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%) translateY(2px);
    background: var(--allwr-navy); color: #fff;
    padding: 0.5rem 0.7rem; border-radius: 8px;
    font-size: 0.78rem; line-height: 1.35;
    width: max-content; max-width: 260px;
    opacity: 0; pointer-events: none;
    transition: opacity var(--allwr-transition-fast, 150ms ease-out),
                transform var(--allwr-transition-fast, 150ms ease-out);
    z-index: 30;
}
.allwr-app__tooltip:hover::after, .allwr-app__tooltip:focus-visible::after {
    opacity: 1; transform: translateX(-50%) translateY(0);
}
.allwr-app__tooltip--wide::after { max-width: 340px; white-space: normal; }

/* --- Dividir imputación: líneas extra --- */
.allwr-txn__splits { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }
.allwr-txn__split {
    border: 1px solid var(--allwr-line, #e6e2d8); border-radius: 12px;
    padding: 0.7rem 0.8rem; display: flex; flex-direction: column; gap: 0.5rem;
    background: color-mix(in srgb, var(--allwr-gold) 4%, transparent);
}
.allwr-txn__split-head { display: flex; align-items: center; justify-content: space-between; }
.allwr-txn__split-label { font-size: 0.78rem; font-weight: 600; color: var(--allwr-navy); }
.allwr-txn__split-rm {
    border: 0; background: transparent; cursor: pointer; line-height: 1;
    font-size: 1.15rem; color: var(--allwr-muted, #8a8676); padding: 0 0.25rem;
}
.allwr-txn__split-rm:hover { color: var(--allwr-navy); }
.allwr-txn__split-total { font-size: 0.8rem; margin: 0.4rem 0 0; }
.allwr-txn__split-total.is-bad { color: #b23; }

/* --- Autorrelleno con IA --- */
.allwr-attach__ai { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0.6rem 0; }
.allwr-attach__ai-result {
    flex: 1 1 100%; margin-top: 0.3rem; padding: 0.65rem 0.85rem;
    border: 1px solid var(--allwr-line, #e6e2d8); border-radius: 12px;
    background: color-mix(in srgb, var(--allwr-gold) 5%, transparent); font-size: 0.82rem;
}
.allwr-attach__ai-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.15rem 0; }
.allwr-attach__ai-row span { color: var(--allwr-muted, #8a8676); }
.allwr-attach__ai-result .allwr-app__btn { margin-top: 0.55rem; }

/* --- Wealth Eye card --- */
.allwr-app__wealth-eye {
    margin: 1.25rem 0 0;
    padding: 1rem 1.1rem;
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 30%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--allwr-gold) 6%, #fff) 0%,
        #fff 80%);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(2,21,43,0.04);
}
.allwr-app__eyebrow--gold { color: color-mix(in srgb, var(--allwr-gold) 70%, var(--allwr-navy)); }
.allwr-app__wealth-eye-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.35rem; }
.allwr-app__wealth-eye-item { color: var(--allwr-navy); font-size: 0.95rem; }
.allwr-app__wealth-eye-item[data-kind="warn"] { color: #B23A48; }
.allwr-app__wealth-eye-item[data-kind="hint"] { color: var(--allwr-muted, #4a5b6a); }

/* --- Connections section --- */
.allwr-app__connections { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.allwr-app__connection {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                box-shadow var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app__connection:hover {
    border-color: var(--allwr-navy);
    box-shadow: 0 8px 22px rgba(2,21,43,0.06);
}
.allwr-app__connection-meta { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.allwr-app__connection-logo {
    /* Los logos vienen como SVG ya optimizados desde Wealthreader; sin
       recuadro ni fondo, se integran limpios con el fondo de la card.
       Tamaño 60px = 40px × 1.5 (petición del usuario). */
    width: 60px; height: 60px;
    object-fit: contain;
    background: transparent;
    border: 0;
    flex-shrink: 0;
}
.allwr-app__connection-logo--placeholder {
    /* El placeholder mantiene un fondo suave gold-soft sólo para que las
       iniciales sean legibles cuando no hay logo; sin border. */
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    font: 700 1.4rem 'Satoshi', system-ui, sans-serif;
    color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-gold) 14%, transparent);
}
.allwr-app__connection-text { min-width: 0; }
.allwr-app__connection-name { margin: 0; font-weight: 600; color: var(--allwr-navy); }
.allwr-app__connection-sub  { margin: 0.15rem 0 0; color: var(--allwr-muted, #4a5b6a); font-size: 0.85rem; }
.allwr-app__connection-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.allwr-app__connection-empty { padding: 0.75rem 0; }
/* Aviso de profundidad de movimientos. Vive dentro de la tarjeta de entidades
   (≈460px de ancho útil): con las acciones en una tercera columna, el track
   `auto` reclama el ancho del CTA y el texto se queda con una palabra por
   línea. Dos columnas — icono y contenido — y las acciones bajo el texto. */
.allwr-app__connection-advice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.6rem 0.75rem;
    align-items: start;
    margin-top: 0.75rem;
    padding: 0.8rem;
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 34%, var(--allwr-line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--allwr-gold) 10%, #fff);
}
.allwr-app__connection-advice-icon {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-gold) 18%, #fff);
    color: var(--allwr-navy);
    flex: 0 0 auto;
}
.allwr-app__connection-advice-svg { width: 18px; height: 18px; }
.allwr-app__connection-advice-copy { min-width: 0; padding-top: 0.35rem; }
.allwr-app__connection-advice-copy p { margin: 0; color: var(--allwr-navy); font-size: 0.88rem; line-height: 1.45; text-wrap: pretty; }
.allwr-app__connection-advice-warning { margin-top: 0.25rem !important; color: #B23A48 !important; font-weight: 600; }
.allwr-app__connection-advice-actions {
    grid-column: 2;
    display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
}

.allwr-app__chip {
    display: inline-flex; align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--allwr-gold) 14%, transparent);
    color: var(--allwr-navy);
}
.allwr-app__chip[data-status="active"]   { background: color-mix(in srgb, #43A047 18%, transparent); }
.allwr-app__chip[data-status="error"],
.allwr-app__chip[data-status="expired"]  { background: color-mix(in srgb, #C44569 18%, transparent); color: #B23A48; }
.allwr-app__chip[data-status="revoked"]  { background: color-mix(in srgb, #6B7280 18%, transparent); color: #4a5b6a; }
.allwr-app__chip[data-status="pending"]  { background: color-mix(in srgb, var(--allwr-gold) 20%, transparent); }
.allwr-app__chip[data-status="2fa"]      { background: color-mix(in srgb, var(--allwr-gold) 22%, transparent); color: #9A6A0A; }
.allwr-app__chip[data-status="stale"]    { background: color-mix(in srgb, var(--allwr-gold) 22%, transparent); color: #9A6A0A; }
/* Calendario de pagos de inversiones: previsto (oro) vs cobrado (verde). */
.allwr-app__chip[data-txstatus="expected"] { background: color-mix(in srgb, var(--allwr-gold) 20%, transparent); color: #9A6A0A; }
.allwr-app__chip[data-txstatus="settled"]  { background: color-mix(in srgb, #43A047 18%, transparent); }
.allwr-app__chip[data-txstatus="overdue"]  { background: color-mix(in srgb, #C44569 18%, transparent); color: #B23A48; }

/* Etiqueta de estado con tooltip al sobrevolar (fecha hora + motivo del error
   de sincronización). Reutilizable en chips de dashboard y consent-status. */
.allwr-app__has-tip { position: relative; cursor: help; }
.allwr-app__has-tip::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 6px); left: 0;
    background: var(--allwr-navy); color: #fff;
    padding: 0.5rem 0.7rem; border-radius: 8px;
    font-size: 0.78rem; font-weight: 500; line-height: 1.4;
    white-space: pre-line; text-align: left;
    width: max-content; max-width: 280px;
    opacity: 0; pointer-events: none;
    transform: translateY(2px);
    transition: opacity var(--allwr-transition-fast, 150ms ease-out),
                transform var(--allwr-transition-fast, 150ms ease-out);
    z-index: 30;
}
/* Anclado a la derecha cuando la etiqueta vive en el lado derecho de su fila
   (consent-status), para que el globo no se salga del borde de la tarjeta. */
.allwr-app__has-tip--right::after { left: auto; right: 0; }
.allwr-app__has-tip:hover::after,
.allwr-app__has-tip:focus-visible::after { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .allwr-app__has-tip::after { transition-duration: 0.01ms; transform: none !important; }
}


/* Bank file processor terminal */
.allwr-files-processor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.8rem 0 1rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 32%, var(--allwr-line));
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--allwr-gold) 18%, transparent), transparent 35%),
        linear-gradient(135deg, #fff, color-mix(in srgb, var(--allwr-off-white) 75%, #fff));
    box-shadow: 0 16px 42px rgba(2,21,43,0.08);
}
.allwr-files-processor[hidden] { display: none; }
.allwr-files-processor__title {
    margin: 0 0 0.2rem;
    font: 700 1rem 'Satoshi', system-ui, sans-serif;
    color: var(--allwr-navy);
}
.allwr-files-processor__hint {
    margin: 0;
    color: var(--allwr-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}
.allwr-terminal-modal {
    position: fixed;
    inset: 0;
    z-index: 320;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(2,21,43,0.68);
    backdrop-filter: blur(6px);
}
.allwr-terminal-modal[hidden] { display: none; }
.allwr-terminal-modal__card {
    width: min(860px, 100%);
    max-height: min(86vh, 720px);
    display: grid;
    grid-template-rows: auto auto minmax(220px, 1fr) auto;
    gap: 0.9rem;
    padding: 1.2rem;
    border: 1px solid color-mix(in srgb, #E0AB3A 42%, rgba(255,255,255,0.22));
    border-radius: 22px;
    background:
        radial-gradient(circle at 15% 0%, rgba(224,171,58,0.20), transparent 34%),
        linear-gradient(145deg, #061A34, #020B17 62%, #071C38);
    color: #F8F7F4;
    box-shadow: 0 30px 90px rgba(0,0,0,0.45);
}
.allwr-terminal-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.allwr-terminal-modal__title {
    margin: 0;
    font: 800 clamp(1.25rem, 2vw, 1.8rem) 'Satoshi', system-ui, sans-serif;
    color: #fff;
}
.allwr-terminal-modal__close {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: background-color var(--allwr-transition-fast), border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-terminal-modal__close:hover {
    background: rgba(224,171,58,0.18);
    border-color: #E0AB3A;
    box-shadow: 0 0 0 4px rgba(224,171,58,0.12);
}
.allwr-terminal-modal__close:focus-visible {
    outline: 3px solid rgba(224,171,58,0.48);
    outline-offset: 2px;
}
.allwr-terminal-modal__ascii,
.allwr-terminal-modal__screen,
.allwr-terminal-modal__summary {
    font-family: Consolas, 'SFMono-Regular', 'Liberation Mono', Menlo, monospace;
}
.allwr-terminal-modal__ascii {
    margin: 0;
    color: #E0AB3A;
    font-size: clamp(0.78rem, 1.6vw, 1.05rem);
    line-height: 1.08;
    text-shadow: 0 0 22px rgba(224,171,58,0.42);
    white-space: pre;
}
.allwr-terminal-modal__screen {
    overflow: auto;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background: rgba(0,0,0,0.36);
    box-shadow: inset 0 0 32px rgba(0,0,0,0.34);
}
.allwr-terminal-modal__line {
    display: grid;
    grid-template-columns: 5.7rem 5.5rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: baseline;
    padding: 0.28rem 0;
    font-size: 0.88rem;
    line-height: 1.45;
}
.allwr-terminal-modal__stamp { color: rgba(248,247,244,0.58); }
.allwr-terminal-modal__level { font-weight: 800; letter-spacing: 0.08em; }
.allwr-terminal-modal__message { color: #F8F7F4; }
.allwr-terminal-modal__meta {
    grid-column: 3;
    color: rgba(248,247,244,0.58);
    overflow-wrap: anywhere;
}
.allwr-terminal-modal__line[data-level="success"] .allwr-terminal-modal__level { color: #4ADE80; }
.allwr-terminal-modal__line[data-level="info"] .allwr-terminal-modal__level { color: #60A5FA; }
.allwr-terminal-modal__line[data-level="warning"] .allwr-terminal-modal__level { color: #FACC15; }
.allwr-terminal-modal__line[data-level="error"] .allwr-terminal-modal__level { color: #FB7185; }
.allwr-terminal-modal__summary {
    margin: 0;
    padding-top: 0.2rem;
    color: rgba(248,247,244,0.78);
}
@media (max-width: 680px) {
    .allwr-files-processor { align-items: stretch; flex-direction: column; }
    .allwr-terminal-modal__line { grid-template-columns: 1fr; gap: 0.1rem; }
    .allwr-terminal-modal__meta { grid-column: 1; }
}

/* --- Tabs + Productos --- */
.allwr-app__tabs {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    margin: 0.75rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--allwr-line, #E6E2D8);
}
.allwr-app__tab {
    appearance: none; border: 1px solid transparent; background: transparent;
    color: var(--allwr-muted, #4a5b6a);
    padding: 0.4rem 0.85rem; border-radius: 999px;
    font: 500 0.85rem 'Inter', system-ui, sans-serif; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.4rem;
    transition: background-color var(--allwr-transition-fast, 150ms ease-out),
                color var(--allwr-transition-fast, 150ms ease-out),
                border-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app__tab:hover { color: var(--allwr-navy); }
.allwr-app__tab.is-active {
    background: var(--allwr-navy); color: #fff; border-color: var(--allwr-navy);
}
.allwr-app__tab-count {
    font-size: 0.7rem; padding: 0.1rem 0.4rem;
    background: color-mix(in srgb, var(--allwr-gold) 18%, transparent);
    border-radius: 999px; color: var(--allwr-navy);
}
.allwr-app__tab.is-active .allwr-app__tab-count {
    background: rgba(255,255,255,0.18); color: #fff;
}
.allwr-app__tab-icon { width: 14px; height: 14px; flex-shrink: 0; }
.allwr-app__tab--gated {
    opacity: 0.5; cursor: pointer;
    border: 1px dashed var(--allwr-muted, #4a5b6a);
}
.allwr-app__tab--gated.is-active {
    background: transparent; color: var(--allwr-muted, #4a5b6a);
    border: 1px dashed var(--allwr-navy); opacity: 0.7;
}
.allwr-app__gated-cta { margin: 1rem 0; }
.allwr-app__gated-cta-card {
    background: #fff; border: 1px dashed var(--allwr-line, #E6E2D8);
    border-radius: 14px; padding: 1.5rem; text-align: center;
    max-width: 480px; margin: 0 auto;
}
.allwr-app__gated-cta-icon { width: 32px; height: 32px; color: var(--allwr-muted); margin-bottom: 0.5rem; }
.allwr-app__gated-cta-text {
    font: 400 0.9rem/1.5 'Inter', system-ui, sans-serif;
    color: var(--allwr-muted); margin: 0 0 1rem;
}

/* Physical card visual for credit/debit/prepaid cards */
.allwr-card-visual {
    display: grid; position: relative;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto;
    aspect-ratio: 1.586 / 1;
    padding: 0.85rem 1rem;
    border-radius: 14px; text-decoration: none; color: #fff;
    background: linear-gradient(135deg, var(--allwr-navy) 0%, #0a2a4a 100%);
    box-shadow: 0 8px 24px rgba(2,21,43,0.18);
    overflow: hidden;
    transition: box-shadow var(--allwr-transition-fast, 150ms ease-out),
                transform var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-card-visual:hover { box-shadow: 0 12px 32px rgba(2,21,43,0.28); }
.allwr-card-visual--debit { background: linear-gradient(135deg, #1a3a5c 0%, #2a4a6c 100%); }
.allwr-card-visual--prepaid { background: linear-gradient(135deg, #3a4a5c 0%, #4a5a6c 100%); }
.allwr-card-visual--inactive {
    filter: grayscale(0.75);
    opacity: 0.82;
}
.allwr-card-visual--inactive::after {
    content: "";
    position: absolute; inset: 0;
    background: rgba(2,21,43,0.28);
    pointer-events: none;
}

.allwr-card-visual__type {
    grid-column: 1; grid-row: 1;
    font: 600 0.65rem 'Inter', system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: 0.08em;
    opacity: 0.7;
}
.allwr-card-visual__status {
    position: absolute;
    top: 0.5rem; right: 0.5rem;
    z-index: 2;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    color: #B23A48;
    font: 700 0.62rem 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.allwr-card-visual__bank {
    grid-column: 2; grid-row: 1;
    width: 36px; height: 36px; object-fit: contain;
    border-radius: 6px; background: rgba(255,255,255,0.80);
    justify-self: end;
}
.allwr-card-visual__bank--text {
    display: inline-flex; align-items: center; justify-content: center;
    font: 700 0.75rem 'Satoshi', system-ui, sans-serif;
    color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.25);
}
.allwr-card-visual__holder-name {
    grid-column: 1 / -1; grid-row: 2;
    align-self: end;
    font: 500 0.7rem 'Inter', system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: 0.08em;
    opacity: 0.75;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.allwr-card-visual__holder-name[data-allwr-card-editable] { cursor: text; opacity: 0.45; }
.allwr-card-visual__holder-input {
    background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.5);
    color: #fff; font: 500 0.7rem 'Inter', system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: 0.08em;
    outline: none; width: 100%; padding: 0;
}
.allwr-card-visual__number {
    grid-column: 1 / -1; grid-row: 3;
    display: flex; align-items: center; gap: 0.35rem;
}
.allwr-card-visual__dots {
    font: 400 0.85rem 'Inter', monospace;
    letter-spacing: 0.18em; opacity: 0.4;
    /* Los puntos llevan espacios: sin nowrap la fila se parte en dos líneas en
       columnas estrechas y la tarjeta deja de medir lo que la de cuenta. */
    white-space: nowrap;
}
.allwr-card-visual__last4 {
    font: 700 1.1rem 'Satoshi', system-ui, sans-serif;
    letter-spacing: 0.12em; margin-left: auto;
}
.allwr-card-visual__holder {
    grid-column: 1; grid-row: 4;
    font: 500 0.72rem 'Inter', system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: 0.06em;
    opacity: 0.65; align-self: end;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 60%;
}
.allwr-card-visual__balance {
    grid-column: 2; grid-row: 4;
    align-self: end; justify-self: end;
    font: 700 1rem 'Satoshi', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.allwr-card-visual__share {
    position: absolute; top: 0.5rem; left: 0.5rem;
    appearance: none; background: rgba(255,255,255,0.12); border: none;
    border-radius: 50%; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0;
    transition: opacity var(--allwr-transition-fast, 150ms ease-out),
                background var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-card-visual:hover .allwr-card-visual__share { opacity: 1; }
.allwr-card-visual__share:hover { background: rgba(255,255,255,0.25); }
.allwr-card-visual__share-icon { width: 14px; height: 14px; color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .allwr-card-visual { transition-duration: 0.01ms; }
    .allwr-card-visual__share { opacity: 1; }
}

.allwr-app__products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}
.allwr-app__product {
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    color: var(--allwr-navy);
    text-decoration: none;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                box-shadow var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app__product:hover {
    border-color: var(--allwr-navy);
    box-shadow: 0 10px 24px rgba(2,21,43,0.08);
}
.allwr-app__product-type {
    font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--allwr-muted, #4a5b6a);
}
.allwr-app__product-name { font-weight: 600; font-size: 0.98rem; }
.allwr-app__product-sub  { font-size: 0.83rem; color: var(--allwr-muted, #4a5b6a); }
.allwr-app__product-value {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700; font-variant-numeric: tabular-nums;
    margin-top: 0.4rem;
}
.allwr-app__product-value--debt    { color: #B23A48; }
.allwr-app__product-value--muted   { color: var(--allwr-muted, #4a5b6a); }

.allwr-app__empty--inline { padding: 0.75rem 0; }

/* --- Toast --- */
.allwr-app__toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
    background: var(--allwr-navy); color: #fff;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 24px 60px rgba(2,21,43,0.30);
    z-index: 200;
    font: 500 0.92rem 'Inter', system-ui, sans-serif;
    max-width: min(640px, calc(100% - 32px));
}
.allwr-app__toast[hidden] { display: none; }
.allwr-app__toast[data-kind="ok"]      { background: linear-gradient(180deg, #2f7d3a, #1d5825); }
.allwr-app__toast[data-kind="partial"] { background: linear-gradient(180deg, color-mix(in srgb, var(--allwr-gold) 50%, var(--allwr-navy)), var(--allwr-navy)); }
.allwr-app__toast[data-kind="failed"]  { background: linear-gradient(180deg, #b23a48, #7a242e); }

/* Emoji de categoría inline en lista de movimientos. */
.allwr-app__txn-emoji {
    display: inline-block;
    margin-right: 0.45rem;
    font-size: 1.0rem;
    line-height: 1;
    vertical-align: -0.05em;
}

/* Marcador de ubicación (tarjeta en tiempo real) inline en lista de movimientos. */
.allwr-app__txn-geo {
    display: inline-flex;
    vertical-align: -0.15em;
    margin-left: 0.3rem;
    color: var(--allwr-ink-3, #6b7a88);
}
.allwr-app__txn-geo-icon { width: 14px; height: 14px; }
/* Chip en línea dentro de una celda de tabla: mismo lenguaje que .allwr-app__chip
   pero sin robarle altura a la fila. */
.allwr-app__chip--small {
    padding: 0.05rem 0.45rem;
    font-size: 0.68rem;
    line-height: 1.4;
}
.allwr-app__chip--small[data-source="realtime"] {
    margin-left: 0.4rem;
    background: color-mix(in srgb, var(--allwr-gold) 20%, transparent);
    color: #9A6A0A;
}

/* Logo del banco en lista de movimientos: sin borde, doble tamaño, centrado. */
.allwr-app__col--bank { width: 56px; padding-right: 0; text-align: center; vertical-align: middle; }
.allwr-app__bank-logo {
    display: inline-block;
    width: 44px; height: 44px;
    border-radius: 8px;
    object-fit: contain;
    vertical-align: middle;
}
.allwr-app__bank-logo--placeholder {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 8px;
    font: 700 1.1rem 'Satoshi', system-ui, sans-serif;
    color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-gold) 14%, #fff);
}
.allwr-app__txn-product { color: var(--allwr-navy); text-decoration: none; }
.allwr-app__txn-product:hover { color: var(--allwr-gold); }
.nowrap { white-space: nowrap; }

/* Renombrado inline del nombre de producto (cuentas/préstamos/ficheros). */
[data-allwr-name-editable] {
    cursor: text;
    border-bottom: 1px dashed transparent;
    transition: border-color var(--allwr-transition-fast);
}
[data-allwr-name-editable]:hover { border-bottom-color: var(--allwr-gold-soft); }
.allwr-app__name-input {
    font: inherit;
    color: var(--allwr-navy);
    width: 100%;
    max-width: 100%;
    border: 0;
    border-bottom: 1px solid var(--allwr-gold-soft);
    border-radius: 0;
    padding: 0;
    background: transparent;
}
.allwr-app__name-input:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 4px;
    border-color: var(--allwr-gold);
}

/* Filtros de "Movimientos recientes". */
.allwr-app__movements-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
}
.allwr-app__filter { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.allwr-app__filter--grow { flex: 1 1 12rem; }
.allwr-app__filter-label { font-size: 0.75rem; color: var(--allwr-muted); font-weight: 500; }
.allwr-app__filter-input {
    font: inherit;
    font-size: 0.9rem;
    color: var(--allwr-navy);
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    transition: border-color var(--allwr-transition-fast);
}
.allwr-app__filter-input--num { width: 7rem; }
.allwr-app__filter-input:hover { border-color: var(--allwr-gold-soft); }
.allwr-app__filter-input:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
    border-color: var(--allwr-gold);
}
@media (max-width: 640px) {
    .allwr-app__filter { flex: 1 1 8rem; }
    .allwr-app__filter--grow { flex: 1 1 100%; }
}

/* Menú contextual de marca (clic derecho). Reutilizable y extensible. */
.allwr-ctxmenu {
    position: fixed;
    z-index: 1000;
    min-width: 180px;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(2, 21, 43, 0.18);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.allwr-ctxmenu__item {
    appearance: none;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.9rem;
    color: var(--allwr-navy);
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color var(--allwr-transition-fast), color var(--allwr-transition-fast);
}
.allwr-ctxmenu__item:hover { background: color-mix(in srgb, var(--allwr-gold) 14%, #fff); }
.allwr-ctxmenu__item:focus-visible { outline: 3px solid var(--allwr-gold-soft); outline-offset: -2px; }
.allwr-ctxmenu__item--danger { color: #B23A48; }
.allwr-ctxmenu__item--danger:hover { background: color-mix(in srgb, #B23A48 10%, #fff); }

/* ============================================================================
   Ficha enriquecida de movimiento /m/<uuid>
   ============================================================================ */

.allwr-app__amount--in  { color: #2f7d3a; }
.allwr-app__amount--out { color: var(--allwr-navy); }
.allwr-app__h2--small { font-size: 1rem; margin-top: 1rem; }

/* Shell de la ficha: cabecera pegada arriba, un ÚNICO scroll en el cuerpo y barra
   de acciones pegada abajo. Se usa igual dentro del drawer (iframe) que como
   página completa en /m/<uuid>. */
.allwr-app--txn { padding: 0; background: var(--allwr-canvas, var(--allwr-off-white)); }
.allwr-txn {
    --allwr-txn-gutter: clamp(1rem, 2.2vw, 1.75rem);
    display: flex;
    flex-direction: column;
    /* Como página completa la topbar ya ocupa su banda; dentro del drawer no hay. */
    min-height: calc(100dvh - var(--allwr-topbar-h, 0px));
    max-width: 1560px;
    margin-inline: auto;
    padding-inline: var(--allwr-txn-gutter);
}
body.allwr-embed .allwr-txn { min-height: 100dvh; }
body.allwr-embed .allwr-txn__head { top: 0; }

.allwr-txn__head {
    position: sticky;
    /* Como página completa se pega bajo la topbar; dentro del drawer no hay topbar. */
    top: var(--allwr-topbar-h, 0px);
    z-index: 5;
    display: grid;
    gap: 0.55rem;
    margin-inline: calc(var(--allwr-txn-gutter) * -1);
    padding: 0.85rem var(--allwr-txn-gutter) 0.8rem;
    background: var(--allwr-canvas, var(--allwr-off-white));
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-txn__head-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
/* El aspa del drawer es del panel padre, no del iframe: reservar su hueco. */
body.allwr-embed .allwr-txn__head-top { padding-right: 3.25rem; }
.allwr-txn__back {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--allwr-ink-2, #5C6473);
    text-decoration: none;
    transition: color var(--allwr-transition-fast);
}
.allwr-txn__back:hover { color: var(--allwr-navy); }

.allwr-txn__mode {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.28rem 0.8rem;
    border-radius: var(--allwr-radius-pill);
    border: 1px solid var(--allwr-line);
    background: var(--allwr-card, #fff);
    color: var(--allwr-navy);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color var(--allwr-transition-base), border-color var(--allwr-transition-base);
}
.allwr-txn__mode:hover { background: var(--allwr-surface-2, #F4F1EB); border-color: var(--allwr-gold); }
.allwr-txn__mode-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--allwr-ink-3, #6b7a88);
}

/* Procedencia del movimiento: banco · cuenta · IBAN, en bloques separados por filete. */
.allwr-txn__source {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--allwr-ink-3, #6b7a88);
}
.allwr-txn__source-logo { border-radius: 4px; }
.allwr-txn__source-bank { color: var(--allwr-gold-text, #8A6410); }
.allwr-txn__source-account {
    color: var(--allwr-ink-2, #5C6473);
    text-decoration: none;
    transition: color var(--allwr-transition-fast);
}
.allwr-txn__source-account:hover { color: var(--allwr-navy); }
.allwr-txn__source-iban { letter-spacing: 0.14em; font-variant-numeric: tabular-nums; }
.allwr-txn__source-account::before,
.allwr-txn__source-iban::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 0.9em;
    margin-right: 0.5rem;
    vertical-align: -0.12em;
    background: var(--allwr-line);
}

.allwr-txn__identity {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}
.allwr-txn__identity-main { min-width: 0; }
.allwr-txn__title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.allwr-txn__title {
    margin: 0;
    font-size: clamp(1.15rem, 2.1vw, 1.6rem);
    line-height: 1.2;
    color: var(--allwr-navy);
}
.allwr-txn__emoji { display: inline-block; margin-right: 0.35rem; font-size: 1.15rem; }
.allwr-txn__title-edit {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--allwr-ink-3, #6b7a88);
    cursor: pointer;
    transition: color var(--allwr-transition-fast),
                background-color var(--allwr-transition-fast),
                border-color var(--allwr-transition-fast);
}
.allwr-txn__title-edit:hover {
    color: var(--allwr-navy);
    background: var(--allwr-surface-2, #F4F1EB);
    border-color: var(--allwr-line);
}
.allwr-txn__title-edit:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-txn__title-edit-icon { width: 15px; height: 15px; }
.allwr-txn__title-input {
    flex: 1 1 280px;
    min-width: 200px;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--allwr-gold);
    border-radius: 10px;
    background: #fff;
    color: var(--allwr-navy);
    font: 700 clamp(1.05rem, 1.9vw, 1.4rem) 'Satoshi', system-ui, sans-serif;
}
.allwr-txn__title-input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-txn__title-row.is-editing .allwr-txn__title,
.allwr-txn__title-row.is-editing .allwr-txn__title-edit { display: none; }
.allwr-txn__dates { margin: 0.3rem 0 0; font-size: 0.82rem; color: var(--allwr-ink-2, #5C6473); }

.allwr-app--txn .allwr-app__amount {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.allwr-txn-modemodal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; }
.allwr-txn-modemodal[hidden] { display: none; }
.allwr-txn-modemodal__overlay { position: absolute; inset: 0; background: rgba(2, 21, 43, 0.5); }
.allwr-txn-modemodal__panel {
    position: relative;
    width: min(92vw, 460px);
    max-height: 88vh;
    overflow: auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2, 21, 43, 0.28);
}
.allwr-txn-modemodal__title { margin: 0 0 0.3rem; color: var(--allwr-navy); font-size: 1.2rem; }
.allwr-txn-modemodal__sub { margin: 0 0 1rem; color: var(--allwr-muted, #6b7a88); font-size: 0.9rem; }
.allwr-txn-modemodal__options { display: grid; gap: 0.6rem; }
.allwr-txn-modemodal__opt {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: left;
    padding: 0.8rem 1rem;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    background: var(--allwr-off-white);
    cursor: pointer;
    transition: border-color var(--allwr-transition-base), background var(--allwr-transition-base);
}
.allwr-txn-modemodal__opt:hover { border-color: var(--allwr-gold); background: #fff; }
.allwr-txn-modemodal__opt.is-current { border-color: var(--allwr-navy); background: #fff; }
.allwr-txn-modemodal__opt strong { color: var(--allwr-navy); font-size: 0.98rem; }
.allwr-txn-modemodal__opt span { color: var(--allwr-muted, #6b7a88); font-size: 0.82rem; }
.allwr-txn-modemodal__warn {
    margin: 0.9rem 0 0;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: rgba(222, 173, 57, 0.14);
    color: #6b5210;
    font-size: 0.82rem;
}
.allwr-txn-modemodal__foot { margin-top: 1rem; display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Chips de estado de la cabecera del movimiento. */
.allwr-txn__chip {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.6rem;
    border-radius: var(--allwr-radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
}
.allwr-txn__chip--ok    { background: rgba(31, 107, 75, 0.12);  color: var(--allwr-green, #1F6B4B); }
.allwr-txn__chip--warn  { background: rgba(154, 106, 10, 0.14); color: var(--allwr-amber, #9A6A0A); }
.allwr-txn__chip--info  { background: rgba(2, 21, 43, 0.07);    color: var(--allwr-navy); }
.allwr-txn__chip--muted { background: rgba(2, 21, 43, 0.05);    color: var(--allwr-muted, #6b7a88); }

/* Fila de estados separados (justificante / aprobación / contabilidad): siempre
   con texto, el color sólo refuerza (nunca es el único canal del estado). */
.allwr-txn__statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.allwr-txn__chip--dot { gap: 0.4rem; padding: 0.18rem 0.7rem; }
.allwr-txn__chip--dot::before {
    content: '';
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.allwr-txn__chip-k { font-weight: 700; }

.allwr-txn__amount-box { text-align: right; }
.allwr-txn__amount-sub {
    margin: 0.3rem 0 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--allwr-ink-3, #6b7a88);
}

/* Cuerpo: un único scroll. Las columnas NO tienen scroll propio — la ficha entera
   se recorre de una vez y sólo cabecera y barra de acciones quedan fijas. */
.allwr-txn__body { flex: 1 1 auto; padding: 1rem 0 1.25rem; }
.allwr-txn__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
@media (min-width: 760px) {
    .allwr-txn__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Escritorio: todas las zonas a la vista. --cols3 (particular: justificante ·
   detalles · banco) y --cols4 (autónomo/empresa: + contabilidad). La columna de
   datos bancarios es la estrecha: es lectura, no formulario. */
@media (min-width: 1160px) {
    .allwr-txn__grid--cols3 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.85fr); }
}
@media (min-width: 1320px) {
    .allwr-txn__grid--cols4 { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.85fr); }
}
.allwr-txn__col { display: grid; gap: 1rem; align-content: start; }

.allwr-txn__card {
    background: var(--allwr-card, #fff);
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 16px;
    padding: clamp(1rem, 1.5vw, 1.35rem);
}
.allwr-txn__card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.allwr-txn__card-title {
    margin: 0;
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--allwr-navy);
}
.allwr-txn__card > .allwr-txn__card-title { margin-bottom: 0.9rem; }
.allwr-txn__card-sub { margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--allwr-ink-2, #5C6473); }

.allwr-txn__field { display: grid; gap: 0.35rem; margin: 0 0 0.85rem; }
.allwr-txn__field[hidden] { display: none; }
.allwr-txn__field:last-child { margin-bottom: 0; }
.allwr-txn__label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--allwr-ink-2, #5C6473);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
/* Pareja de campos que comparten fila cuando hay ancho (deducible + %, IVA + tipo). */
.allwr-txn__row { display: flex; flex-wrap: wrap; gap: 0 0.75rem; }
.allwr-txn__row > .allwr-txn__field { flex: 1 1 140px; }
.allwr-txn__field-inline { display: flex; align-items: center; gap: 0.5rem; }
.allwr-txn__field-inline > select { flex: 1 1 auto; min-width: 0; }
.allwr-txn__field-inline > .allwr-app__btn { flex: 0 0 auto; white-space: nowrap; }

/* Datos de tarjeta en tiempo real (Open Sync/Wenalyze): comercio y ubicación,
   sólo lectura -- ver AGENTS.md "Tarjetas en tiempo real (Open Sync / Wenalyze)". */
.allwr-txn__static { font-size: 0.9rem; color: var(--allwr-navy); }
.allwr-txn__static-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    color: var(--allwr-ink-2, #5C6473);
    text-decoration: none;
    transition: color var(--allwr-transition-fast);
}
.allwr-txn__static-link:hover { color: var(--allwr-navy); }
.allwr-txn__static-link:focus-visible {
    outline: 3px solid var(--allwr-gold-soft, #f1d99a);
    outline-offset: 2px;
    border-radius: 4px;
}
.allwr-txn__static-link-icon { width: 15px; height: 15px; flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce) {
    .allwr-txn__static-link { transition-duration: 0.01ms; }
}

.allwr-txn__card input[type="text"],
.allwr-txn__card input[type="number"],
.allwr-txn__card textarea,
.allwr-txn__card select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 10px;
    background: #fff;
    color: var(--allwr-navy);
    font: 400 0.9rem 'Inter', system-ui, sans-serif;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-txn__card textarea { resize: vertical; min-height: 6.5rem; }
.allwr-txn__card input:focus-visible,
.allwr-txn__card textarea:focus-visible,
.allwr-txn__card select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
    border-color: var(--allwr-gold);
}
.allwr-txn__add-btn { margin-top: 0.5rem; justify-self: start; }
.allwr-txn__plan-change {
    margin-left: 0.45rem;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--allwr-gold-text, #8A6410);
}

.allwr-txn__check { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.85rem; font-size: 0.88rem; }
.allwr-txn__check input { width: 1rem; height: 1rem; accent-color: var(--allwr-navy); }
.allwr-txn__fiscal-warn {
    margin: -0.4rem 0 0.85rem;
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    background: rgba(222, 173, 57, 0.14);
    color: #6b5210;
    font-size: 0.8rem;
}
.allwr-txn__newproj-form { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.allwr-txn__newproj-form[hidden] { display: none; }

.allwr-txn__details { margin: 0 0 0.85rem; }
.allwr-txn__details summary { cursor: pointer; padding: 0.3rem 0; }

/* Barra de acciones pegada al fondo del drawer: siempre visible, jerarquía clara
   (guardar y categorizar siguiente es la acción del flujo, en oro). */
.allwr-txn__footbar {
    position: sticky;
    bottom: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-inline: calc(var(--allwr-txn-gutter) * -1);
    padding: 0.7rem var(--allwr-txn-gutter) max(0.7rem, env(safe-area-inset-bottom));
    background: var(--allwr-card, #fff);
    border-top: 1px solid var(--allwr-line);
    box-shadow: 0 -8px 24px rgba(2, 21, 43, 0.05);
}
.allwr-txn__foot-status { margin-right: auto; font-size: 0.82rem; }
.allwr-txn__foot-save { min-width: 140px; justify-content: center; }
.allwr-txn__foot-next {
    flex: 0 1 auto;
    min-width: min(420px, 48vw);
    justify-content: center;
    gap: 0.6rem;
    background: var(--allwr-gold);
    border-color: var(--allwr-gold);
    color: var(--allwr-navy);
    font-weight: 700;
}
.allwr-txn__foot-next:hover {
    background: var(--allwr-gold-hover, #C9982B);
    border-color: var(--allwr-gold-hover, #C9982B);
    box-shadow: 0 8px 22px rgba(222, 173, 57, 0.3);
}
.allwr-txn__foot-next-icon { flex-shrink: 0; }

/* Línea de tiempo compacta: punto + acción + cuándo, unidos por un filete suave. */
.allwr-txn__timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.allwr-txn__event { position: relative; display: grid; gap: 0.1rem; padding-left: 1.1rem; }
.allwr-txn__event::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 1rem;
    bottom: -0.6rem;
    width: 1px;
    background: var(--allwr-line);
}
.allwr-txn__event:last-child::before { display: none; }
.allwr-txn__event-dot {
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--allwr-navy);
}
.allwr-txn__event:first-child .allwr-txn__event-dot { background: var(--allwr-gold); }
.allwr-txn__event-action { font-size: 0.85rem; font-weight: 600; color: var(--allwr-navy); }
.allwr-txn__event-when { font-size: 0.76rem; }
.allwr-txn__timeline-more { margin-top: 0.6rem; }
.allwr-txn__timeline-more > summary {
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--allwr-ink-2, #5C6473);
    transition: color var(--allwr-transition-fast);
}
.allwr-txn__timeline-more > summary:hover { color: var(--allwr-navy); }
.allwr-txn__timeline-more > .allwr-txn__timeline { margin-top: 0.6rem; }

/* Línea de tiempo a todo el ancho, en orden cronológico: el último evento (el
   más reciente) lleva el punto dorado. Horizontal con scroll propio en
   escritorio; vertical en pantallas estrechas. */
.allwr-txn__timeline-card--wide { margin-top: 1rem; }
.allwr-txn__timeline--wide .allwr-txn__event:first-child .allwr-txn__event-dot { background: var(--allwr-navy); }
.allwr-txn__timeline--wide .allwr-txn__event:last-child .allwr-txn__event-dot { background: var(--allwr-gold); }
@media (min-width: 760px) {
    .allwr-txn__timeline--wide {
        display: flex;
        gap: 0;
        overflow-x: auto;
        padding: 0.35rem 0 0.5rem;
    }
    .allwr-txn__timeline--wide .allwr-txn__event {
        flex: 1 0 190px;
        min-width: 190px;
        padding: 1.05rem 1rem 0 0;
    }
    .allwr-txn__timeline--wide .allwr-txn__event::before {
        left: 15px;
        right: 2px;
        top: 4px;
        bottom: auto;
        width: auto;
        height: 1px;
    }
    .allwr-txn__timeline--wide .allwr-txn__event:last-child::before { display: none; }
    .allwr-txn__timeline--wide .allwr-txn__event-dot { top: 0; left: 0; }
}

/* Datos bancarios originales: tarjeta de sólo lectura, filas etiqueta + valor. */
.allwr-txn__bank .allwr-txn__card-sub { margin: -0.5rem 0 0.85rem; }
.allwr-txn__bank-list { margin: 0; display: grid; }
.allwr-txn__bank-row {
    display: grid;
    gap: 0.14rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--allwr-line, #E6E2D8);
}
.allwr-txn__bank-list > .allwr-txn__bank-row:first-child { border-top: 0; padding-top: 0; }
.allwr-txn__bank-row dd {
    margin: 0;
    font-size: 0.85rem;
    color: var(--allwr-navy);
    overflow-wrap: anywhere;
}
.allwr-txn__bank-more { margin: 0.35rem 0 0; }
.allwr-txn__bank-more > .allwr-txn__bank-list { margin-top: 0.45rem; }

/* Eliminar movimiento (sólo manuales): acción discreta a la izquierda del footer. */
.allwr-txn__foot-delete {
    margin-right: 0.4rem;
    color: #B23A48;
    border-color: transparent;
}
.allwr-txn__foot-delete:hover {
    color: #8f2e39;
    background: color-mix(in srgb, #B23A48 8%, #fff);
    border-color: color-mix(in srgb, #B23A48 28%, transparent);
}
.allwr-txn__foot-delete:focus-visible {
    outline: 3px solid color-mix(in srgb, #B23A48 35%, transparent);
    outline-offset: 2px;
}

/* ============================================================================
   Dropzone + Ticket Scanner (ficha /m/<uuid>)
   ============================================================================ */

.allwr-dropzone {
    display: block;
    border: 2px dashed color-mix(in srgb, var(--allwr-gold) 45%, var(--allwr-line, #E6E2D8));
    background: color-mix(in srgb, var(--allwr-gold) 4%, #fff);
    border-radius: 16px;
    padding: 1.4rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                background-color var(--allwr-transition-fast, 150ms ease-out);
    user-select: none;
}
.allwr-dropzone:hover, .allwr-dropzone.is-hover,
.allwr-dropzone:focus-visible {
    border-color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-gold) 9%, #fff);
    outline: none;
}
.allwr-dropzone__inner { display: grid; gap: 0.3rem; justify-items: center; }
.allwr-dropzone__icon {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-gold) 22%, transparent);
    color: var(--allwr-navy);
    font-size: 1.1rem; font-weight: 700;
}
.allwr-dropzone__text { margin: 0; color: var(--allwr-navy); font-weight: 600; }
.allwr-dropzone__hint { margin: 0; color: var(--allwr-muted, #4a5b6a); font-size: 0.83rem; }

/* --- Scanner modal --- */
.allwr-scanner {
    position: fixed; inset: 0;
    background: #000;
    z-index: 1000;
    display: flex; flex-direction: column;
}
.allwr-scanner[hidden] { display: none; }
.allwr-scanner__viewport {
    position: relative; flex: 1 1 auto;
    background: #000;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.allwr-scanner__viewport video {
    display: block;
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
}
.allwr-scanner__overlay {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    object-fit: contain;
}
.allwr-scanner__hint {
    position: absolute; top: 1rem; left: 50%; transform: translateX(-50%);
    background: rgba(2,21,43,0.65);
    color: #fff;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font: 500 0.85rem 'Inter', system-ui, sans-serif;
    backdrop-filter: blur(6px);
    margin: 0;
}
.allwr-scanner__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 1.2rem max(1rem, env(safe-area-inset-bottom));
    background: #000;
    color: #fff;
}
.allwr-scanner__cancel {
    background: transparent; border: 0; color: #fff;
    font: 500 0.95rem 'Inter', system-ui, sans-serif;
    padding: 0.5rem 0.8rem; cursor: pointer;
    justify-self: start;
}
.allwr-scanner__spacer { display: block; }
.allwr-scanner__shutter {
    appearance: none;
    width: 68px; height: 68px;
    border-radius: 999px;
    background: var(--allwr-gold);
    border: 4px solid #fff;
    cursor: pointer;
    justify-self: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    position: relative;
    transition: background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-scanner__shutter:active { background: color-mix(in srgb, var(--allwr-gold) 70%, #fff); }
.allwr-scanner__shutter-ring { display: none; }
/* El JS del escáner alterna estados con [hidden]; el !important garantiza que
   gane a los display de las reglas de arriba (video, stage, bars). */
.allwr-scanner [hidden] { display: none !important; }
.allwr-scanner__close {
    position: absolute; top: 0.9rem; right: 0.9rem;
    z-index: 2;
    appearance: none; border: 0; cursor: pointer;
    width: 40px; height: 40px;
    border-radius: 999px;
    background: rgba(2,21,43,0.55);
    color: #fff;
    font-size: 1.1rem; line-height: 1;
    backdrop-filter: blur(6px);
    transition: background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-scanner__close:hover { background: rgba(2,21,43,0.8); }
.allwr-scanner__close:focus-visible {
    outline: 3px solid var(--allwr-gold-soft, rgba(222,173,57,0.55));
    outline-offset: 2px;
}
.allwr-scanner__stage {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.allwr-scanner__preview {
    display: flex; align-items: center; justify-content: center;
    max-width: 100%; max-height: 100%;
}
.allwr-scanner__preview-canvas {
    display: block;
    max-width: 100%; max-height: calc(100dvh - 180px);
    width: auto; height: auto;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    background: #fff;
}
.allwr-scanner__corners {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
}
.allwr-scanner__corner {
    fill: var(--allwr-gold);
    stroke: #fff; stroke-width: 3;
    cursor: grab;
    touch-action: none;
}
.allwr-scanner__progress {
    position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    background: rgba(2,21,43,0.65);
    padding: 0.6rem 1rem;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    color: #fff;
    font: 500 0.85rem 'Inter', system-ui, sans-serif;
}
.allwr-scanner__progress-bar {
    display: block;
    width: 180px; height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    overflow: hidden;
    position: relative;
}
.allwr-scanner__progress-bar::after {
    content: '';
    position: absolute; top: 0; left: -40%;
    width: 40%; height: 100%;
    border-radius: 999px;
    background: var(--allwr-gold);
    animation: allwr-scan-progress 1.2s ease-in-out infinite;
}
@keyframes allwr-scan-progress {
    0% { left: -40%; }
    100% { left: 100%; }
}
.allwr-scanner__progress-text { margin: 0; }
.allwr-scanner__bar--stack {
    grid-template-columns: none;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 0.7rem;
}
.allwr-scanner__primary {
    appearance: none; border: 0; cursor: pointer;
    background: var(--allwr-gold);
    color: var(--allwr-navy);
    font: 600 0.95rem 'Inter', system-ui, sans-serif;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    transition: background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-scanner__primary:hover { background: color-mix(in srgb, var(--allwr-gold) 90%, #000); }
.allwr-scanner__ghost {
    appearance: none; cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.45);
    color: #fff;
    font: 500 0.9rem 'Inter', system-ui, sans-serif;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out), background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-scanner__ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.allwr-scanner__primary:focus-visible,
.allwr-scanner__ghost:focus-visible,
.allwr-scanner__shutter:focus-visible,
.allwr-scanner__cancel:focus-visible {
    outline: 3px solid var(--allwr-gold-soft, rgba(222,173,57,0.55));
    outline-offset: 2px;
}
.allwr-scanner__bw {
    display: inline-flex; align-items: center; gap: 0.45rem;
    color: #fff;
    font: 500 0.9rem 'Inter', system-ui, sans-serif;
    cursor: pointer;
}
.allwr-scanner__bw input { accent-color: var(--allwr-gold); }
@media (prefers-reduced-motion: reduce) {
    .allwr-scanner__progress-bar::after { animation-duration: 0.01ms; animation-iteration-count: 1; left: 0; width: 100%; }
}

/* ============================================================================
   APP SHELL — header sticky + footer minimal (sólo .allwr-shell--app)
   ============================================================================ */
.allwr-shell--app { background: var(--allwr-off-white, #F8F7F4); }

.allwr-app-bar {
    position: sticky; top: 0; z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--allwr-line, #E6E2D8);
    box-shadow: 0 1px 0 rgba(2,21,43,0.02);
    padding: 0.5rem 1rem;
    padding-top: calc(0.5rem + env(safe-area-inset-top));
}
.allwr-app-bar__inner {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 1rem;
    max-width: 1400px; margin: 0 auto;
}
.allwr-app-bar__brand {
    display: inline-flex; align-items: center; gap: 0.5rem;
    text-decoration: none; color: var(--allwr-navy);
    font: 700 1.0rem 'Satoshi', system-ui, sans-serif;
}
.allwr-app-bar__brand img { width: 28px; height: 28px; }
.allwr-app-bar__brand-text { display: none; }
@media (min-width: 768px) {
    .allwr-app-bar__brand-text { display: inline; }
}

.allwr-app-bar__nav {
    display: none; gap: 0.1rem;
}
@media (min-width: 880px) {
    .allwr-app-bar__nav { display: inline-flex; }
}
.allwr-app-bar__tab {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--allwr-muted, #4a5b6a);
    font: 500 0.88rem 'Inter', system-ui, sans-serif;
    transition: background-color var(--allwr-transition-fast, 150ms ease-out),
                color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app-bar__tab:hover  { color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-gold) 6%, transparent); }
.allwr-app-bar__tab.is-active {
    color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-gold) 18%, transparent);
}
.allwr-app-bar__tab-icon { font-size: 1.0rem; line-height: 1; }
.allwr-app-bar__tab-label { display: none; }
@media (min-width: 1020px) {
    .allwr-app-bar__tab-label { display: inline; }
}

.allwr-app-bar__search {
    display: none; position: relative; max-width: 320px; justify-self: end;
}
@media (min-width: 1100px) {
    .allwr-app-bar__search { display: flex; align-items: center; }
}
.allwr-app-bar__search-icon {
    position: absolute; left: 0.6rem; pointer-events: none; opacity: 0.55;
}
.allwr-app-bar__search-input {
    width: 100%;
    padding: 0.45rem 0.75rem 0.45rem 1.8rem;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-off-white, #F8F7F4) 60%, #fff);
    color: var(--allwr-navy);
    font: 400 0.88rem 'Inter', system-ui, sans-serif;
}
.allwr-app-bar__search-input:disabled { cursor: not-allowed; }

.allwr-app-bar__right {
    display: inline-flex; align-items: center; gap: 0.5rem;
}

/* Selector de idioma: dropdown discreto con globo */
.allwr-app-bar__locale {
    position: relative;
}
.allwr-app-bar__locale > summary {
    list-style: none; cursor: pointer;
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    color: var(--allwr-muted, #4a5b6a);
    transition: background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-app-bar__locale > summary::-webkit-details-marker { display: none; }
.allwr-app-bar__locale[open] > summary,
.allwr-app-bar__locale:hover > summary { background: color-mix(in srgb, var(--allwr-gold) 10%, transparent); color: var(--allwr-navy); }
.allwr-app-bar__locale-menu {
    position: absolute; right: 0; top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    padding: 0.5rem;
    box-shadow: 0 24px 60px rgba(2,21,43,0.14);
    min-width: 240px; max-height: 60vh; overflow: auto;
    z-index: 60;
}

/* Menú de usuario */
.allwr-app-bar__user { position: relative; }
.allwr-app-bar__user > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    color: var(--allwr-navy);
    font: 500 0.88rem 'Inter', system-ui, sans-serif;
}
.allwr-app-bar__user > summary::-webkit-details-marker { display: none; }
.allwr-app-bar__user[open] > summary,
.allwr-app-bar__user:hover > summary { background: color-mix(in srgb, var(--allwr-gold) 10%, transparent); }
.allwr-app-bar__avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 999px;
    background: var(--allwr-navy); color: #fff;
    font: 700 0.78rem 'Satoshi', system-ui, sans-serif;
}
.allwr-app-bar__user-name { display: none; }
@media (min-width: 700px) {
    .allwr-app-bar__user-name { display: inline; max-width: 8rem; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
}
.allwr-app-bar__user-menu {
    position: absolute; right: 0; top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 24px 60px rgba(2,21,43,0.14);
    min-width: 200px; z-index: 60;
    display: grid; gap: 0.1rem;
}
.allwr-app-bar__user-menu a,
.allwr-app-bar__user-menu-btn {
    display: block; padding: 0.5rem 0.7rem;
    color: var(--allwr-navy); text-decoration: none;
    border-radius: 10px;
    background: transparent; border: 0;
    font: 500 0.88rem 'Inter', system-ui, sans-serif;
    text-align: left; cursor: pointer; width: 100%;
}
.allwr-app-bar__user-menu a:hover,
.allwr-app-bar__user-menu-btn:hover {
    background: color-mix(in srgb, var(--allwr-gold) 10%, transparent);
}
.allwr-app-bar__login {
    color: var(--allwr-navy); text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--allwr-line, #E6E2D8);
}

/* Footer mínimo */
.allwr-app-foot {
    border-top: 1px solid var(--allwr-line, #E6E2D8);
    padding: 0.7rem 1rem;
    padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
    background: #fff;
    margin-top: 2rem;
    font: 500 0.78rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-muted, #4a5b6a);
}
.allwr-app-foot__inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.6rem;
}
.allwr-app-foot__links { display: inline-flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; }
.allwr-app-foot__links a { color: inherit; text-decoration: none; }
.allwr-app-foot__links a:hover { color: var(--allwr-navy); }
.allwr-app-foot__status { display: inline-flex; align-items: center; gap: 0.35rem; }
.allwr-app-foot__status-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 999px;
    background: #2f7d3a; box-shadow: 0 0 0 3px color-mix(in srgb, #2f7d3a 25%, transparent);
}
.allwr-app-foot__build { font-variant-numeric: tabular-nums; }

/* ============================================================================
   ADJUNTOS PREMIUM — grid de cards con miniaturas, acciones, lightbox
   ============================================================================ */
.allwr-attach__head { margin-bottom: 0.5rem; }
.allwr-attach__actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; margin: 0.6rem 0;
}
.allwr-attach__count { font-size: 0.78rem; white-space: nowrap; }

.allwr-attach__grid {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.7rem;
}
.allwr-attach__item {
    display: grid; gap: 0.4rem;
    padding: 0.55rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(2,21,43,0.02);
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                box-shadow var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-attach__item:hover {
    border-color: var(--allwr-navy);
    box-shadow: 0 8px 20px rgba(2,21,43,0.08);
}
.allwr-attach__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    width: 100%;
    background: color-mix(in srgb, var(--allwr-off-white, #F8F7F4) 80%, #fff);
    border: 0; border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.allwr-attach__thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.allwr-attach__thumb-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; opacity: 1;
}
.allwr-attach__thumb img + .allwr-attach__thumb-fallback { opacity: 0; }
.allwr-attach__thumb.is-fallback img { display: none; }
.allwr-attach__thumb.is-fallback .allwr-attach__thumb-fallback { opacity: 1; }

.allwr-attach__meta { display: grid; gap: 0.1rem; }
.allwr-attach__name {
    color: var(--allwr-navy); font-weight: 600; font-size: 0.85rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.allwr-attach__sub { font-size: 0.78rem; color: var(--allwr-muted, #4a5b6a); display: flex; gap: 0.4rem; }
.allwr-attach__kind {
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
    color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-gold) 18%, transparent);
    padding: 0 0.45rem; border-radius: 999px; font-size: 0.65rem;
    align-self: flex-start;
}
.allwr-attach__actions-row { display: flex; gap: 0.35rem; justify-content: flex-end; }

/* Variante compacta (ficha de movimiento): una fila por adjunto — miniatura,
   nombre + peso y acciones. La tarjeta grande sólo tiene sentido en galerías. */
.allwr-attach .allwr-attach__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 0;
}
.allwr-attach__grid--compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    margin-top: 0.7rem;
}
.allwr-attach__grid--compact .allwr-attach__item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 12px;
}
.allwr-attach__grid--compact .allwr-attach__thumb {
    aspect-ratio: 1;
    width: 34px;
    height: 34px;
    border-radius: 8px;
}
.allwr-attach__grid--compact .allwr-attach__thumb-fallback { font-size: 1.05rem; }
.allwr-attach__grid--compact .allwr-attach__sub { font-size: 0.72rem; }
.allwr-attach__grid--compact .allwr-attach__action { width: 26px; height: 26px; border-radius: 8px; }
.allwr-attach__ai { margin: 0.85rem 0 0; }
/* Acento dorado contenido: comunica "inteligente" sin competir con Guardar. */
.allwr-txn__ai-btn {
    border-color: color-mix(in srgb, var(--allwr-gold) 55%, var(--allwr-line));
    background: color-mix(in srgb, var(--allwr-gold) 8%, #fff);
    color: var(--allwr-navy);
    font-weight: 600;
}
.allwr-txn__ai-btn:hover {
    background: color-mix(in srgb, var(--allwr-gold) 16%, #fff);
    border-color: var(--allwr-gold);
}
.allwr-attach__action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 10px;
    background: transparent;
    color: var(--allwr-muted, #4a5b6a);
    border: 1px solid var(--allwr-line, #E6E2D8);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--allwr-transition-fast, 150ms ease-out),
                color var(--allwr-transition-fast, 150ms ease-out),
                border-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-attach__action:hover { color: var(--allwr-navy); border-color: var(--allwr-navy); }
.allwr-attach__action--danger:hover { color: #B23A48; border-color: #B23A48; }

/* Lightbox */
.allwr-lightbox {
    position: fixed; inset: 0;
    background: rgba(2,21,43,0.85);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
}
.allwr-lightbox[hidden] { display: none; }
.allwr-lightbox__close {
    position: absolute; top: 1rem; right: 1rem;
    width: 40px; height: 40px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1); border: 0;
    color: #fff; font: 700 1.1rem 'Satoshi', system-ui, sans-serif;
    cursor: pointer;
    backdrop-filter: blur(6px);
}
.allwr-lightbox__close:hover { background: rgba(255,255,255,0.2); }
.allwr-lightbox__content {
    max-width: 90vw; max-height: 90vh;
    display: flex; align-items: center; justify-content: center;
}
.allwr-lightbox__img {
    max-width: 90vw; max-height: 90vh; object-fit: contain;
    border-radius: 12px; background: #fff;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.allwr-lightbox__pdf {
    width: min(90vw, 900px); height: 90vh;
    border: 0; border-radius: 12px; background: #fff;
}

/* Producto card: logo del banco en esquina superior derecha */
.allwr-app__product { position: relative; }
.allwr-app__product-bank {
    /* Logos SVG ya recortados desde Wealthreader → sin recuadro ni fondo.
       22px × 1.35 ≈ 30px. */
    position: absolute; top: 0.55rem; right: 0.55rem;
    width: 30px; height: 30px;
    object-fit: contain;
    background: transparent;
    border: 0;
}
.allwr-app__product-bank--placeholder {
    /* El placeholder mantiene un fondo suave sólo cuando NO hay logo,
       para que la inicial sea legible. Sin border. */
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    font: 700 0.85rem 'Satoshi', system-ui, sans-serif;
    color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-gold) 14%, transparent);
}

/* ============================================================================
   Modal de confirmación (sin alert/confirm nativos)
   ============================================================================ */
.allwr-confirm {
    position: fixed; inset: 0;
    background: rgba(2,21,43,0.55);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem;
}
.allwr-confirm[hidden] { display: none; }
.allwr-confirm__card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2,21,43,0.30);
    padding: 1.5rem 1.5rem 1.2rem;
    max-width: 460px; width: 100%;
    color: var(--allwr-navy);
    transform: translateY(8px) scale(0.985);
    opacity: 0;
    animation: allwr-confirm-in 200ms ease-out forwards;
}
@keyframes allwr-confirm-in {
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.allwr-confirm__title {
    margin: 0 0 0.5rem;
    font: 700 1.15rem 'Satoshi', system-ui, sans-serif;
}
.allwr-confirm__body { margin: 0 0 0.5rem; font-size: 0.95rem; }
.allwr-confirm__note { margin: 0 0 1rem; font-size: 0.85rem; }
.allwr-confirm__note[hidden] { display: none; }
.allwr-confirm__input {
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    font: inherit;
    color: inherit;
    background: transparent;
}
.allwr-confirm__input[hidden] { display: none; }
.allwr-confirm__input:focus-visible { outline: 3px solid var(--allwr-gold-soft); outline-offset: -2px; }
.allwr-confirm__actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
.allwr-confirm__actions [hidden] { display: none !important; }

/* Botón danger reutilizable (lo usa el modal y el botón Eliminar banco) */
.allwr-app__btn--danger {
    color: #B23A48;
    border-color: color-mix(in srgb, #B23A48 28%, var(--allwr-line, #E6E2D8));
    background: #fff;
}
.allwr-app__btn--danger:hover {
    color: #fff;
    background: #B23A48;
    border-color: #B23A48;
    box-shadow: 0 8px 22px rgba(178,58,72,0.20);
}
.allwr-app__btn--danger:focus-visible {
    outline: 3px solid color-mix(in srgb, #B23A48 35%, transparent);
    outline-offset: 2px;
}

/* ── 404 error card (app-shell context) ────────────────────────────── */
.allwr-app__error-card {
    max-width: 440px;
    margin: 4rem auto;
    padding: 3rem 2rem;
    text-align: center;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2,21,43,0.06);
}
.allwr-app__error-card .allwr-app__eyebrow { font-size: 3rem; font-weight: 900; letter-spacing: 0.08em; color: var(--allwr-gold, #DEAD39); }
.allwr-app__error-card .allwr-app__h1 { font-size: 1.25rem; margin: 0.5rem 0 0.8rem; }
.allwr-app__error-card .allwr-app__muted { margin-bottom: 1.5rem; }

/* ── Product detail page (/p/<uuid>) ───────────────────────────────── */
.allwr-app__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--allwr-muted, #4a5b6a);
    margin-bottom: 1.2rem;
}
.allwr-app__breadcrumb a { color: var(--allwr-navy, #02152B); text-decoration: none; }
.allwr-app__breadcrumb a:hover { text-decoration: underline; }
.allwr-app__breadcrumb [aria-current] { font-weight: 600; color: var(--allwr-navy, #02152B); }

.allwr-product__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.allwr-product__head-left {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}
.allwr-product__bank-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
}
.allwr-product__bank-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--allwr-navy, #02152B);
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    border-radius: 12px;
}
.allwr-product__head-text { min-width: 0; }
.allwr-product__head-text .allwr-app__h1 { margin: 0.3rem 0 0; }
.allwr-product__value {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--allwr-navy, #02152B);
    white-space: nowrap;
}
.allwr-product__value--debt { color: #B23A48; }
.allwr-product__value--gain { color: var(--allwr-green, #1F7A4D); }

.allwr-product__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}
.allwr-product__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.allwr-product__detail { margin-bottom: 1.5rem; }
.allwr-product__dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
    padding: 1rem 1.2rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
}
.allwr-product__dl dt { color: var(--allwr-muted, #4a5b6a); font-size: 0.85rem; font-weight: 500; white-space: nowrap; }
.allwr-product__dl dd { margin: 0; color: var(--allwr-navy, #02152B); font-weight: 500; }
.allwr-product__dl--tech { font-size: 0.82rem; }

.allwr-product__section {
    margin-bottom: 1.5rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
    padding: 1rem 1.2rem;
}
.allwr-product__section .allwr-app__h2 { margin-top: 0; }

.allwr-product__tech {
    margin-top: 1rem;
    margin-bottom: 2rem;
}
.allwr-product__tech summary {
    cursor: pointer;
    color: var(--allwr-muted, #4a5b6a);
    font-size: 0.85rem;
}
.allwr-product__tech .allwr-product__dl {
    margin-top: 0.8rem;
    background: var(--allwr-off-white, #F8F7F4);
}

/* ── Legal / Help pages ────────────────────────────────────────────── */
.allwr-container--narrow { max-width: 680px; }
.allwr-legal { padding: 2rem 0 4rem; }
.allwr-legal__h1 { font-family: 'Satoshi', sans-serif; font-weight: 900; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--allwr-navy, #02152B); margin: 0 0 0.5rem; }
.allwr-legal__date { font-size: 0.82rem; color: var(--allwr-muted, #4a5b6a); margin-bottom: 1rem; }
.allwr-legal__intro { font-size: 1.05rem; color: var(--allwr-navy, #02152B); line-height: 1.7; margin-bottom: 2rem; }
.allwr-legal__section { margin-bottom: 2rem; }
.allwr-legal__section h2 { font-size: 1.1rem; font-weight: 700; color: var(--allwr-navy, #02152B); margin: 0 0 0.5rem; }
.allwr-legal__section p { line-height: 1.7; color: #333; }
.allwr-legal__section a { color: var(--allwr-gold, #DEAD39); text-decoration: underline; }
.allwr-legal__faq { margin: 0; }
.allwr-legal__faq dt { font-weight: 600; color: var(--allwr-navy, #02152B); margin-top: 1.2rem; }
.allwr-legal__faq dd { margin: 0.3rem 0 0; color: #333; line-height: 1.7; }
.allwr-container--docs { max-width: 820px; }
.allwr-legal__section pre {
    margin: 0.75rem 0 0;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    background: var(--allwr-off-white, #F8F7F4);
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 12px;
}
.allwr-legal__section pre code,
.allwr-legal__table code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    color: var(--allwr-navy, #02152B);
}
.allwr-legal__table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 0.75rem; }
.allwr-legal__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.allwr-legal__table th,
.allwr-legal__table td {
    text-align: left;
    vertical-align: top;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--allwr-line, #E6E2D8);
}
.allwr-legal__table th {
    color: var(--allwr-muted, #4a5b6a);
    font-weight: 600;
}
.allwr-legal__table td { color: var(--allwr-navy, #02152B); }

/* ── Amortization schedule ─────────────────────────────────────────── */
.allwr-product__amort-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.allwr-product__amort--past { opacity: 0.55; }
.allwr-product__pdf-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.allwr-product__pdf-frame {
    display: block;
    width: 100%;
    min-height: min(72vh, 760px);
    margin-bottom: 0.85rem;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 12px;
    background: var(--allwr-off-white, #F8F7F4);
}

/* ── Investment sheets (/p/<uuid> · loan-given, startup-equity) ────── */
/* Las clases de la ficha declaran display: flex/grid/block, que gana al
   [hidden] del navegador (mismo caso que .allwr-docs-modal__field): sin esta
   regla los modos ver y editar se pintarían a la vez. */
.allwr-invest [hidden] { display: none; }

.allwr-invest__hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.allwr-invest__logo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}
.allwr-invest__logo {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--allwr-line, #E5E0D6);
    border-radius: 18px;
    background: #fff;
}
.allwr-invest__logo img { width: 96px; height: 96px; object-fit: contain; border-radius: 12px; }
.allwr-invest__logo > svg { width: 44px; height: 44px; color: var(--allwr-navy, #02152B); opacity: 0.55; }
/* Startup rocket placeholder: gold tint softened towards the mockup's tan. */
.allwr-invest__logo svg.allwr-invest__logo-rocket { width: 76px; height: 66px; color: var(--allwr-gold, #DEAD39); opacity: 0.75; }
.allwr-invest__logo-btn {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    background: var(--allwr-navy, #02152B);
    color: #fff;
    cursor: pointer;
    transition: box-shadow var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-invest__logo-btn:hover { box-shadow: var(--allwr-shadow, 0 24px 60px rgba(2, 21, 43, 0.10)); }
.allwr-invest__logo-btn svg { width: 15px; height: 15px; }
.allwr-invest__logo-hint { margin: 0; font-size: 0.75rem; color: var(--allwr-muted, #5C6473); }

.allwr-invest__hero-main {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}
.allwr-invest__title { margin: 0; }
.allwr-invest__title-input {
    width: min(100%, 420px);
    font-weight: 700;
}
.allwr-invest__meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0; }
.allwr-invest__hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    margin-left: auto;
}
.allwr-invest__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: var(--allwr-off-white, #F8F7F4);
    border: 1px solid var(--allwr-line, #E5E0D6);
    color: var(--allwr-navy, #02152B);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.allwr-invest__status svg { width: 15px; height: 15px; color: var(--allwr-green, #1F7A4D); }

.allwr-invest__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}
.allwr-invest__actions .allwr-app__btn svg { width: 15px; height: 15px; }
.allwr-invest__error { margin: -0.75rem 0 1.25rem; color: var(--allwr-loss, #B23A48); font-size: 0.85rem; }
.allwr-invest__error-dismiss {
    margin-left: 0.4rem;
    padding: 0 0.35rem;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.allwr-invest__kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    background: #fff;
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: 18px;
    padding: 0.9rem 0;
    margin-bottom: 1.5rem;
}
.allwr-invest__kpi {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 1.2rem;
    min-width: 0;
}
.allwr-invest__kpi + .allwr-invest__kpi { border-left: 1px solid var(--allwr-line, #E5E0D6); }
.allwr-invest__kpi-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--allwr-off-white, #F8F7F4);
    color: var(--allwr-navy, #02152B);
}
.allwr-invest__kpi-icon svg { width: 18px; height: 18px; }
.allwr-invest__kpi-copy { display: flex; flex-direction: column; min-width: 0; }
.allwr-invest__kpi-label {
    font-size: 0.72rem;
    color: var(--allwr-muted, #5C6473);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.allwr-invest__kpi-value { font-weight: 700; color: var(--allwr-navy, #02152B); font-size: 0.98rem; white-space: nowrap; }
.allwr-invest__kpi-value--gain { color: var(--allwr-green, #1F7A4D); }
.allwr-invest__kpi-value--loss { color: var(--allwr-loss, #B23A48); }

.allwr-invest__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.5rem;
}
@media (min-width: 900px) {
    .allwr-invest__grid { grid-template-columns: 1fr 1.35fr; }
}
.allwr-invest__card {
    background: #fff;
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
}
.allwr-invest__card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.9rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--allwr-navy, #02152B);
}
.allwr-invest__card-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--allwr-off-white, #F8F7F4);
    color: var(--allwr-navy, #02152B);
}
.allwr-invest__card-icon svg { width: 15px; height: 15px; }
.allwr-invest__chip {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--allwr-navy, #02152B);
    background: var(--allwr-off-white, #F8F7F4);
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    white-space: nowrap;
}
.allwr-invest__chip svg { width: 13px; height: 13px; }

.allwr-invest__rows { margin: 0; }
.allwr-invest__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--allwr-off-white, #F8F7F4);
}
.allwr-invest__row:last-child { border-bottom: 0; }
.allwr-invest__row dt { font-size: 0.85rem; color: var(--allwr-muted, #5C6473); }
.allwr-invest__row dd {
    margin: 0;
    font-weight: 600;
    color: var(--allwr-navy, #02152B);
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
}
.allwr-invest__row input,
.allwr-invest__row select,
.allwr-invest__title-input {
    font: inherit;
    color: var(--allwr-navy, #02152B);
    background: #fff;
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    max-width: 100%;
}
.allwr-invest__row input:focus-visible,
.allwr-invest__row select:focus-visible,
.allwr-invest__title-input:focus-visible {
    outline: 3px solid var(--allwr-gold-soft, rgba(222, 173, 57, 0.35));
    outline-offset: 2px;
}
.allwr-invest__check { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.allwr-invest__yes { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--allwr-green, #1F7A4D); }
.allwr-invest__yes svg { width: 15px; height: 15px; }
.allwr-invest__with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.allwr-invest__row-icon { width: 15px; height: 15px; color: var(--allwr-muted, #5C6473); flex-shrink: 0; }
.allwr-invest__iban { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.allwr-invest__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: none;
    color: var(--allwr-muted, #5C6473);
    cursor: pointer;
    transition: color var(--allwr-transition-fast, 150ms ease-out),
                border-color var(--allwr-transition-fast, 150ms ease-out),
                background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-invest__copy:hover {
    color: var(--allwr-navy, #02152B);
    border-color: var(--allwr-line, #E5E0D6);
    background: var(--allwr-off-white, #F8F7F4);
}
.allwr-invest__copy.is-copied { color: var(--allwr-green, #1F7A4D); }
.allwr-invest__copy svg { width: 14px; height: 14px; }

.allwr-invest__schedule { margin-bottom: 1.5rem; }
.allwr-invest__table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.allwr-invest__txchip {
    display: inline-flex;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--allwr-line, #E5E0D6);
    color: var(--allwr-navy, #02152B);
    background: var(--allwr-off-white, #F8F7F4);
    white-space: nowrap;
}
.allwr-invest__txchip[data-txstatus="settled"] {
    color: var(--allwr-green, #1F7A4D);
    background: rgba(31, 122, 77, 0.08);
    border-color: rgba(31, 122, 77, 0.25);
}
.allwr-invest__txchip[data-txstatus="expected"],
.allwr-invest__txchip[data-txstatus="overdue"] {
    color: var(--allwr-loss, #B23A48);
    background: color-mix(in srgb, var(--allwr-loss, #B23A48) 8%, transparent);
    border-color: color-mix(in srgb, var(--allwr-loss, #B23A48) 25%, transparent);
}
.allwr-invest__more {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.8rem auto 0;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: none;
    color: var(--allwr-navy, #02152B);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-invest__more:hover {
    border-color: var(--allwr-line, #E5E0D6);
    background: var(--allwr-off-white, #F8F7F4);
}
.allwr-invest__more-chevron { width: 16px; height: 16px; transition: transform var(--allwr-transition-base, 200ms ease-out); }
.allwr-invest__more[aria-expanded="true"] .allwr-invest__more-chevron { transform: rotate(180deg); }

@media (prefers-reduced-motion: reduce) {
    .allwr-invest__logo-btn,
    .allwr-invest__copy,
    .allwr-invest__more,
    .allwr-invest__more-chevron {
        transition-duration: 0.01ms;
    }
    /* State change still shows its final position, without animating. */
    .allwr-invest__more[aria-expanded="true"] .allwr-invest__more-chevron { transform: rotate(180deg); }
}

/* ── Funds sheet: allocation donut, dropzone & weight bars ─────────── */
.allwr-invest__logo--static { border-style: solid; cursor: default; }
/* Summary alone (no factsheet card for this subtype) takes the whole row. */
.allwr-invest__card--span { grid-column: 1 / -1; }

/* Category → token mapping shared by donut segments and legend dots. */
.allwr-invest__donut [data-cat], .allwr-invest__legend-dot { stroke: var(--allwr-chart-none, #6E675E); }
.allwr-invest__legend-dot { background: var(--allwr-chart-none, #6E675E); }
.allwr-invest__donut [data-cat="equity_developed"] { stroke: var(--allwr-chart-1, #1D5385); }
.allwr-invest__legend-dot[data-cat="equity_developed"] { background: var(--allwr-chart-1, #1D5385); }
.allwr-invest__donut [data-cat="equity_emerging"] { stroke: var(--allwr-chart-2, #C89B2A); }
.allwr-invest__legend-dot[data-cat="equity_emerging"] { background: var(--allwr-chart-2, #C89B2A); }
.allwr-invest__donut [data-cat="fixed_income_government"] { stroke: var(--allwr-chart-3, #7A4A1A); }
.allwr-invest__legend-dot[data-cat="fixed_income_government"] { background: var(--allwr-chart-3, #7A4A1A); }
.allwr-invest__donut [data-cat="fixed_income_corporate"] { stroke: var(--allwr-chart-4, #D9AC61); }
.allwr-invest__legend-dot[data-cat="fixed_income_corporate"] { background: var(--allwr-chart-4, #D9AC61); }
.allwr-invest__donut [data-cat="fixed_income_inflation_linked"] { stroke: var(--allwr-chart-5, #566B84); }
.allwr-invest__legend-dot[data-cat="fixed_income_inflation_linked"] { background: var(--allwr-chart-5, #566B84); }
.allwr-invest__donut [data-cat="cash"] { stroke: var(--allwr-chart-6, #C0A863); }
.allwr-invest__legend-dot[data-cat="cash"] { background: var(--allwr-chart-6, #C0A863); }
.allwr-invest__donut [data-cat="mixed"] { stroke: var(--allwr-chart-7, #5D7150); }
.allwr-invest__legend-dot[data-cat="mixed"] { background: var(--allwr-chart-7, #5D7150); }
.allwr-invest__donut [data-cat="other"] { stroke: var(--allwr-chart-8, #BFA089); }
.allwr-invest__legend-dot[data-cat="other"] { background: var(--allwr-chart-8, #BFA089); }
.allwr-invest__donut [data-cat="unclassified"] { stroke: var(--allwr-chart-none, #6E675E); }
.allwr-invest__legend-dot[data-cat="unclassified"] { background: var(--allwr-chart-none, #6E675E); }

.allwr-invest__alloc-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.allwr-invest__donut { flex: 0 0 auto; }
.allwr-invest__donut--skeleton { color: var(--allwr-line, #E5E0D6); }

.allwr-invest__dropzone {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 130px;
    padding: 1.1rem 1.2rem;
    border: 2px dashed var(--allwr-line-strong, #C9C2B5);
    border-radius: var(--allwr-radius-sm, 12px);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-invest__dropzone:hover,
.allwr-invest__dropzone.is-drag {
    border-color: var(--allwr-gold-deep, #B58A23);
    background: var(--allwr-off-white, #F8F7F4);
}
.allwr-invest__dropzone:focus-visible {
    outline: 3px solid var(--allwr-gold-soft, #F1CD7A);
    outline-offset: 2px;
}
.allwr-invest__dropzone svg { width: 28px; height: 28px; color: var(--allwr-gold-deep, #B58A23); }
.allwr-invest__dropzone-cta {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: var(--allwr-navy, #02152B);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}
.allwr-invest__dropzone-help { font-size: 0.8rem; color: var(--allwr-muted, #5C6473); }

/* ---- Credit sheet (bank loans): progress donut + amortization sparkline ---- */
/* Screen-reader-only text (labels that name a value the eye reads by layout). */
.allwr-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.allwr-invest__loan-ref {
    margin: 0.1rem 0 0.15rem;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--allwr-muted, #5C6473);
    word-break: break-all;
}
.allwr-invest__meta--right { margin-left: auto; align-self: center; }

.allwr-invest__credit-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.allwr-invest__donut-wrap { position: relative; flex: 0 0 auto; }
.allwr-invest__donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}
.allwr-invest__donut-center strong { font-size: 1.25rem; color: var(--allwr-navy, #02152B); }
.allwr-invest__donut-center span { font-size: 0.75rem; color: var(--allwr-muted, #5C6473); }

.allwr-invest__credit-legend { flex: 1 1 220px; display: flex; flex-direction: column; margin: 0; }
.allwr-invest__credit-legend .allwr-invest__row dt { display: inline-flex; align-items: center; gap: 0.45rem; }
.allwr-invest__credit-progress dd { font-weight: 600; }

.allwr-invest__donut [data-credit-seg="amortized"] { stroke: var(--allwr-green, #1F7A4D); }
.allwr-invest__legend-dot[data-credit-seg="amortized"] { background: var(--allwr-green, #1F7A4D); }
.allwr-invest__donut [data-credit-seg="pending"] { stroke: var(--allwr-chart-none, #6E675E); }
.allwr-invest__legend-dot[data-credit-seg="pending"] { background: var(--allwr-chart-none, #6E675E); }

.allwr-invest__calc-note {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.9rem 0 0;
    font-size: 0.78rem;
    color: var(--allwr-muted, #5C6473);
}
.allwr-invest__calc-note svg { width: 14px; height: 14px; flex: 0 0 auto; }

.allwr-invest__card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.allwr-invest__card-hint { margin: -0.35rem 0 0.9rem; font-size: 0.82rem; }

/* ---- Documentos de producto (app-product-documents.php) ------------------ */
.allwr-product-docs { margin-top: var(--allwr-space-5, 1.5rem); }
.allwr-product-docs__form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--allwr-off-white, #F8F7F4);
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: 14px;
}
.allwr-product-docs__field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.allwr-product-docs__field--wide { grid-column: 1 / -1; }
.allwr-product-docs__field > span { font-size: 0.8rem; color: var(--allwr-muted, #5C6473); }
.allwr-product-docs__field input,
.allwr-product-docs__field select {
    font: inherit;
    color: var(--allwr-navy, #02152B);
    background: #fff;
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    max-width: 100%;
}
.allwr-product-docs__field input:focus-visible,
.allwr-product-docs__field select:focus-visible {
    outline: 3px solid var(--allwr-gold-soft, rgba(222, 173, 57, 0.35));
    outline-offset: 2px;
}
.allwr-product-docs__form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.allwr-product-docs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.allwr-product-docs__item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: 14px;
    background: #fff;
    transition: box-shadow var(--allwr-transition-base, 200ms ease-out),
                border-color var(--allwr-transition-base, 200ms ease-out);
}
.allwr-product-docs__item:hover {
    box-shadow: var(--allwr-shadow-hover, 0 18px 40px rgba(2, 21, 43, 0.12));
    border-color: var(--allwr-gold-soft, rgba(222, 173, 57, 0.35));
}
.allwr-product-docs__thumb {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--allwr-off-white, #F8F7F4);
    color: var(--allwr-muted, #5C6473);
}
/* La miniatura, si existe, tapa el icono de tipo que queda debajo. */
.allwr-product-docs__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.allwr-product-docs__thumb svg { width: 20px; height: 20px; }
.allwr-product-docs__body { flex: 1; min-width: 0; }
.allwr-product-docs__name {
    font-weight: 600;
    color: var(--allwr-navy, #02152B);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.allwr-product-docs__name:hover { text-decoration: underline; }
.allwr-product-docs__meta { margin: 0.15rem 0 0; font-size: 0.8rem; }
.allwr-product-docs__notes { margin: 0.25rem 0 0; font-size: 0.82rem; color: var(--allwr-muted, #5C6473); }
.allwr-product-docs__actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.allwr-product-docs__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--allwr-line, #E5E0D6);
    background: #fff;
    color: var(--allwr-muted, #5C6473);
    cursor: pointer;
    transition: color var(--allwr-transition-fast, 150ms ease-out),
                border-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-product-docs__icon-btn:hover { color: var(--allwr-navy, #02152B); border-color: var(--allwr-navy, #02152B); }
.allwr-product-docs__icon-btn:focus-visible {
    outline: 3px solid var(--allwr-gold-soft, rgba(222, 173, 57, 0.35));
    outline-offset: 2px;
}
.allwr-product-docs__icon-btn svg { width: 16px; height: 16px; }
@media (max-width: 560px) {
    .allwr-product-docs__item { flex-wrap: wrap; }
    .allwr-product-docs__actions { margin-left: auto; }
}

.allwr-invest__spark { flex: 0 0 auto; }
.allwr-invest__spark-legend {
    display: flex;
    justify-content: flex-end;
    gap: 0.9rem;
    font-size: 0.75rem;
    color: var(--allwr-muted, #5C6473);
    margin-bottom: 0.2rem;
}
.allwr-invest__spark-legend > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.allwr-invest__spark-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--allwr-muted, #5C6473);
}
.allwr-invest__spark polyline[data-credit-line="interest"] { stroke: var(--allwr-chart-4, #D9AC61); }
.allwr-invest__legend-dot[data-credit-line="interest"] { background: var(--allwr-chart-4, #D9AC61); }
.allwr-invest__spark polyline[data-credit-line="principal"] { stroke: var(--allwr-green, #1F7A4D); }
.allwr-invest__legend-dot[data-credit-line="principal"] { background: var(--allwr-green, #1F7A4D); }

/* ---- Deposit sheet: term-tracking ring + flows timeline ---- */
.allwr-invest__donut [data-deposit-seg="elapsed"] { stroke: var(--allwr-green, #1F7A4D); }
.allwr-invest__donut [data-deposit-seg="remaining"] { stroke: var(--allwr-chart-none, #6E675E); }
.allwr-invest__row--secondary dt, .allwr-invest__row--secondary dd { font-size: 0.8rem; }
.allwr-invest__iban { letter-spacing: 0.03em; word-break: break-all; }

.allwr-invest__timeline { flex: 0 0 auto; min-width: 220px; }
.allwr-invest__timeline-track { display: flex; align-items: center; gap: 0; }
.allwr-invest__timeline-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--allwr-gold-deep, #B58A23);
    flex: 0 0 auto;
}
.allwr-invest__timeline-dot--end { background: var(--allwr-chart-none, #6E675E); }
.allwr-invest__timeline-line { flex: 1 1 auto; height: 2px; background: var(--allwr-line-strong, #C9C2B5); }
.allwr-invest__timeline-labels {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--allwr-navy, #02152B);
    text-align: center;
}
.allwr-invest__timeline-labels em { font-style: normal; color: var(--allwr-muted, #5C6473); }

.allwr-invest__alloc-note {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.9rem 0 0;
    font-size: 0.8rem;
    color: var(--allwr-muted, #5C6473);
}
.allwr-invest__alloc-note svg { width: 15px; height: 15px; flex: 0 0 auto; }

.allwr-invest__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.allwr-invest__legend li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.87rem; }
.allwr-invest__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.allwr-invest__legend-label { color: var(--allwr-text-strong, #2A3245); }
.allwr-invest__legend-value { margin-left: auto; font-weight: 600; color: var(--allwr-navy, #02152B); font-variant-numeric: tabular-nums; }

.allwr-invest__alloc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.9rem;
    font-size: 0.8rem;
}

.allwr-invest__alloc-busy { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.allwr-invest__alloc-busy p { margin: 0; }
.allwr-invest__spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid var(--allwr-line, #E5E0D6);
    border-top-color: var(--allwr-gold-deep, #B58A23);
    animation: allwr-invest-spin 0.9s linear infinite;
}
@keyframes allwr-invest-spin { to { transform: rotate(360deg); } }

.allwr-invest__alloc-selection { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.allwr-invest__alloc-candidates { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; }
.allwr-invest__alloc-candidates button {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--allwr-line, #E5E0D6);
    border-radius: var(--allwr-radius-sm, 12px);
    background: #fff;
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out),
                background-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-invest__alloc-candidates button:hover {
    border-color: var(--allwr-gold-deep, #B58A23);
    background: var(--allwr-off-white, #F8F7F4);
}
.allwr-invest__alloc-error p { margin: 0 0 0.5rem; color: var(--allwr-loss, #B23A48); font-size: 0.87rem; }

.allwr-invest__weight-num { display: inline-block; min-width: 3.6em; }
.allwr-invest__weight-bar {
    display: inline-block;
    vertical-align: middle;
    width: 72px;
    height: 6px;
    margin-left: 0.5rem;
    border-radius: 999px;
    background: var(--allwr-line, #E5E0D6);
    overflow: hidden;
}
.allwr-invest__weight-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--allwr-gold-deep, #B58A23);
}

@media (prefers-reduced-motion: reduce) {
    .allwr-invest__dropzone,
    .allwr-invest__alloc-candidates button {
        transition-duration: 0.01ms;
    }
    /* The spinner freezes but the busy copy still communicates the state. */
    .allwr-invest__spinner { animation-duration: 0.01ms; animation-iteration-count: 1; }
}

/* ── Dashboard product card: date line for receipts ────────────────── */
.allwr-app__product-date {
    font-size: 0.78rem;
    color: var(--allwr-muted, #4a5b6a);
    grid-column: 1 / -1;
}

/* ── Sharing page ────────────────────────────────────────────────── */
.allwr-sharing__form-section { margin-bottom: 2rem; }
.allwr-sharing__form { display: flex; flex-direction: column; gap: 1rem; }
.allwr-sharing__field { display: flex; flex-direction: column; gap: 0.35rem; }
.allwr-sharing__field label { font: 500 0.85rem 'Inter', system-ui, sans-serif; color: var(--allwr-navy); }
.allwr-sharing__input {
    padding: 0.55rem 0.75rem; border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 10px; font: 400 0.9rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-navy); background: #fff; width: 100%;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-sharing__input:focus { outline: none; border-color: var(--allwr-gold); }
.allwr-sharing__radios { display: flex; flex-direction: column; gap: 0.5rem; }
.allwr-sharing__radio {
    display: grid; grid-template-columns: auto 1fr; gap: 0 0.5rem;
    padding: 0.65rem 0.75rem; border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 10px; cursor: pointer;
    transition: border-color var(--allwr-transition-fast, 150ms ease-out);
}
.allwr-sharing__radio:has(input:checked) { border-color: var(--allwr-navy); }
.allwr-sharing__radio input { grid-row: 1 / 3; align-self: center; }
.allwr-sharing__radio-label { font: 600 0.9rem 'Inter', system-ui, sans-serif; color: var(--allwr-navy); }
.allwr-sharing__radio-desc { font: 400 0.8rem 'Inter', system-ui, sans-serif; color: var(--allwr-muted); grid-column: 2; }
.allwr-sharing__products {
    display: flex; flex-direction: column; gap: 0.3rem;
    max-height: 240px; overflow-y: auto;
    padding: 0.5rem; border: 1px solid var(--allwr-line, #E6E2D8); border-radius: 10px;
}
.allwr-sharing__toggle {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
    font: 400 0.85rem 'Inter', system-ui, sans-serif; padding: 0.25rem 0;
}
.allwr-sharing__result {
    margin-top: 1rem; padding: 1rem; background: color-mix(in srgb, var(--allwr-gold) 8%, #fff);
    border: 1px solid var(--allwr-gold); border-radius: 10px;
}
.allwr-sharing__result-text { margin: 0 0 0.5rem; font: 500 0.9rem 'Inter', system-ui, sans-serif; }
.allwr-sharing__result-link { display: flex; gap: 0.5rem; }
.allwr-sharing__result-link input { flex: 1; }
.allwr-sharing__grants-section { margin-top: 1.5rem; }
.allwr-sharing__grant {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.65rem 0.75rem; border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 10px; margin-bottom: 0.5rem;
}
.allwr-sharing__grant--pending { opacity: 0.6; }
.allwr-sharing__grant-info { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* --- Billing Module --- */
.allwr-button {
    appearance: none;
    border: 1px solid var(--allwr-line);
    background: #fff;
    color: var(--allwr-navy);
    border-radius: 999px;
    padding: 0.62rem 1rem;
    font: 600 0.9rem 'Inter', system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: background-color var(--allwr-transition-fast),
                border-color var(--allwr-transition-fast),
                box-shadow var(--allwr-transition-fast),
                color var(--allwr-transition-fast);
}
.allwr-button:hover { border-color: var(--allwr-navy); box-shadow: 0 4px 14px rgba(2,21,43,0.08); }
.allwr-button--primary { background: var(--allwr-navy); border-color: var(--allwr-navy); color: #fff; }
.allwr-button--primary:hover { background: #03203e; border-color: #03203e; box-shadow: 0 8px 22px rgba(2,21,43,0.18); }
.allwr-button:focus-visible,
.allwr-billing__tab:focus-visible,
.allwr-billing__row-button:focus-visible,
.allwr-billing__input:focus-visible,
.allwr-billing__select:focus-visible,
.allwr-billing__detail-close:focus-visible,
.allwr-billing__icon-btn:focus-visible,
.allwr-billing__copy-btn:focus-visible,
.allwr-billing__invoice-link:focus-visible,
.allwr-modal__close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}

.allwr-billing {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 84px);
    background: var(--allwr-off-white);
}
.allwr-billing__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--allwr-line);
    background: #fff;
}
.allwr-billing__title {
    font: 800 1.55rem/1.15 'Satoshi', system-ui, sans-serif;
    margin: 0;
    color: var(--allwr-navy);
}
.allwr-billing__subtitle {
    max-width: 760px;
    margin: 0.35rem 0 0;
    color: var(--allwr-muted);
    font: 400 0.92rem/1.5 'Inter', system-ui, sans-serif;
}
.allwr-billing__tabs {
    display: flex;
    gap: 1.5rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--allwr-line);
    background: #fff;
    overflow-x: auto;
}
.allwr-billing__tab {
    appearance: none;
    flex: 0 0 auto;
    padding: 0.9rem 0 0.8rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--allwr-muted);
    font: 600 0.9rem 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: color var(--allwr-transition-fast), border-color var(--allwr-transition-fast);
}
.allwr-billing__tab:hover,
.allwr-billing__tab.is-active { color: var(--allwr-navy); }
.allwr-billing__tab.is-active { border-bottom-color: var(--allwr-gold); }
/* Pestañas arrastrables: orden reordenable por drag-and-drop (ver billing.js). */
.allwr-billing__tab { cursor: grab; }
.allwr-billing__tab.is-dragging { opacity: 0.5; cursor: grabbing; }
.allwr-billing__tab.is-drag-over { box-shadow: inset 2px 0 0 var(--allwr-gold); }

.allwr-billing__content { flex: 1; padding: 1.25rem 1.5rem 2rem; overflow: auto; }
.allwr-billing__section { display: none; }
.allwr-billing__section.is-active { display: block; }
.allwr-billing__section-head h2 { margin: 0 0 0.25rem; color: var(--allwr-navy); font: 750 1.2rem 'Satoshi', system-ui, sans-serif; }
.allwr-billing__section-head p { margin: 0 0 1rem; color: var(--allwr-muted); }

.allwr-billing__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.allwr-billing__filters { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.allwr-billing__table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}
.allwr-billing__table-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}
.allwr-billing__columns-menu {
    position: relative;
}
.allwr-billing__columns-menu summary,
.allwr-billing__page-size select {
    min-height: 38px;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
    color: var(--allwr-navy);
    font: 700 0.78rem 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast), background var(--allwr-transition-fast);
}
.allwr-billing__columns-menu summary {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    list-style: none;
}
.allwr-billing__columns-menu summary::-webkit-details-marker {
    display: none;
}
.allwr-billing__columns-menu summary:hover,
.allwr-billing__page-size select:hover {
    border-color: color-mix(in srgb, var(--allwr-navy) 38%, var(--allwr-line));
    background: var(--allwr-off-white);
}
.allwr-billing__columns-menu summary:focus-visible,
.allwr-billing__page-size select:focus-visible,
.allwr-billing__sort:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
}
.allwr-billing__columns-menu > div {
    position: absolute;
    z-index: 10;
    right: 0;
    top: calc(100% + 0.35rem);
    display: grid;
    gap: 0.35rem;
    width: min(320px, 88vw);
    max-height: 380px;
    overflow: auto;
    padding: 0.65rem;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(2,21,43,0.10);
}
.allwr-billing__columns-menu label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem;
    color: var(--allwr-navy);
    font: 600 0.82rem 'Inter', system-ui, sans-serif;
}
.allwr-billing__columns-menu input {
    accent-color: var(--allwr-gold);
}
.allwr-billing__page-size {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--allwr-muted);
    font: 700 0.72rem 'Inter', system-ui, sans-serif;
}
.allwr-billing__page-size select {
    width: auto;
    padding: 0.35rem 0.65rem;
}
.allwr-billing__input,
.allwr-billing__select {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: #fff;
    color: var(--allwr-navy);
    font: 400 0.9rem 'Inter', system-ui, sans-serif;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
textarea.allwr-billing__input { resize: vertical; min-height: 112px; line-height: 1.45; }
.allwr-billing__richtext { min-height: 132px; max-height: 420px; overflow-y: auto; line-height: 1.45; }
.allwr-billing__richtext p,
.allwr-billing__richtext-view p { margin: 0 0 0.5rem; }
.allwr-billing__richtext ul,
.allwr-billing__richtext ol,
.allwr-billing__richtext-view ul,
.allwr-billing__richtext-view ol { margin: 0.3rem 0; padding-left: 1.25rem; }
.allwr-billing__richtext-view { line-height: 1.5; }
.allwr-billing__input:hover,
.allwr-billing__select:hover { border-color: color-mix(in srgb, var(--allwr-navy) 38%, var(--allwr-line)); }
.allwr-billing__toolbar .allwr-billing__input { min-width: min(360px, 100%); }
.allwr-billing__toolbar .allwr-billing__select { min-width: 220px; }
/* Filtro de rango de fechas en la barra de facturas: el date input no debe
   heredar el min-width ancho del buscador. */
.allwr-billing__date-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--allwr-muted);
    font: 600 0.74rem 'Inter', system-ui, sans-serif;
    white-space: nowrap;
}
.allwr-billing__date-filter .allwr-billing__input { min-width: 0; width: auto; }
.allwr-billing__file-icon { flex: 0 0 auto; }

.allwr-billing__layout {
    min-width: 0;
}
.allwr-billing__table-wrapper {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 14px 34px rgba(2,21,43,0.05);
}
.allwr-billing__table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font: 400 0.85rem 'Inter', system-ui, sans-serif;
}
.allwr-billing__table th {
    background: color-mix(in srgb, var(--allwr-off-white) 68%, #fff);
    text-align: left;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
}
.allwr-billing__sort {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    cursor: pointer;
}
.allwr-billing__sort:hover {
    color: var(--allwr-navy);
}
.allwr-billing__sort span {
    color: var(--allwr-gold);
    font-size: 0.78rem;
}
.allwr-billing__table td {
    padding: 0.72rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-navy);
    vertical-align: middle;
}
.allwr-billing__table tr:last-child td { border-bottom: none; }
.allwr-billing__table tr.clickable:hover td,
.allwr-billing__table tr.is-selected td { background: color-mix(in srgb, var(--allwr-gold) 8%, #fff); }
.allwr-billing__table small { display: block; margin-top: 0.16rem; color: var(--allwr-muted); }
.allwr-billing__pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.75rem;
    border-top: 1px solid var(--allwr-line);
    background: color-mix(in srgb, var(--allwr-off-white) 68%, #fff);
}
.allwr-billing__pagination span {
    color: var(--allwr-muted);
    font: 700 0.78rem 'Inter', system-ui, sans-serif;
}
/* Barra de paginación server-side del listado de facturas (100/página), sobre
   las cabeceras de la tabla: rango a la izquierda, navegación a la derecha. */
.allwr-billing__invoice-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    background: color-mix(in srgb, var(--allwr-off-white) 68%, #fff);
}
.allwr-billing__invoice-pagination-status {
    color: var(--allwr-muted);
    font: 500 0.8rem 'Inter', system-ui, sans-serif;
}
.allwr-billing__invoice-pagination-status strong { color: var(--allwr-navy); }
.allwr-billing__invoice-pagination-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.allwr-billing__invoice-pagination-nav .allwr-app__btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    gap: 0.3rem;
}
.allwr-billing__invoice-pagination-page {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--allwr-muted);
    font: 600 0.78rem 'Inter', system-ui, sans-serif;
    white-space: nowrap;
}
.allwr-billing__invoice-pagination-page input {
    width: 3.2rem;
    padding: 0.3rem 0.4rem;
    border: 1px solid var(--allwr-line);
    border-radius: 6px;
    text-align: center;
    font: inherit;
    color: var(--allwr-navy);
}
.allwr-billing__row-button {
    appearance: none;
    width: 100%;
    border: none;
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0;
}
.allwr-billing__row-button strong,
.allwr-billing__row-button span { display: block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allwr-billing__row-button span { margin-top: 0.16rem; color: var(--allwr-muted); font-size: 0.78rem; }

.allwr-billing__detail {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 960;
    width: min(94vw, clamp(880px, 58vw, 1180px));
    min-width: 0;
    height: 100vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-right: none;
    border-radius: 22px 0 0 22px;
    padding: 0;
    box-shadow: -30px 0 80px rgba(2,21,43,0.22);
    transform: translate3d(104%, 0, 0);
    pointer-events: none;
    transition: transform var(--allwr-transition-slow), box-shadow var(--allwr-transition-slow);
    will-change: transform;
}
.allwr-billing__detail-body { padding: 0 1.25rem 1.25rem; }
.allwr-billing__detail[hidden] {
    display: block;
    visibility: hidden;
}
.allwr-billing__detail.is-open {
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}
.allwr-billing__detail-head {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.25rem 0.85rem;
    background: #fff;
    border-bottom: 1px solid var(--allwr-line);
    border-radius: 22px 0 0 0;
}
.allwr-billing__detail-id { min-width: 0; }
.allwr-billing__detail-nif { display: flex; align-items: center; gap: 0.1rem; }
.allwr-billing__detail-head h2 { margin: 0.1rem 0 0.2rem; color: var(--allwr-navy); font: 750 1.15rem/1.2 'Satoshi', system-ui, sans-serif; }
.allwr-billing__detail-head p { margin: 0; color: var(--allwr-muted); }
.allwr-billing__eyebrow {
    display: inline-flex;
    margin: 0;
    padding: 0.24rem 0.6rem;
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 45%, var(--allwr-line));
    border-radius: 999px;
    color: var(--allwr-gold-text, #A67C12);
    background: color-mix(in srgb, var(--allwr-gold) 13%, #fff);
    font: 800 0.68rem/1 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
}
.allwr-billing__detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.allwr-billing__detail-close,
.allwr-billing__icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
    color: var(--allwr-navy);
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast),
                background-color var(--allwr-transition-fast),
                color var(--allwr-transition-fast),
                box-shadow var(--allwr-transition-fast);
}
.allwr-billing__detail-close:hover,
.allwr-billing__icon-btn:hover {
    border-color: var(--allwr-navy);
    box-shadow: 0 6px 18px rgba(2,21,43,0.08);
}
.allwr-billing__icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}
.allwr-billing__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; margin: 0.9rem 0; }
.allwr-billing__metric {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    padding: 0.7rem;
    background: color-mix(in srgb, var(--allwr-off-white) 56%, #fff);
}
.allwr-billing__metric-ico {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 32%, var(--allwr-line));
    border-radius: 9px;
    color: var(--allwr-gold-text, #A67C12);
    background: color-mix(in srgb, var(--allwr-gold) 12%, #fff);
}
.allwr-billing__metric-copy { min-width: 0; }
.allwr-billing__metric span { display: block; color: var(--allwr-muted); font-size: 0.72rem; }
.allwr-billing__metric strong { display: block; margin-top: 0.2rem; color: var(--allwr-navy); font: 750 0.98rem 'Satoshi', system-ui, sans-serif; overflow-wrap: anywhere; }
.allwr-billing__detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 0.8rem;
    align-items: start;
}
.allwr-billing__detail-col { display: grid; gap: 0.8rem; min-width: 0; align-content: start; }
.allwr-billing__detail-section {
    min-width: 0;
    padding: 0.9rem 1rem;
    border: 1px solid var(--allwr-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(2,21,43,0.05);
}
.allwr-billing__detail-section:empty { display: none; }
.allwr-billing__detail-section--full { grid-column: 1 / -1; }
.allwr-billing__detail-section h3 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.65rem;
    color: var(--allwr-navy);
    font: 750 0.95rem 'Satoshi', system-ui, sans-serif;
}
.allwr-billing__detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
}
.allwr-billing__detail-section-head h3 { margin: 0; }
.allwr-billing__copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 0.3rem;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--allwr-muted);
    cursor: pointer;
    vertical-align: middle;
    transition: color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-billing__copy-btn:hover { color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 8%, #fff); }
.allwr-billing__copy-btn svg { width: 14px; height: 14px; }
.allwr-billing__definition-copy { display: flex; align-items: center; min-width: 0; }
.allwr-billing__definition-grid--single { grid-template-columns: minmax(0, 1fr); }
.allwr-billing__invoice-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-navy);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
    transition: text-decoration-color var(--allwr-transition-fast);
}
.allwr-billing__invoice-link:hover { text-decoration-color: currentColor; }
.allwr-billing__invoice-link svg { width: 12px; height: 12px; color: var(--allwr-muted); }
.allwr-billing__activity {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    align-items: start;
}
.allwr-billing__activity-log { min-width: 0; max-height: 340px; overflow: auto; }
@media (max-width: 940px) {
    .allwr-billing__detail-grid,
    .allwr-billing__activity { grid-template-columns: minmax(0, 1fr); }
    .allwr-billing__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.allwr-billing__definition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.9rem;
    margin: 0;
}
.allwr-billing__definition-grid div,
.allwr-billing__definition-item {
    min-width: 0;
    grid-column: span 1;
    border: 0;
    background: transparent;
}
.allwr-billing__definition-grid dt { color: var(--allwr-muted); font-size: 0.72rem; margin-bottom: 0.15rem; }
.allwr-billing__definition-grid dd {
    margin: 0;
    color: var(--allwr-ink, #0F1B2D);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.allwr-billing__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.7rem; }
.allwr-billing__chips span {
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 50%, var(--allwr-line));
    border-radius: 999px;
    padding: 0.24rem 0.55rem;
    color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-gold) 10%, #fff);
    font-size: 0.76rem;
}
.allwr-billing__mini-table { overflow: auto; border: 1px solid var(--allwr-line); border-radius: 8px; }
.allwr-billing__mini-table--scroll { max-height: 272px; }
.allwr-billing__mini-table--scroll thead th { position: sticky; top: 0; z-index: 1; }
.allwr-billing__mini-table table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.allwr-billing__mini-table th,
.allwr-billing__mini-table td { padding: 0.48rem; border-bottom: 1px solid var(--allwr-line); text-align: left; }
.allwr-billing__mini-table th { color: var(--allwr-muted); background: var(--allwr-off-white); }
.allwr-billing__empty { padding: 1rem; color: var(--allwr-muted); text-align: center; }

.allwr-billing__card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}
.allwr-billing__card span { display: block; margin-top: 0.2rem; color: var(--allwr-muted); }
.allwr-billing__card-actions { display: flex; align-items: center; gap: 0.65rem; }
.allwr-billing__ipc-form { align-items: flex-end; flex-wrap: wrap; }
.allwr-billing__ipc-form .allwr-billing__field { flex: 1 1 180px; }
.allwr-billing__ipc-annual { margin-bottom: 1.5rem; }
.allwr-billing__ipc-annual h3 { margin: 0 0 0.35rem; }
.allwr-billing__ipc-annual-card { align-items: flex-start; }
.allwr-billing__ipc-revisions { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.allwr-billing__ipc-revisions li { display: flex; gap: 0.6rem; justify-content: space-between; padding: 0.2rem 0; border-bottom: 1px dashed var(--allwr-line); }
.allwr-billing__ipc-revisions li:last-child { border-bottom: 0; }
.allwr-billing__ipc-toggle { margin-top: 1rem; }
.allwr-billing__checkbox { display: flex; align-items: center; gap: 0.55rem; margin: 0.35rem 0; cursor: pointer; }
.allwr-billing__checkbox input { width: 1.05rem; height: 1.05rem; accent-color: var(--allwr-navy); }
.allwr-billing__ipc-toggle small { display: block; line-height: 1.5; }
.allwr-invoice-editor__test-hint { margin: -0.35rem 0 0.4rem; font-size: 0.78rem; line-height: 1.45; }
.allwr-billing__email-form { display: flex; flex-direction: column; gap: 0.85rem; max-width: 560px; }
.allwr-billing__email-form .allwr-billing__field { display: flex; flex-direction: column; gap: 0.3rem; }
.allwr-billing__email-hint { line-height: 1.5; }
.allwr-billing__email-google { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.allwr-billing__email-google span { display: block; color: var(--allwr-muted); }
.allwr-billing__email-google.is-connected strong { color: var(--allwr-navy); }
.allwr-billing__email-google a.allwr-app__btn { text-decoration: none; }
.allwr-billing__email-google-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.allwr-invoice-editor__ipc-note { margin: 0.5rem 0 0; padding: 0.6rem 0.8rem; border-radius: 8px; background: var(--allwr-gold-soft, #faf3e0); color: var(--allwr-navy); font-size: 0.82rem; line-height: 1.45; border: 1px solid var(--allwr-gold, #DEAD39); }
.allwr-app__btn--secondary { background: var(--allwr-off-white, #F5F1E8); border-color: var(--allwr-line, #E6E2D8); }
.allwr-app__btn--secondary:hover { border-color: var(--allwr-navy); }

.allwr-modal[hidden] { display: none; }
.allwr-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(2,21,43,0.46);
}
.allwr-modal__content {
    width: min(1120px, 100%);
    max-height: min(860px, calc(100vh - 2rem));
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(2,21,43,0.28);
    overflow: hidden;
}
.allwr-modal__header,
.allwr-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-modal__footer { border-top: 1px solid var(--allwr-line); border-bottom: none; justify-content: flex-end; }
.allwr-modal__header h2 { margin: 0; color: var(--allwr-navy); font: 750 1.15rem 'Satoshi', system-ui, sans-serif; }
.allwr-modal__close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
    color: var(--allwr-navy);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}
.allwr-modal__close:hover { border-color: var(--allwr-navy); }
.allwr-modal__body { overflow: auto; padding: 1rem 1.2rem; }
.allwr-billing__modal { width: min(1180px, 100%); }

.allwr-billing__form,
.allwr-billing__template-form {
    display: grid;
    gap: 1rem;
}
.allwr-billing__form section,
.allwr-billing__template-form section {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--allwr-off-white) 42%, #fff);
}
.allwr-billing__form h3,
.allwr-billing__template-form h2,
.allwr-billing__template-form h3 {
    margin: 0;
    color: var(--allwr-navy);
    font: 750 1rem 'Satoshi', system-ui, sans-serif;
}
.allwr-billing__form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.allwr-billing__field { display: grid; gap: 0.35rem; min-width: 0; color: var(--allwr-muted); font: 600 0.76rem 'Inter', system-ui, sans-serif; }
.allwr-billing__field--wide { grid-column: 1 / -1; }
.allwr-billing__field.is-disabled { opacity: 0.58; }
.allwr-billing__field.is-disabled .allwr-billing__input { background: color-mix(in srgb, var(--allwr-off-white) 70%, #fff); cursor: not-allowed; }
/* Chips de estado del cliente (Editar cliente): desplegable tipo <select>
   que muestra solo el chip del estado actual y abre la lista al pulsarlo. */
.allwr-billing__status-dd { position: relative; display: inline-flex; align-self: flex-start; }
.allwr-billing__status-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    min-width: max(100%, 170px);
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 12px 32px rgba(15, 27, 45, 0.16);
}
.allwr-billing__status-menu[hidden] { display: none; }
.allwr-billing__status-option { justify-content: flex-start; }
.allwr-billing__status-option:hover { filter: brightness(0.96); }
.allwr-billing__status-option[aria-selected="true"] { border-color: currentColor; }
.allwr-billing__status-trigger .allwr-billing__icon:last-child { margin-left: 0.1rem; opacity: 0.65; }
/* Dentro del menú, cada opción se muestra siempre con su color de estado */
.allwr-billing__status-menu .allwr-billing__status-chip--esperando_firma { background: #F1F3F4; color: #5F6368; }
.allwr-billing__status-menu .allwr-billing__status-chip--activo { background: #E6F4EA; color: #1E7E34; }
.allwr-billing__status-menu .allwr-billing__status-chip--pausa { background: #FEF7E0; color: #8A5A00; }
.allwr-billing__status-menu .allwr-billing__status-chip--baja { background: #FCE8E6; color: #C5221F; }
.allwr-billing__status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--allwr-line);
    background: #fff;
    color: var(--allwr-ink, #0F1B2D);
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.allwr-billing__status-chip svg { flex: 0 0 auto; }
.allwr-billing__status-chip:hover:not(:disabled) { background: var(--allwr-off-white); }
.allwr-billing__status-chip.is-selected.allwr-billing__status-chip--esperando_firma { background: #F1F3F4; color: #5F6368; border-color: #5F6368; }
.allwr-billing__status-chip.is-selected.allwr-billing__status-chip--activo { background: #E6F4EA; color: #1E7E34; border-color: #1E7E34; }
.allwr-billing__status-chip.is-selected.allwr-billing__status-chip--pausa { background: #FEF7E0; color: #8A5A00; border-color: #8A5A00; }
.allwr-billing__status-chip.is-selected.allwr-billing__status-chip--baja { background: #FCE8E6; color: #C5221F; border-color: #C5221F; }
.allwr-billing__status-chip.is-disabled,
.allwr-billing__status-chip:disabled { opacity: 0.45; cursor: not-allowed; }
/* Inputs no editables (disabled/readonly) se distinguen con un tono grisaceo claro
   en cualquier formulario, sin depender de una clase en el wrapper. */
.allwr-billing__input:disabled,
.allwr-billing__input[readonly],
.allwr-billing__select:disabled,
.allwr-billing__select[disabled] {
    background: color-mix(in srgb, var(--allwr-off-white) 55%, #ececec);
    color: var(--allwr-muted);
    border-color: var(--allwr-line);
    cursor: not-allowed;
}
.allwr-billing__input:disabled:hover,
.allwr-billing__input[readonly]:hover,
.allwr-billing__select:disabled:hover,
.allwr-billing__select[disabled]:hover { border-color: var(--allwr-line); }
.allwr-billing__input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; }
/* Spinner para botones en estado de guardado (evita dobles envíos).
   La animación queda neutralizada por el bloque global prefers-reduced-motion. */
.allwr-btn-spinner {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    margin-right: 0.5em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.15em;
    animation: allwr-btn-spin 0.6s linear infinite;
}
.allwr-button.is-loading,
.allwr-app__btn.is-loading { cursor: progress; }
.allwr-button:disabled,
.allwr-app__btn:disabled { opacity: 0.55; cursor: not-allowed; }
@keyframes allwr-btn-spin { to { transform: rotate(360deg); } }
.allwr-billing__form-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.allwr-billing__contacts {
    display: grid;
    gap: 0.75rem;
}
.allwr-billing__contact-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(180px, 0.7fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(2,21,43,0.04);
}
.allwr-billing__contact-avatar,
.allwr-billing__detail-contact > span {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-gold) 18%, #fff);
    color: var(--allwr-navy);
    font: 800 0.82rem 'Inter', system-ui, sans-serif;
}
.allwr-billing__contact-avatar img,
.allwr-billing__detail-contact img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}
.allwr-billing__contact-main { min-width: 0; }
.allwr-billing__contact-main h3 {
    margin: 0 0 0.16rem;
    color: var(--allwr-navy);
    font: 750 0.98rem 'Satoshi', system-ui, sans-serif;
}
.allwr-billing__contact-main p,
.allwr-billing__contact-main span,
.allwr-billing__contact-meta {
    margin: 0;
    color: var(--allwr-muted);
    font-size: 0.82rem;
}
.allwr-billing__contact-main span {
    display: block;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}
.allwr-billing__contact-meta {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}
.allwr-billing__contact-meta a {
    color: var(--allwr-navy);
    overflow-wrap: anywhere;
}
.allwr-billing__contact-picker,
.allwr-billing__domains-editor {
    display: grid;
    gap: 0.65rem;
}
.allwr-billing__contact-option {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.75fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
}
.allwr-billing__contact-check,
.allwr-billing__inline-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    color: var(--allwr-navy);
    font: 600 0.82rem 'Inter', system-ui, sans-serif;
}
.allwr-billing__contact-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.12rem 0.45rem;
}
.allwr-billing__contact-check small {
    grid-column: 2;
    color: var(--allwr-muted);
    font-weight: 400;
    overflow-wrap: anywhere;
}
.allwr-billing__domain-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 0.55rem;
    align-items: center;
}
.allwr-billing__detail-contact-list {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}
.allwr-billing__detail-contact {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
}
.allwr-billing__detail-contact img,
.allwr-billing__detail-contact > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}
.allwr-billing__detail-contact strong,
.allwr-billing__detail-contact small {
    display: block;
    overflow-wrap: anywhere;
}
.allwr-billing__detail-contact strong { color: var(--allwr-navy); font-size: 0.84rem; }
.allwr-billing__detail-contact small { color: var(--allwr-muted); font-size: 0.76rem; }
.allwr-billing__chips--domains { margin-top: 0.7rem; }
.allwr-billing__custom-fields { display: grid; gap: 0.7rem; }
.allwr-billing__custom-field {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) 150px minmax(160px, 1fr) minmax(180px, 1.1fr);
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
}
.allwr-billing__custom-field label { display: grid; gap: 0.35rem; color: var(--allwr-muted); font: 600 0.72rem 'Inter', system-ui, sans-serif; }

.allwr-billing__template-layout {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.allwr-billing__template-form {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 160px);
    overflow: auto;
}
.allwr-billing__template-head {
    display: grid;
    gap: 0.25rem;
}
.allwr-billing__template-head h2 {
    margin: 0;
    color: var(--allwr-navy);
    font: 750 1rem 'Satoshi', system-ui, sans-serif;
}
.allwr-billing__template-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
}
.allwr-billing__template-tab {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--allwr-muted);
    cursor: pointer;
    font: 750 0.78rem 'Inter', system-ui, sans-serif;
    transition: background var(--allwr-transition-fast), color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-billing__template-tab:hover {
    color: var(--allwr-navy);
    background: color-mix(in srgb, var(--allwr-off-white) 74%, #fff);
}
.allwr-billing__template-tab.is-active {
    background: var(--allwr-navy);
    color: #fff;
    box-shadow: 0 10px 24px rgba(2,21,43,0.16);
}
.allwr-billing__template-pane {
    display: none;
}
.allwr-billing__template-pane.is-active {
    display: grid;
}
.allwr-billing__template-fixed-texts {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px dashed color-mix(in srgb, var(--allwr-gold) 58%, var(--allwr-line));
    border-radius: 10px;
    background: color-mix(in srgb, var(--allwr-gold) 8%, #fff);
}
.allwr-billing__template-fixed-texts h3,
.allwr-billing__template-fixed-texts p {
    margin: 0;
}
.allwr-billing__template-fixed-texts strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--allwr-navy);
    font-size: 0.8rem;
}
.allwr-billing__template-fixed-texts p {
    color: var(--allwr-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}
.allwr-billing__invoice-preview {
    min-width: 0;
    display: flex;
    justify-content: center;
    padding: 1rem;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--allwr-navy) 7%, #fff);
    overflow: auto;
}
.allwr-invoice-sheet {
    width: min(760px, 100%);
    min-height: 980px;
    padding: 3rem;
    background: #fff;
    color: var(--allwr-navy);
    box-shadow: 0 24px 60px rgba(2,21,43,0.16);
    font: 400 0.85rem/1.45 'Inter', system-ui, sans-serif;
}
/* =============================================================================
   Invoice sheet content — .inv-* vocabulary, mirrors the redesigned PDF
   (allwr_billing_invoice_html() in modules/billing/billing.php). Shared by the
   three on-screen renderers: renderInvoicePreview(), renderInvoiceDetail() and
   openInvoiceEditor() in billing.js. Scoped to the sheet containers so it can't
   leak onto unrelated markup.
   ============================================================================= */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) {
    --inv-text: #5E6B7A;
    --inv-surface: #F6F8FA;
    --inv-line: #E9EDF2;
    --inv-gold-soft: color-mix(in srgb, var(--invoice-gold, var(--allwr-gold)) 16%, #fff);
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .u-accent {
    color: var(--invoice-gold, var(--allwr-gold));
    font: 800 0.66rem/1.1 'Inter', system-ui, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-ic {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-ic svg { display: block; }

/* 1. Cabecera */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 32px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-head__brand img {
    height: 52px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    display: block;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-head__brand strong {
    font: 900 1.7rem 'Satoshi', system-ui, sans-serif;
    color: var(--allwr-navy);
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-head__doc { text-align: right; white-space: nowrap; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-head__doc strong {
    display: block;
    margin-top: 6px;
    font: 900 1.9rem/1 'Satoshi', system-ui, sans-serif;
    color: var(--allwr-navy);
}

/* 2. Fechas */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--inv-surface);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates__col {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 8px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates__col + .inv-dates__col {
    border-left: 1px solid var(--inv-line);
    padding-left: 24px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates .inv-ic {
    width: 34px;
    height: 34px;
    background: var(--allwr-navy);
    color: #fff;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates .inv-ic svg { width: 17px; height: 17px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates__label { display: block; margin-bottom: 4px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates__value { display: block; color: var(--allwr-navy); font-weight: 600; }

/* 3. Cliente / Proveedor */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-party {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-party .inv-ic {
    width: 34px;
    height: 34px;
    background: var(--inv-gold-soft);
    color: var(--invoice-gold, var(--allwr-gold));
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-party .inv-ic svg { width: 18px; height: 18px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-party__body strong {
    display: block;
    margin: 5px 0 6px;
    color: var(--allwr-navy);
    font-size: 0.98rem;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-party__body p {
    margin: 0;
    line-height: 1.6;
    color: var(--inv-text);
    overflow-wrap: anywhere;
}

:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-note {
    margin: 0 0 24px;
    line-height: 1.6;
    color: var(--inv-text);
}

/* 4. Tabla de líneas */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 24px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table th {
    background: var(--allwr-navy);
    color: #fff;
    font: 700 0.64rem/1 'Inter', system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    padding: 13px 16px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table th:first-child { border-top-left-radius: 10px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table th:last-child { border-top-right-radius: 10px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--inv-line);
    color: var(--allwr-navy);
    vertical-align: middle;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table td.num--total { font-weight: 700; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table .col-qty { width: 84px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table .col-price { width: 150px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table .col-total { width: 130px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table .col-remove { width: 40px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table input.allwr-billing__input {
    width: 100%;
    min-height: 36px;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-table .num input.allwr-billing__input { text-align: right; }
/* «Sin IPC» por línea: casilla discreta junto a la descripción */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .allwr-invoice-editor__line-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .allwr-invoice-editor__line-detail input.allwr-billing__input {
    flex: 1 1 10rem;
    width: auto;
    min-width: 0;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .allwr-invoice-editor__ipc-exempt {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    color: var(--inv-text);
    font: 500 0.72rem/1 'Inter', system-ui, sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--allwr-transition-fast);
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .allwr-invoice-editor__ipc-exempt:has(input:checked) {
    color: var(--allwr-navy);
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .allwr-invoice-editor__ipc-exempt input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--allwr-navy);
    cursor: pointer;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .allwr-invoice-editor__ipc-exempt input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}

/* 5. Totales */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-totals {
    width: min(320px, 100%);
    margin-left: auto;
    margin-bottom: 32px;
    background: var(--inv-surface);
    border-radius: 14px;
    padding: 18px 24px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-totals__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-totals__row span { color: var(--inv-text); }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-totals__row strong {
    color: var(--allwr-navy);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-totals__grand {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--inv-line);
    align-items: baseline;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-totals__grand strong {
    font: 900 1.6rem/1 'Satoshi', system-ui, sans-serif;
    color: var(--allwr-navy);
}

/* 6. Pago / Notas */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--inv-line);
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-cols__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-cols__head .inv-ic {
    width: 30px;
    height: 30px;
    background: var(--inv-gold-soft);
    color: var(--invoice-gold, var(--allwr-gold));
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-cols__head .inv-ic svg { width: 16px; height: 16px; }
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-cols p {
    margin: 0 0 10px;
    line-height: 1.65;
    color: var(--inv-text);
    overflow-wrap: anywhere;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-cols p.small { font-size: 0.8rem; }

/* 7. Pie allwr */
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-allwr {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--inv-line);
    text-align: center;
    color: #97A1AF;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}
:is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-allwr a { color: inherit; text-decoration: none; }

.allwr-invoice-editor {
    position: fixed;
    inset: 0;
    z-index: 980;
    display: flex;
    justify-content: flex-end;
    background: rgba(2,21,43,0);
    pointer-events: none;
    transition: background var(--allwr-transition-slow);
}
.allwr-invoice-editor.is-open {
    background: rgba(2,21,43,0.34);
    pointer-events: auto;
}
.allwr-invoice-viewer {
    position: fixed;
    inset: 0;
    z-index: 970;
    display: flex;
    justify-content: flex-end;
    background: rgba(2,21,43,0);
    pointer-events: none;
    transition: background var(--allwr-transition-slow);
}
.allwr-invoice-viewer.is-open {
    background: rgba(2,21,43,0.28);
    pointer-events: auto;
}
.allwr-invoice-editor__panel {
    width: min(96vw, 1280px);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--allwr-off-white);
    border-left: 1px solid var(--allwr-line);
    border-radius: 22px 0 0 22px;
    box-shadow: -30px 0 80px rgba(2,21,43,0.22);
    transform: translate3d(100%, 0, 0);
    transition: transform var(--allwr-transition-slow);
    will-change: transform;
}
.allwr-invoice-editor.is-open .allwr-invoice-editor__panel {
    transform: translate3d(0, 0, 0);
}
.allwr-invoice-viewer__panel {
    width: min(96vw, 1180px);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--allwr-off-white);
    border-left: 1px solid var(--allwr-line);
    border-radius: 22px 0 0 22px;
    box-shadow: -30px 0 80px rgba(2,21,43,0.20);
    transform: translate3d(100%, 0, 0);
    transition: transform var(--allwr-transition-slow);
    will-change: transform;
}
.allwr-invoice-viewer.is-open .allwr-invoice-viewer__panel {
    transform: translate3d(0, 0, 0);
}
.allwr-invoice-editor__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-invoice-editor__bar span {
    display: block;
    color: var(--allwr-muted);
    font: 700 0.68rem 'Inter', system-ui, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.allwr-invoice-editor__bar strong {
    display: block;
    margin-top: 0.18rem;
    color: var(--allwr-navy);
    font: 800 1.05rem 'Satoshi', system-ui, sans-serif;
}
.allwr-invoice-editor__body {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.25rem;
    overflow: auto;
    padding: 1.25rem;
}
.allwr-invoice-viewer__body {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 1.25rem;
}
.allwr-invoice-viewer__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 1.25rem;
    align-items: start;
}
.allwr-invoice-editor__sheet {
    width: min(820px, 100%);
    min-height: 1080px;
    justify-self: center;
    padding: 3rem;
    background: #fff;
    color: var(--allwr-navy);
    box-shadow: 0 26px 70px rgba(2,21,43,0.18);
    font: 400 0.86rem/1.45 'Inter', system-ui, sans-serif;
}
.allwr-invoice-viewer__sheet {
    position: relative;
    min-height: 960px;
}
.allwr-invoice-viewer__sheet .inv-void-stamp {
    position: absolute;
    top: 47%;
    left: 50%;
    z-index: 2;
    margin: 0;
    padding: 0.55rem 1.25rem;
    border: 4px solid var(--allwr-gold);
    border-radius: 8px;
    color: var(--allwr-gold-text, var(--allwr-gold));
    background: rgba(255,255,255,0.74);
    font: 900 clamp(2.7rem, 8vw, 5.1rem)/1 'Satoshi', system-ui, sans-serif;
    letter-spacing: 0.12em;
    opacity: 0.82;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(-32deg);
    white-space: nowrap;
}
.allwr-invoice-viewer__info {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 24px;
    height: 24px;
    border: 1px solid color-mix(in srgb, var(--allwr-navy) 18%, #fff);
    border-radius: 999px;
    background: rgba(255,255,255,0.84);
    color: var(--allwr-muted);
    cursor: help;
    font: 800 0.75rem 'Inter', system-ui, sans-serif;
}
.allwr-invoice-viewer__info:hover {
    color: var(--allwr-navy);
    border-color: var(--allwr-navy);
}
.allwr-invoice-editor.is-sending-fold .allwr-invoice-editor__side,
.allwr-invoice-editor.is-sending-fold .allwr-invoice-editor__bar {
    opacity: 0.42;
    pointer-events: none;
}
.allwr-invoice-fold {
    z-index: 2000;
    pointer-events: none;
    perspective: 1800px;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    filter: drop-shadow(0 30px 46px rgba(2,21,43,0.24));
}
.allwr-invoice-fold__panel {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    background: #fff;
    transform-style: preserve-3d;
    will-change: transform, filter;
}
.allwr-invoice-fold__panel--top {
    transform-origin: center bottom;
    z-index: 4;
    box-shadow: 0 1px 0 rgba(2,21,43,0.10);
}
.allwr-invoice-fold__panel--middle {
    transform-origin: center center;
    z-index: 2;
    box-shadow: 0 18px 46px rgba(2,21,43,0.18);
}
.allwr-invoice-fold__panel--bottom {
    transform-origin: center top;
    z-index: 3;
    box-shadow: 0 -1px 0 rgba(2,21,43,0.10);
}
.allwr-invoice-fold__face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #fff;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.allwr-invoice-fold__face--front {
    transform: translateZ(0.2px);
}
.allwr-invoice-fold__face--back {
    transform: rotateX(180deg) translateZ(0.2px);
    background:
        linear-gradient(180deg, rgba(2,21,43,0.04), rgba(255,255,255,0) 24%, rgba(222,173,57,0.035) 100%),
        #fff;
}
.allwr-invoice-fold__panel--top .allwr-invoice-fold__face--back {
    box-shadow: inset 0 -18px 28px rgba(2,21,43,0.10);
}
.allwr-invoice-fold__panel--bottom .allwr-invoice-fold__face--back {
    box-shadow: inset 0 18px 28px rgba(2,21,43,0.12);
}
.allwr-invoice-fold__content {
    max-width: none;
    border-radius: 0;
    pointer-events: none;
}
.allwr-invoice-editor__email {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.2rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--allwr-line);
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-invoice-editor__email span,
.allwr-invoice-editor__side span {
    color: var(--allwr-muted);
    font: 700 0.68rem 'Inter', system-ui, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.allwr-invoice-editor__add-line {
    margin-bottom: 1.25rem;
}
.allwr-invoice-editor__payment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 1rem;
    align-items: start;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--allwr-line);
}
.allwr-invoice-editor__payment p {
    margin: 0;
    color: color-mix(in srgb, var(--allwr-navy) 74%, #fff);
}
.allwr-invoice-editor__qr {
    width: 112px;
    height: 112px;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 3px;
    padding: 8px;
    border: 1px solid var(--allwr-line);
    background: #fff;
}
.allwr-invoice-editor__qr span {
    background: color-mix(in srgb, var(--allwr-navy) 8%, #fff);
}
.allwr-invoice-editor__qr span.is-on {
    background: var(--allwr-navy);
}
.allwr-invoice-editor__side {
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 0.85rem;
}
.allwr-invoice-editor__side > div {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
}
.allwr-invoice-editor__side strong {
    color: var(--allwr-navy);
    overflow-wrap: anywhere;
}
.allwr-invoice-viewer__side {
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 0.85rem;
}
.allwr-invoice-viewer__status,
.allwr-invoice-viewer__log {
    display: grid;
    gap: 0.55rem;
    padding: 0.9rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
}
.allwr-invoice-viewer__status span {
    color: var(--allwr-muted);
    font: 700 0.68rem 'Inter', system-ui, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.allwr-invoice-viewer__usage ul {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--allwr-ink);
    font: 500 0.82rem 'Inter', system-ui, sans-serif;
    overflow-wrap: anywhere;
}
.allwr-invoice-viewer__usage .allwr-app__link {
    justify-self: start;
    font-size: 0.82rem;
}
.allwr-invoice-viewer__usage .allwr-app__link:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
    border-radius: 4px;
}
.allwr-invoice-viewer__log h3 {
    margin: 0;
    color: var(--allwr-navy);
    font: 750 0.95rem 'Satoshi', system-ui, sans-serif;
}
.allwr-invoice-viewer__comment {
    display: grid;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-invoice-viewer__comment label {
    color: var(--allwr-muted);
    font: 700 0.68rem 'Inter', system-ui, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.allwr-invoice-viewer__comment textarea {
    width: 100%;
    min-width: 0;
    resize: vertical;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: var(--allwr-off-white);
    color: var(--allwr-ink);
    font: 500 0.82rem 'Inter', system-ui, sans-serif;
    line-height: 1.45;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-invoice-viewer__comment textarea:focus-visible {
    border-color: var(--allwr-gold);
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
}
.allwr-invoice-viewer__comment div {
    display: flex;
    justify-content: flex-end;
}
.allwr-invoice-viewer__events {
    display: grid;
    gap: 0.65rem;
}
.allwr-invoice-viewer__event {
    padding-left: 0.7rem;
    border-left: 2px solid color-mix(in srgb, var(--allwr-gold) 70%, #fff);
}
.allwr-invoice-viewer__event--comment {
    border-left-color: var(--allwr-navy);
}
.allwr-invoice-viewer__event span,
.allwr-invoice-viewer__event strong,
.allwr-invoice-viewer__event p {
    display: block;
}
.allwr-invoice-viewer__event span {
    color: var(--allwr-muted);
    font-size: 0.72rem;
}
.allwr-invoice-viewer__event strong {
    margin-top: 0.08rem;
    color: var(--allwr-navy);
    font-size: 0.8rem;
}
.allwr-invoice-viewer__event p {
    margin: 0.12rem 0 0;
    color: color-mix(in srgb, var(--allwr-navy) 74%, #fff);
    font-size: 0.78rem;
    line-height: 1.38;
}
.allwr-invoice-viewer__event a {
    color: var(--allwr-navy);
    font-weight: 700;
}
.allwr-billing__comment {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: var(--allwr-off-white);
}
.allwr-billing__comment label {
    color: var(--allwr-muted);
    font: 700 0.68rem 'Inter', system-ui, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.allwr-billing__comment textarea {
    width: 100%;
    min-width: 0;
    resize: vertical;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: var(--allwr-card);
    color: var(--allwr-ink);
    font: 500 0.82rem 'Inter', system-ui, sans-serif;
    line-height: 1.45;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-billing__comment textarea:focus-visible {
    border-color: var(--allwr-gold);
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
}
.allwr-billing__comment div {
    display: flex;
    justify-content: flex-end;
}
.allwr-billing__events {
    display: grid;
    gap: 0.65rem;
}
.allwr-billing__event {
    padding-left: 0.7rem;
    border-left: 2px solid var(--allwr-gold);
}
.allwr-billing__event--comment {
    border-left-color: var(--allwr-navy);
}
.allwr-billing__event span,
.allwr-billing__event strong,
.allwr-billing__event p {
    display: block;
}
.allwr-billing__event span {
    color: var(--allwr-muted);
    font-size: 0.72rem;
}
.allwr-billing__event strong {
    margin-top: 0.08rem;
    color: var(--allwr-navy);
    font-size: 0.8rem;
}
.allwr-billing__event p {
    margin: 0.12rem 0 0;
    color: var(--allwr-ink);
    font-size: 0.78rem;
    line-height: 1.38;
}
.allwr-billing__event a {
    color: var(--allwr-navy);
    font-weight: 700;
}
.allwr-billing__inline-action {
    min-height: 28px;
    margin-left: 0.4rem;
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
}
.allwr-billing__status-select {
    border: 0;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    appearance: auto;
}

.allwr-billing__toast {
    z-index: 2200;
}

.allwr-billing__icon { flex: 0 0 auto; }
.allwr-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.allwr-badge--activo,
.allwr-badge--activo_con_auto,
.allwr-badge--pagada { background: #E6F4EA; color: #1E7E34; }
.allwr-badge--activo_sin_auto,
.allwr-badge--remesada { background: #FFF4E5; color: #B45C00; }
.allwr-badge--esperando_firma,
.allwr-badge--pendiente { background: #F1F3F4; color: #5F6368; }
.allwr-badge--pausa,
.allwr-badge--exportada_recobros,
.allwr-badge--recobrada { background: #FEF7E0; color: #8A5A00; }
.allwr-badge--baja,
.allwr-badge--devuelta,
.allwr-badge--condonada,
.allwr-badge--anulada { background: #FCE8E6; color: #C5221F; }

@media (max-width: 1180px) {
    .allwr-billing__template-layout { grid-template-columns: 1fr; }
    .allwr-billing__template-form { position: static; max-height: none; }
    .allwr-invoice-editor__body,
    .allwr-invoice-viewer__main { grid-template-columns: 1fr; }
    .allwr-invoice-editor__side {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        align-items: stretch;
    }
    .allwr-invoice-viewer__side { position: static; }
}

/* ===== Cobros SEPA + Informes ===== */
.allwr-billing__panel {
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(2,21,43,0.04);
}
.allwr-billing__panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.allwr-billing__panel-head h3 { margin: 0; color: var(--allwr-navy); font: 750 1.02rem 'Satoshi', system-ui, sans-serif; }
.allwr-billing__panel-head p { margin: 0.15rem 0 0; color: var(--allwr-muted); font-size: 0.82rem; }
.allwr-billing__hint { margin: 0.6rem 0 0; color: var(--allwr-muted); font-size: 0.78rem; }
.allwr-billing__warn {
    margin: 0.6rem 0 0;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--allwr-gold) 14%, #fff);
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 40%, var(--allwr-line));
    color: #7a5b12;
    font-size: 0.8rem;
}
.allwr-button--sm { padding: 0.34rem 0.7rem; font-size: 0.78rem; }

/* Cuentas de cobro de la empresa */
.allwr-billing__acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; }
.allwr-billing__acct {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    background: color-mix(in srgb, var(--allwr-off-white) 50%, #fff);
}
.allwr-billing__acct-head { display: flex; align-items: center; gap: 0.5rem; }
.allwr-billing__acct-head strong { color: var(--allwr-navy); font: 750 0.92rem 'Satoshi', system-ui, sans-serif; }
.allwr-billing__acct-iban { margin-top: 0.3rem; font: 600 0.9rem 'Inter', system-ui, sans-serif; color: var(--allwr-navy); letter-spacing: 0.04em; }
.allwr-billing__acct-meta { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.4rem; color: var(--allwr-muted); font-size: 0.74rem; }
.allwr-billing__acct-meta span { padding: 0.1rem 0.4rem; border: 1px solid var(--allwr-line); border-radius: 6px; }
.allwr-billing__acct-actions { display: flex; gap: 0.3rem; align-items: flex-start; }
.allwr-billing__acct-form {
    border: 1px solid color-mix(in srgb, var(--allwr-gold) 40%, var(--allwr-line));
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: color-mix(in srgb, var(--allwr-off-white) 60%, #fff);
}
.allwr-billing__acct-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.allwr-billing__acct-form-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.9rem; }
.allwr-billing__check { display: flex; align-items: center; gap: 0.5rem; color: var(--allwr-navy); font-size: 0.84rem; align-self: center; }
.allwr-billing__check input { width: 16px; height: 16px; }

/* Toolbar de generación de remesa */
.allwr-billing__cobros-toolbar { display: flex; align-items: flex-end; gap: 0.9rem; flex-wrap: wrap; }
.allwr-billing__field--inline { align-self: flex-end; }
.allwr-billing__cobros-toolbar .allwr-billing__select { min-width: 200px; }
.allwr-billing__cobros-scheme { align-self: center; }
.allwr-billing__cobros-summary { align-self: center; color: var(--allwr-navy); font: 700 0.9rem 'Inter', system-ui, sans-serif; }
.allwr-billing__cobros-toolbar [data-cobros-generate] { margin-left: auto; }

/* Insignia de esquema SEPA */
.allwr-billing__scheme { display: inline-flex; align-items: center; padding: 0.16rem 0.55rem; border-radius: 999px; font: 700 0.72rem 'Inter', system-ui, sans-serif; letter-spacing: 0.02em; }
.allwr-billing__scheme--core { background: color-mix(in srgb, var(--allwr-navy) 12%, #fff); color: var(--allwr-navy); border: 1px solid color-mix(in srgb, var(--allwr-navy) 24%, var(--allwr-line)); }
.allwr-billing__scheme--b2b { background: color-mix(in srgb, var(--allwr-gold) 16%, #fff); color: #7a5b12; border: 1px solid color-mix(in srgb, var(--allwr-gold) 45%, var(--allwr-line)); }

/* KPIs de informes */
.allwr-billing__kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.allwr-billing__kpi {
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 14px;
    padding: 0.95rem 1.05rem;
    border-top: 3px solid var(--allwr-navy);
    box-shadow: 0 1px 2px rgba(2,21,43,0.04);
}
.allwr-billing__kpi-label { display: block; color: var(--allwr-muted); font: 600 0.72rem 'Inter', system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; }
.allwr-billing__kpi-value { display: block; margin: 0.28rem 0 0.1rem; color: var(--allwr-navy); font: 750 1.5rem 'Satoshi', system-ui, sans-serif; overflow-wrap: anywhere; }
.allwr-billing__kpi-sub { display: block; color: var(--allwr-muted); font-size: 0.74rem; }
.allwr-billing__kpi--gold { border-top-color: var(--allwr-gold); }
.allwr-billing__kpi--green { border-top-color: #1E9E5A; }
.allwr-billing__kpi--green .allwr-billing__kpi-value { color: #1E7E34; }
.allwr-billing__kpi--red { border-top-color: #D14B43; }
.allwr-billing__kpi--red .allwr-billing__kpi-value { color: #C5221F; }
.allwr-billing__kpi--muted { border-top-color: var(--allwr-line); }

/* Rejilla de informes */
.allwr-billing__report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.allwr-billing__report-evolution,
.allwr-billing__report-overdue { grid-column: 1 / -1; }
.allwr-billing__chart { width: 100%; height: auto; display: block; }
.allwr-billing__chart-axis { fill: var(--allwr-muted); font: 500 10px 'Inter', system-ui, sans-serif; }
.allwr-billing__legend { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.allwr-billing__legend span { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--allwr-muted); font-size: 0.78rem; }
.allwr-billing__legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Donut de estado de pago */
.allwr-billing__donut-wrap { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.allwr-billing__donut { width: 180px; height: 180px; flex: 0 0 auto; }
.allwr-billing__donut-total { fill: var(--allwr-navy); font: 750 1.05rem 'Satoshi', system-ui, sans-serif; }
.allwr-billing__donut-sub { fill: var(--allwr-muted); font: 500 0.7rem 'Inter', system-ui, sans-serif; }
.allwr-billing__legend-list { list-style: none; margin: 0; padding: 0; flex: 1 1 160px; display: flex; flex-direction: column; gap: 0.4rem; }
.allwr-billing__legend-list li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--allwr-navy); }
.allwr-billing__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.allwr-billing__legend-label { flex: 1 1 auto; color: var(--allwr-muted); }
.allwr-billing__legend-val { font-weight: 700; }

/* Barras de top clientes */
.allwr-billing__bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.allwr-billing__bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 0.6rem; align-items: center; }
.allwr-billing__bar-name { color: var(--allwr-navy); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.allwr-billing__bar-track { background: color-mix(in srgb, var(--allwr-off-white) 40%, var(--allwr-line)); border-radius: 999px; height: 10px; overflow: hidden; }
.allwr-billing__bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--allwr-navy); }
.allwr-billing__bar-fill.is-top { background: var(--allwr-gold); }
.allwr-billing__bar-val { color: var(--allwr-navy); font: 700 0.8rem 'Inter', system-ui, sans-serif; white-space: nowrap; }
.allwr-billing__overdue-days { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 999px; background: color-mix(in srgb, #C5221F 12%, #fff); color: #C5221F; font: 700 0.74rem 'Inter', system-ui, sans-serif; }

@media (max-width: 900px) {
    .allwr-billing__report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .allwr-billing__header { flex-direction: column; padding: 1rem; }
    .allwr-billing__tabs,
    .allwr-billing__content { padding-left: 1rem; padding-right: 1rem; }
    .allwr-billing__toolbar,
    .allwr-billing__filters { align-items: stretch; flex-direction: column; }
    .allwr-billing__form-grid,
    .allwr-billing__acct-form-grid,
    .allwr-billing__custom-field,
    .allwr-billing__contact-card,
    .allwr-billing__contact-option,
    .allwr-billing__input-action,
    .allwr-billing__definition-grid,
    .allwr-billing__kpis,
    :is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates,
    :is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-parties,
    :is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-cols,
    .allwr-invoice-editor__payment,
    .allwr-invoice-editor__side { grid-template-columns: 1fr; }
    :is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-head { flex-direction: column; gap: 12px; }
    :is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-dates__col + .inv-dates__col { border-left: 0; padding-left: 8px; }
    .allwr-billing__detail,
    .allwr-invoice-editor__panel,
    .allwr-invoice-viewer__panel { width: 100vw; border-radius: 0; }
    .allwr-invoice-sheet,
    .allwr-invoice-editor__sheet,
    .allwr-invoice-viewer__sheet { min-height: auto; padding: 1.5rem; }
    .allwr-invoice-editor__body,
    .allwr-invoice-viewer__body { padding: 0.9rem; }
    :is(.allwr-invoice-sheet, .allwr-invoice-editor__sheet) .inv-head__doc { text-align: left; }
    .allwr-billing__cobros-toolbar { align-items: stretch; }
    .allwr-billing__cobros-toolbar [data-cobros-generate] { margin-left: 0; width: 100%; }
}

.allwr-mov-select-th,
.allwr-mov-select-cell {
    width: 46px;
    min-width: 46px;
    text-align: center !important;
    padding-left: 0.55rem !important;
    padding-right: 0.35rem !important;
}
.allwr-mov-select {
    width: 18px;
    height: 18px;
    accent-color: var(--allwr-navy, #02152B);
    cursor: pointer;
}
.allwr-mov-select:focus-visible {
    outline: 3px solid var(--allwr-gold-soft);
    outline-offset: 2px;
}
.allwr-mov-select:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.allwr-mov-attachment-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--allwr-muted, #4a5b6a);
}
.allwr-mov-attachment-icon__svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.8;
}
.allwr-mov-bank-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    width: 100%;
    margin: 0 0 0.9rem;
    padding: 0.8rem 1rem;
    background: #fff;
    border: 1px solid var(--allwr-line, #E6E2D8);
    border-radius: 14px;
}
.allwr-mov-bank-pdf-toolbar[hidden] {
    display: none;
}
.allwr-mov-bank-pdf-toolbar__count {
    color: var(--allwr-navy, #02152B);
    font: 700 0.92rem 'Inter', system-ui, sans-serif;
    white-space: nowrap;
}
.allwr-mov-bank-pdf-cta[hidden] {
    display: none;
}
.allwr-mov-bank-pdf-cta {
    white-space: nowrap;
}
@media (max-width: 760px) {
    .allwr-mov-bank-pdf-toolbar {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }
}

/* ============================================================================
   HR (RRHH) — internal tool, Wealthreader-only. Same visual system and
   component shapes as .allwr-billing__* (tabs, toolbar, table, slide-in
   detail drawer); own namespace so the two modules can diverge independently.
   ============================================================================ */
.allwr-hr {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 84px);
    background: var(--allwr-off-white);
}
.allwr-hr__tabs {
    display: flex;
    gap: 1.5rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--allwr-line);
    background: #fff;
    overflow-x: auto;
}
.allwr-hr__tab {
    appearance: none;
    flex: 0 0 auto;
    padding: 0.9rem 0 0.8rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--allwr-muted);
    font: 600 0.9rem 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: color var(--allwr-transition-fast), border-color var(--allwr-transition-fast);
}
.allwr-hr__tab:hover,
.allwr-hr__tab.is-active { color: var(--allwr-navy); }
.allwr-hr__tab.is-active { border-bottom-color: var(--allwr-gold); }
.allwr-hr__tab:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}

.allwr-hr__content { flex: 1; padding: 1.25rem 1.5rem 2rem; overflow: auto; }
.allwr-hr__section { display: none; }
.allwr-hr__section.is-active { display: block; }
.allwr-hr__section-head h2 { margin: 0 0 0.25rem; color: var(--allwr-navy); font: 750 1.2rem 'Satoshi', system-ui, sans-serif; }
.allwr-hr__section-head p { margin: 0 0 1rem; color: var(--allwr-muted); }

.allwr-hr__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.allwr-hr__filters { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.allwr-hr__input,
.allwr-hr__select {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: #fff;
    color: var(--allwr-navy);
    font: 400 0.9rem 'Inter', system-ui, sans-serif;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
textarea.allwr-hr__input { resize: vertical; min-height: 96px; line-height: 1.45; }
.allwr-hr__input:hover,
.allwr-hr__select:hover { border-color: color-mix(in srgb, var(--allwr-navy) 38%, var(--allwr-line)); }
.allwr-hr__input:focus-visible,
.allwr-hr__select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__toolbar .allwr-hr__input { min-width: min(320px, 100%); }
.allwr-hr__toolbar .allwr-hr__select { min-width: 200px; }

.allwr-hr__table-wrapper {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 14px 34px rgba(2,21,43,0.05);
}
.allwr-hr__table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font: 400 0.85rem 'Inter', system-ui, sans-serif;
}
.allwr-hr__table th {
    background: color-mix(in srgb, var(--allwr-off-white) 68%, #fff);
    text-align: left;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
}
.allwr-hr__table td {
    padding: 0.72rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-navy);
    vertical-align: middle;
}
.allwr-hr__table tr:last-child td { border-bottom: none; }
.allwr-hr__table tr.clickable { cursor: pointer; }
.allwr-hr__table tr.clickable:hover td,
.allwr-hr__table tr.is-selected td { background: color-mix(in srgb, var(--allwr-gold) 8%, #fff); }
.allwr-hr__table small { display: block; margin-top: 0.16rem; color: var(--allwr-muted); }
.allwr-hr__row-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-navy);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.allwr-hr__row-button:hover strong { text-decoration: underline; text-decoration-color: var(--allwr-gold); }
.allwr-hr__row-button span { color: var(--allwr-muted); font-size: 0.78rem; }

.allwr-hr__empty { padding: 1rem; color: var(--allwr-muted); text-align: center; }

/* Formulario de alta/edición de persona (dentro de .allwr-modal__body). */
.allwr-hr__form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.9rem;
}
.allwr-hr__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font: 600 0.78rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-muted);
}
.allwr-hr__field:has(textarea) { grid-column: 1 / -1; }
@media (max-width: 560px) {
    .allwr-hr__form-grid { grid-template-columns: 1fr; }
}
.allwr-hr__field--asset-ref { margin-top: 0.8rem; }

/* Picker de item de inventario para asset_ref: input de búsqueda + resultados,
   o chip con el item ya vinculado. Mismo patrón visual que
   .allwr-inventory__movement-* (public/assets/js/inventory.js) para que
   ambas herramientas se sientan consistentes. */
.allwr-hr__asset-ref-results {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.4rem;
    max-height: 220px;
    overflow: auto;
}
.allwr-hr__asset-ref-result {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: #fff;
    color: var(--allwr-navy);
    font: 400 0.82rem 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-hr__asset-ref-result:hover { border-color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 4%, #fff); }
.allwr-hr__asset-ref-result:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__asset-ref-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--allwr-gold) 6%, #fff);
    font: 400 0.82rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-navy);
}

/* Ficha de persona: cajón deslizante desde la derecha, mismo patrón que
   .allwr-billing__detail (transform translate3d, respeta prefers-reduced-motion
   vía --allwr-transition-slow). */
.allwr-hr__detail {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 960;
    width: min(92vw, 560px);
    min-width: 0;
    height: 100vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-right: none;
    border-radius: 22px 0 0 22px;
    padding: 1.15rem;
    box-shadow: -30px 0 80px rgba(2,21,43,0.22);
    transform: translate3d(104%, 0, 0);
    pointer-events: none;
    transition: transform var(--allwr-transition-slow), box-shadow var(--allwr-transition-slow);
    will-change: transform;
}
.allwr-hr__detail[hidden] { display: block; visibility: hidden; }
.allwr-hr__detail.is-open {
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}
.allwr-hr__detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-hr__eyebrow { margin: 0 0 0.3rem; }
.allwr-hr__detail-head h2 { margin: 0.1rem 0 0.2rem; color: var(--allwr-navy); font: 750 1.15rem/1.2 'Satoshi', system-ui, sans-serif; }
.allwr-hr__detail-head p { margin: 0; color: var(--allwr-muted); }
.allwr-hr__detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.allwr-hr__detail-close {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
    color: var(--allwr-navy);
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-hr__detail-close:hover { border-color: var(--allwr-navy); box-shadow: 0 6px 18px rgba(2,21,43,0.08); }
.allwr-hr__detail-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__detail-section { padding: 0.9rem 0; border-top: 1px solid var(--allwr-line); }
.allwr-hr__detail-section h3 { margin: 0 0 0.65rem; color: var(--allwr-navy); font: 750 0.95rem 'Satoshi', system-ui, sans-serif; }
.allwr-hr__definition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.9rem;
    margin: 0;
}
.allwr-hr__definition-item span { display: block; color: var(--allwr-muted); font-size: 0.72rem; }
.allwr-hr__definition-item strong { display: block; margin-top: 0.15rem; color: var(--allwr-navy); font: 700 0.9rem 'Inter', system-ui, sans-serif; overflow-wrap: anywhere; }

/* IBAN: enmascarado por defecto, botón "revelar" descifra bajo demanda. */
.allwr-hr__iban {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font: 700 0.9rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-navy);
}
.allwr-hr__iban-reveal {
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-gold-text, var(--allwr-navy));
    font: 700 0.78rem 'Inter', system-ui, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}
.allwr-hr__iban-reveal:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}

.allwr-hr__toast { z-index: 2200; }

.allwr-hr__badge--active { background: #E6F4EA; color: #1E7E34; }
.allwr-hr__badge--terminated { background: #FCE8E6; color: #C5221F; }
.allwr-hr__badge--candidate { background: #FFF4E5; color: #B45C00; }
.allwr-hr__badge--running { background: #FFF4E5; color: #B45C00; }
.allwr-hr__badge--break { background: #EDF1F6; color: #33506B; }
.allwr-hr__badge--requested { background: #F1F3F4; color: #5F6368; }
.allwr-hr__badge--approved { background: #E6F4EA; color: #1E7E34; }
.allwr-hr__badge--rejected { background: #FCE8E6; color: #C5221F; }
.allwr-hr__badge--cancelled { background: #F1F3F4; color: #5F6368; }

/* Fichaje + vacaciones (Fase 4): navegación de mes, tarjetas de resumen/saldo,
   acciones en fila y formulario de nueva solicitud. */
.allwr-hr__month-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.allwr-hr__month-nav-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
    color: var(--allwr-navy);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-hr__month-nav-btn:hover { border-color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 6%, #fff); }
.allwr-hr__month-nav-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__month-label {
    min-width: 9ch;
    text-align: center;
    color: var(--allwr-navy);
    font: 700 0.88rem 'Inter', system-ui, sans-serif;
    text-transform: capitalize;
}
.allwr-hr__clock-status { color: var(--allwr-muted); font-size: 0.8rem; }

/* Indicador de conformidad mensual (Fase 4b) en la pestaña de fichaje admin —
   sólo informativo: RRHH ve si la persona ya confirmó el mes, no confirma en
   su nombre (eso sólo lo hace la propia persona en la vista de autoservicio). */
.allwr-hr__ack-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.4rem 0 1rem;
}
.allwr-hr__ack-row[hidden] { display: none; }
.allwr-hr__ack-label { color: var(--allwr-muted); font: 600 0.78rem 'Inter', system-ui, sans-serif; }

.allwr-hr__time-summary,
.allwr-hr__vacation-balance,
.allwr-hr__payroll-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}
.allwr-hr__summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
}
.allwr-hr__summary-card span { color: var(--allwr-muted); font-size: 0.72rem; }
.allwr-hr__summary-card strong { color: var(--allwr-navy); font: 750 1.05rem 'Satoshi', system-ui, sans-serif; }

.allwr-hr__row-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.allwr-hr__icon-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--allwr-muted);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-hr__icon-btn:hover { color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 8%, #fff); }
.allwr-hr__icon-btn--danger:hover { color: #C5221F; background: color-mix(in srgb, #C5221F 10%, #fff); }
.allwr-hr__icon-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-gold-text, var(--allwr-navy));
    font: 700 0.78rem 'Inter', system-ui, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}
.allwr-hr__link-btn:hover {
    color: var(--allwr-navy);
}
.allwr-hr__link-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}

.allwr-hr__vacation-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.7rem;
    margin-bottom: 1rem;
    padding: 0.9rem;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
}
.allwr-hr__vacation-form .allwr-hr__field { flex: 1 1 160px; }

/* Pestañas de fases futuras (fichaje, vacaciones, nóminas, activos): tarjeta
   "en construcción" — nada interactivo, sólo estado informativo. */
.allwr-hr__placeholder {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    max-width: 520px;
    margin: 1.5rem auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2,21,43,0.10);
    text-align: left;
}
.allwr-hr__placeholder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-gold) 16%, #fff);
    color: var(--allwr-gold);
}
.allwr-hr__placeholder h3 { margin: 0; color: var(--allwr-navy); font: 750 1.05rem 'Satoshi', system-ui, sans-serif; }
.allwr-hr__placeholder p { margin: 0; color: var(--allwr-muted); font: 400 0.92rem/1.5 'Inter', system-ui, sans-serif; }

/* Adjuntos de la ficha de persona (Fase 3): contratos firmados, cartas de
   baja, nóminas, otros. Filas simples, sin thumbnails (documentos internos). */
.allwr-hr__attachments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.allwr-hr__attachment-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
}
.allwr-hr__attachment-kind {
    grid-row: 1 / 3;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--allwr-navy) 8%, #fff);
    color: var(--allwr-navy);
    font: 700 0.64rem 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
    white-space: nowrap;
}
.allwr-hr__attachment-name {
    grid-column: 2;
    color: var(--allwr-navy);
    font: 600 0.86rem 'Inter', system-ui, sans-serif;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color var(--allwr-transition-fast);
}
.allwr-hr__attachment-name:hover { color: var(--allwr-gold-text, var(--allwr-navy)); text-decoration: underline; }
.allwr-hr__attachment-name:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__attachment-meta {
    grid-column: 2;
    color: var(--allwr-muted);
    font-size: 0.72rem;
}
.allwr-hr__attachment-delete {
    grid-row: 1 / 3;
    grid-column: 3;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--allwr-muted);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-hr__attachment-delete:hover { color: #C5221F; background: color-mix(in srgb, #C5221F 10%, #fff); }
.allwr-hr__attachment-delete:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__attachment-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.allwr-hr__attachment-form .allwr-hr__select { width: auto; min-width: 150px; }
.allwr-hr__attachment-file {
    flex: 1 1 200px;
    min-width: 0;
    font: 400 0.82rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-navy);
}

/* Nóminas (Fase 5): aviso de estimación, enlace a ficha desde la tabla,
   marcador de bonus y fila de totales. Tarjetas KPI reutilizan
   .allwr-hr__summary-card (ver regla de grid arriba). */
.allwr-hr__disclaimer {
    margin: 0 0 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--allwr-gold) 8%, #fff);
    color: var(--allwr-muted);
    font: 400 0.82rem/1.5 'Inter', system-ui, sans-serif;
}
.allwr-hr__table--payroll { min-width: 960px; }
.allwr-hr__table small { color: var(--allwr-muted); font-size: 0.72rem; }
.allwr-hr__row-link {
    color: var(--allwr-navy);
    font: inherit;
    text-decoration: none;
    transition: color var(--allwr-transition-fast);
}
.allwr-hr__row-link:hover strong { text-decoration: underline; text-decoration-color: var(--allwr-gold); }
.allwr-hr__row-link:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-hr__bonus-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 0.4rem;
    border-radius: 999px;
    background: var(--allwr-gold);
    vertical-align: middle;
}
.allwr-hr__muted-hint { color: var(--allwr-muted); }
.allwr-hr__totals-row td {
    background: color-mix(in srgb, var(--allwr-off-white) 68%, #fff);
    color: var(--allwr-navy);
    font-weight: 700;
    border-top: 2px solid var(--allwr-line);
}

/* Activos asignados (Fase 6): badges de estado en uso/devuelto y lista
   compacta de sólo lectura reutilizada en el cajón de ficha de persona. */
.allwr-hr__badge--in-use { background: #E6F4EA; color: #1E7E34; }
.allwr-hr__badge--returned { background: #F1F3F4; color: #5F6368; }
.allwr-hr__assets-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.allwr-hr__asset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
}
.allwr-hr__asset-label { color: var(--allwr-navy); font: 600 0.86rem 'Inter', system-ui, sans-serif; overflow-wrap: anywhere; }

/* Autoservicio de fichaje (Fase 4b) — vista reducida para empleados
   Wealthreader que no son admin de RRHH. Reutiliza .allwr-hr__* para tabla,
   resumen, badges y placeholder; sólo añade el layout propio de la página. */
.allwr-hr-self {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
}
.allwr-hr-self__header { margin-bottom: 1.25rem; }
.allwr-hr-self__header h1 { margin: 0 0 0.3rem; color: var(--allwr-navy); font: 750 1.4rem 'Satoshi', system-ui, sans-serif; }
.allwr-hr-self__header p { margin: 0; color: var(--allwr-muted); }
.allwr-hr-self__clock-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2,21,43,0.10);
}
.allwr-hr-self__clock-btn { padding: 0.85rem 1.6rem; font-size: 1rem; }
.allwr-hr-self__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.allwr-hr-self__ack-card { margin-top: 1rem; }

@media (max-width: 760px) {
    .allwr-hr__detail { width: 100vw; border-radius: 0; }
    .allwr-hr__definition-grid { grid-template-columns: 1fr; }
    .allwr-hr-self__clock-card { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .allwr-hr__tab,
    .allwr-hr__input,
    .allwr-hr__select,
    .allwr-hr__detail-close,
    .allwr-hr__attachment-name,
    .allwr-hr__attachment-delete,
    .allwr-hr__month-nav-btn,
    .allwr-hr__icon-btn,
    .allwr-hr__row-link { transition-duration: 0.01ms !important; }
    .allwr-hr__detail { transition-duration: 0.01ms !important; }
}

/* ============================================================================
   PROVEEDORES V2 — directorio completo (ficha ERP + facturación derivada +
   credenciales cifradas). Mismo sistema visual y misma forma de componente
   que .allwr-hr__* (toolbar, tabla, cajón deslizante de detalle); namespace
   propio para que ambos módulos puedan divergir con independencia.
   ============================================================================ */
.allwr-suppliers {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 84px);
    background: var(--allwr-off-white);
}
.allwr-suppliers__content { flex: 1; padding: 1.25rem 1.5rem 2rem; overflow: auto; }

.allwr-suppliers__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.allwr-suppliers__filters { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.allwr-suppliers__input,
.allwr-suppliers__select {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: #fff;
    color: var(--allwr-navy);
    font: 400 0.9rem 'Inter', system-ui, sans-serif;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
textarea.allwr-suppliers__input { resize: vertical; min-height: 96px; line-height: 1.45; }
.allwr-suppliers__input:hover,
.allwr-suppliers__select:hover { border-color: color-mix(in srgb, var(--allwr-navy) 38%, var(--allwr-line)); }
.allwr-suppliers__input:focus-visible,
.allwr-suppliers__select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-suppliers__toolbar .allwr-suppliers__input { min-width: min(320px, 100%); }
.allwr-suppliers__toolbar .allwr-suppliers__select { min-width: 200px; }

.allwr-suppliers__table-wrapper {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 14px 34px rgba(2,21,43,0.05);
}
.allwr-suppliers__table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font: 400 0.85rem 'Inter', system-ui, sans-serif;
}
.allwr-suppliers__table th {
    background: color-mix(in srgb, var(--allwr-off-white) 68%, #fff);
    text-align: left;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
}
.allwr-suppliers__table td {
    padding: 0.72rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-navy);
    vertical-align: middle;
}
.allwr-suppliers__table tr:last-child td { border-bottom: none; }
.allwr-suppliers__table tr.clickable { cursor: pointer; }
.allwr-suppliers__table tr.clickable:hover td,
.allwr-suppliers__table tr.is-selected td { background: color-mix(in srgb, var(--allwr-gold) 8%, #fff); }
.allwr-suppliers__row-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-navy);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.allwr-suppliers__row-button:hover strong { text-decoration: underline; text-decoration-color: var(--allwr-gold); }
.allwr-suppliers__row-button span { color: var(--allwr-muted); font-size: 0.78rem; }

.allwr-suppliers__empty { padding: 1rem; color: var(--allwr-muted); text-align: center; }

/* Formulario de alta/edición de proveedor (dentro de .allwr-modal__body). */
.allwr-suppliers__form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.9rem;
}
.allwr-suppliers__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font: 600 0.78rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-muted);
}
.allwr-suppliers__field:has(textarea) { grid-column: 1 / -1; }
@media (max-width: 560px) {
    .allwr-suppliers__form-grid { grid-template-columns: 1fr; }
}

/* Ficha de proveedor: cajón deslizante desde la derecha, mismo patrón que
   .allwr-hr__detail (transform translate3d, respeta prefers-reduced-motion). */
.allwr-suppliers__detail {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 960;
    width: min(92vw, 560px);
    min-width: 0;
    height: 100vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-right: none;
    border-radius: 22px 0 0 22px;
    padding: 1.15rem;
    box-shadow: -30px 0 80px rgba(2,21,43,0.22);
    transform: translate3d(104%, 0, 0);
    pointer-events: none;
    transition: transform var(--allwr-transition-slow), box-shadow var(--allwr-transition-slow);
    will-change: transform;
}
.allwr-suppliers__detail[hidden] { display: block; visibility: hidden; }
.allwr-suppliers__detail.is-open {
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}
.allwr-suppliers__detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-suppliers__detail-head h2 { margin: 0.1rem 0 0.2rem; color: var(--allwr-navy); font: 750 1.15rem/1.2 'Satoshi', system-ui, sans-serif; }
.allwr-suppliers__detail-head p { margin: 0; color: var(--allwr-muted); }
.allwr-suppliers__detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.allwr-suppliers__detail-close {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
    color: var(--allwr-navy);
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-suppliers__detail-close:hover { border-color: var(--allwr-navy); box-shadow: 0 6px 18px rgba(2,21,43,0.08); }
.allwr-suppliers__detail-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-suppliers__detail-section { padding: 0.9rem 0; border-top: 1px solid var(--allwr-line); }
.allwr-suppliers__detail-section h3 { margin: 0 0 0.65rem; color: var(--allwr-navy); font: 750 0.95rem 'Satoshi', system-ui, sans-serif; }
.allwr-suppliers__definition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.9rem;
    margin: 0;
}
.allwr-suppliers__definition-item span { display: block; color: var(--allwr-muted); font-size: 0.72rem; }
.allwr-suppliers__definition-item strong { display: block; margin-top: 0.15rem; color: var(--allwr-navy); font: 700 0.9rem 'Inter', system-ui, sans-serif; overflow-wrap: anywhere; }

/* Movimientos recientes: filas simples con enlace a /m/<uuid> (permalink
   server-side existente — ver AGENTS.md "Permalinks y deep-linking"). */
.allwr-suppliers__movements { display: flex; flex-direction: column; gap: 0.4rem; }
.allwr-suppliers__movement-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: var(--allwr-navy);
    transition: border-color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-suppliers__movement-row:hover { border-color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 4%, #fff); }
.allwr-suppliers__movement-row:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-suppliers__movement-date { color: var(--allwr-muted); font-size: 0.78rem; white-space: nowrap; }
.allwr-suppliers__movement-desc { font: 600 0.86rem 'Inter', system-ui, sans-serif; overflow-wrap: anywhere; }
.allwr-suppliers__movement-amount { font: 700 0.9rem 'Inter', system-ui, sans-serif; white-space: nowrap; }

/* Credenciales: contraseña enmascarada por defecto, reveal + copy bajo demanda
   (mismo criterio de seguridad que .allwr-hr__iban). */
.allwr-suppliers__credentials { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.allwr-suppliers__credential-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem 0.7rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
}
.allwr-suppliers__credential-label { color: var(--allwr-navy); font: 700 0.86rem 'Inter', system-ui, sans-serif; }
.allwr-suppliers__credential-meta { color: var(--allwr-muted); font-size: 0.76rem; }
.allwr-suppliers__credential-secret {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font: 600 0.86rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-navy);
}
.allwr-suppliers__credential-actions { display: flex; align-items: center; gap: 0.4rem; }
.allwr-suppliers__link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-gold-text, var(--allwr-navy));
    font: 700 0.78rem 'Inter', system-ui, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}
.allwr-suppliers__link-btn:hover { color: var(--allwr-navy); }
.allwr-suppliers__link-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-suppliers__icon-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--allwr-muted);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-suppliers__icon-btn:hover { color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 8%, #fff); }
.allwr-suppliers__icon-btn--danger:hover { color: #C5221F; background: color-mix(in srgb, #C5221F 10%, #fff); }
.allwr-suppliers__icon-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-suppliers__badge--yes { background: #E6F4EA; color: #1E7E34; }
.allwr-suppliers__badge--no { background: #F1F3F4; color: #5F6368; }

.allwr-suppliers__toast { z-index: 2200; }

@media (max-width: 760px) {
    .allwr-suppliers__detail { width: 100vw; border-radius: 0; }
    .allwr-suppliers__definition-grid { grid-template-columns: 1fr; }
    .allwr-suppliers__form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .allwr-suppliers__input,
    .allwr-suppliers__select,
    .allwr-suppliers__detail-close,
    .allwr-suppliers__movement-row,
    .allwr-suppliers__icon-btn,
    .allwr-suppliers__link-btn { transition-duration: 0.01ms !important; }
    .allwr-suppliers__detail { transition-duration: 0.01ms !important; }
}

/* ============================================================================
   Inventario — mismo sistema visual que Proveedores (.allwr-suppliers__*):
   cajón deslizante, tabla clicable, formulario en grid. Ver AGENTS.md
   "Motion, hover y accesibilidad" para las reglas de hover/reduced-motion.
   ============================================================================ */
.allwr-inventory {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 84px);
    background: var(--allwr-off-white);
}
.allwr-inventory__content { flex: 1; padding: 1.25rem 1.5rem 2rem; overflow: auto; }

.allwr-inventory__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.allwr-inventory__filters { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.allwr-inventory__input,
.allwr-inventory__select {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.75rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: #fff;
    color: var(--allwr-navy);
    font: 400 0.9rem 'Inter', system-ui, sans-serif;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
textarea.allwr-inventory__input { resize: vertical; min-height: 96px; line-height: 1.45; }
.allwr-inventory__input:hover,
.allwr-inventory__select:hover { border-color: color-mix(in srgb, var(--allwr-navy) 38%, var(--allwr-line)); }
.allwr-inventory__input:focus-visible,
.allwr-inventory__select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-inventory__toolbar .allwr-inventory__input { min-width: min(280px, 100%); }
.allwr-inventory__toolbar .allwr-inventory__select { min-width: 180px; }

.allwr-inventory__table-wrapper {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 14px 34px rgba(2,21,43,0.05);
}
.allwr-inventory__table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font: 400 0.85rem 'Inter', system-ui, sans-serif;
}
.allwr-inventory__table th {
    background: color-mix(in srgb, var(--allwr-off-white) 68%, #fff);
    text-align: left;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
}
.allwr-inventory__table td {
    padding: 0.72rem 0.75rem;
    border-bottom: 1px solid var(--allwr-line);
    color: var(--allwr-navy);
    vertical-align: middle;
}
.allwr-inventory__table tr:last-child td { border-bottom: none; }
.allwr-inventory__table tr.clickable { cursor: pointer; }
.allwr-inventory__table tr.clickable:hover td,
.allwr-inventory__table tr.is-selected td { background: color-mix(in srgb, var(--allwr-gold) 8%, #fff); }
.allwr-inventory__row-button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-navy);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.allwr-inventory__row-button:hover strong { text-decoration: underline; text-decoration-color: var(--allwr-gold); }

.allwr-inventory__empty { padding: 1rem; color: var(--allwr-muted); text-align: center; }
.allwr-inventory__muted { margin: 0 0 0.5rem; color: var(--allwr-muted); font-size: 0.82rem; }

/* Badges de estado (in_stock/assigned/repair/retired/lost). */
.allwr-inventory__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font: 700 0.72rem 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.allwr-inventory__badge--in_stock { background: #E6F4EA; color: #1E7E34; }
.allwr-inventory__badge--assigned { background: color-mix(in srgb, var(--allwr-gold) 18%, #fff); color: var(--allwr-gold-text, #8a6413); }
.allwr-inventory__badge--repair   { background: #FEF7E0; color: #B06000; }
.allwr-inventory__badge--retired  { background: #F1F3F4; color: #5F6368; }
.allwr-inventory__badge--lost     { background: #FCE8E6; color: #C5221F; }

/* Formulario de alta/edición (dentro de .allwr-modal__body). */
.allwr-inventory__form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.9rem;
}
.allwr-inventory__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font: 600 0.78rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-muted);
}
.allwr-inventory__field:has(textarea) { grid-column: 1 / -1; }
.allwr-inventory__field--movement { margin-top: 0.8rem; }
.allwr-inventory__field--movement small { color: var(--allwr-muted); font-weight: 400; }
@media (max-width: 560px) {
    .allwr-inventory__form-grid { grid-template-columns: 1fr; }
}

/* Picker de movimiento: input de búsqueda + resultados o chip seleccionado. */
.allwr-inventory__movement-results {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.4rem;
    max-height: 220px;
    overflow: auto;
}
.allwr-inventory__movement-result {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: #fff;
    color: var(--allwr-navy);
    font: 400 0.82rem 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-inventory__movement-result:hover { border-color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 4%, #fff); }
.allwr-inventory__movement-result:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-inventory__movement-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--allwr-line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--allwr-gold) 6%, #fff);
    font: 400 0.82rem 'Inter', system-ui, sans-serif;
    color: var(--allwr-navy);
}

/* Ficha de item: cajón deslizante desde la derecha, mismo patrón que
   .allwr-suppliers__detail (transform translate3d, respeta prefers-reduced-motion). */
.allwr-inventory__detail {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 960;
    width: min(92vw, 560px);
    min-width: 0;
    height: 100vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--allwr-line);
    border-right: none;
    border-radius: 22px 0 0 22px;
    padding: 1.15rem;
    box-shadow: -30px 0 80px rgba(2,21,43,0.22);
    transform: translate3d(104%, 0, 0);
    pointer-events: none;
    transition: transform var(--allwr-transition-slow), box-shadow var(--allwr-transition-slow);
    will-change: transform;
}
.allwr-inventory__detail[hidden] { display: block; visibility: hidden; }
.allwr-inventory__detail.is-open {
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}
.allwr-inventory__detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--allwr-line);
}
.allwr-inventory__detail-head h2 { margin: 0.1rem 0 0.2rem; color: var(--allwr-navy); font: 750 1.15rem/1.2 'Satoshi', system-ui, sans-serif; }
.allwr-inventory__detail-head p { margin: 0; }
.allwr-inventory__detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.allwr-inventory__detail-close {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--allwr-line);
    border-radius: 999px;
    background: #fff;
    color: var(--allwr-navy);
    cursor: pointer;
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-inventory__detail-close:hover { border-color: var(--allwr-navy); box-shadow: 0 6px 18px rgba(2,21,43,0.08); }
.allwr-inventory__detail-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-inventory__detail-section { padding: 0.9rem 0; border-top: 1px solid var(--allwr-line); }
.allwr-inventory__detail-section h3 { margin: 0 0 0.65rem; color: var(--allwr-navy); font: 750 0.95rem 'Satoshi', system-ui, sans-serif; }
.allwr-inventory__definition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.9rem;
    margin: 0 0 0.6rem;
}
.allwr-inventory__definition-item span { display: block; color: var(--allwr-muted); font-size: 0.72rem; }
.allwr-inventory__definition-item strong { display: block; margin-top: 0.15rem; color: var(--allwr-navy); font: 700 0.9rem 'Inter', system-ui, sans-serif; overflow-wrap: anywhere; }

/* Movimiento vinculado: enlace a /m/<uuid> (permalink server-side existente —
   ver AGENTS.md "Permalinks y deep-linking"). */
.allwr-inventory__movement-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--allwr-line);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: var(--allwr-navy);
    transition: border-color var(--allwr-transition-fast), background-color var(--allwr-transition-fast);
}
.allwr-inventory__movement-row:hover { border-color: var(--allwr-navy); background: color-mix(in srgb, var(--allwr-navy) 4%, #fff); }
.allwr-inventory__movement-row:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}
.allwr-inventory__movement-date { color: var(--allwr-muted); font-size: 0.78rem; white-space: nowrap; }
.allwr-inventory__movement-desc { font: 600 0.86rem 'Inter', system-ui, sans-serif; overflow-wrap: anywhere; }
.allwr-inventory__movement-amount { font: 700 0.9rem 'Inter', system-ui, sans-serif; white-space: nowrap; }

.allwr-inventory__link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--allwr-gold-text, var(--allwr-navy));
    font: 700 0.82rem 'Inter', system-ui, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}
.allwr-inventory__link-btn:hover { color: var(--allwr-navy); }
.allwr-inventory__link-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--allwr-gold) 45%, transparent);
    outline-offset: 2px;
}

.allwr-inventory__assoc-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.6rem;
}
.allwr-inventory__history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}
.allwr-inventory__history li { color: var(--allwr-navy); font-size: 0.86rem; line-height: 1.45; }

.allwr-inventory__toast { z-index: 2200; }

@media (max-width: 760px) {
    .allwr-inventory__detail { width: 100vw; border-radius: 0; }
    .allwr-inventory__definition-grid { grid-template-columns: 1fr; }
    .allwr-inventory__form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .allwr-inventory__input,
    .allwr-inventory__select,
    .allwr-inventory__detail-close,
    .allwr-inventory__movement-row,
    .allwr-inventory__movement-result,
    .allwr-inventory__link-btn { transition-duration: 0.01ms !important; }
    .allwr-inventory__detail { transition-duration: 0.01ms !important; }
}

/* -----------------------------------------------------------------
   Web pública generada (src/web_content.php): producto, comparativas,
   integraciones, sectores, herramientas y bancos. Prefijo allwr-web-.
   Hover según la tabla de §Motion: tarjetas = sombra + borde, sin transform.
----------------------------------------------------------------- */
.allwr-web-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); }
.allwr-web-hero h1 {
    margin: 0.6rem 0 1rem;
    font-family: var(--allwr-font);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.06;
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    color: var(--allwr-navy);
}
.allwr-web-plus { color: var(--allwr-gold-deep); font-weight: 500; }
.allwr-web-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}
@media (max-width: 920px) { .allwr-web-hero__grid { grid-template-columns: 1fr; } }
.allwr-web-hero__summary { margin: 0 0 1.5rem; max-width: 40rem; color: var(--allwr-text-strong); line-height: 1.65; }
.allwr-web-hero__aside {
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius);
    padding: 1.5rem;
    box-shadow: var(--allwr-shadow-soft);
    display: grid;
    gap: 1rem;
}
.allwr-web-hero__aside--bank { justify-items: center; text-align: center; }
.allwr-web-hero__icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 16px;
    background: var(--allwr-off-white);
    color: var(--allwr-gold-deep);
}
.allwr-web-hero__icon svg { width: 28px; height: 28px; }
.allwr-web-bank-logo { width: 96px; height: 96px; object-fit: contain; border-radius: 20px; background: var(--allwr-off-white); padding: 0.75rem; }
.allwr-web-proof { margin: 0; display: grid; gap: 0.15rem; }
.allwr-web-proof strong { font-family: var(--allwr-font); font-weight: 900; font-size: 2rem; letter-spacing: -0.03em; color: var(--allwr-navy); line-height: 1; }
.allwr-web-proof span { color: var(--allwr-text-strong); font-size: 0.92rem; }
.allwr-web-regulatory { border-top: 1px solid var(--allwr-line); padding-top: 1rem; }
.allwr-web-regulatory p { margin: 0; color: var(--allwr-text-strong); font-size: 0.93rem; line-height: 1.55; }
.allwr-web-hero__aside .allwr-web-regulatory__title,
.allwr-web-regulatory__title {
    margin: 0 0 0.35rem;
    color: var(--allwr-gold-deep);
    font-family: var(--allwr-font);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.allwr-web-breadcrumb { display: flex; gap: 0.5rem; margin: 0 0 1rem; font-size: 0.85rem; color: var(--allwr-muted); }
.allwr-web-breadcrumb a { color: var(--allwr-text-strong); text-decoration: none; position: relative; }
.allwr-web-breadcrumb a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--allwr-gold); transform: scaleX(0); transform-origin: left;
    transition: transform var(--allwr-transition-base);
}
.allwr-web-breadcrumb a:hover::after { transform: scaleX(1); }

.allwr-web-h2 {
    margin: 0 0 1.25rem;
    font-family: var(--allwr-font);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    color: var(--allwr-navy);
}
.allwr-web-h2 small { font-size: 0.6em; color: var(--allwr-muted); font-weight: 500; margin-left: 0.5rem; }
.allwr-web-band { background: var(--allwr-card); border-top: 1px solid var(--allwr-line); border-bottom: 1px solid var(--allwr-line); }
.allwr-web-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }

.allwr-web-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.allwr-web-bullets li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--allwr-text-strong); line-height: 1.55; }
.allwr-web-bullets svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 0.2rem; color: var(--allwr-gold-deep); }
.allwr-web-bullets--neutral svg { color: var(--allwr-muted); }

.allwr-web-panel { background: var(--allwr-card); border: 1px solid var(--allwr-line); border-radius: var(--allwr-radius); padding: 1.6rem; }
.allwr-web-panel--gold { border-color: var(--allwr-gold-soft); background: linear-gradient(180deg, #FFFDF6 0%, var(--allwr-card) 100%); }

.allwr-web-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.allwr-web-links--wrap { display: flex; flex-wrap: wrap; }
.allwr-web-links a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius-pill);
    background: var(--allwr-off-white);
    color: var(--allwr-navy);
    font-size: 0.9rem; font-weight: 500;
    text-decoration: none;
    transition: border-color var(--allwr-transition-fast), background var(--allwr-transition-fast);
}
.allwr-web-links a:hover { border-color: var(--allwr-navy); background: var(--allwr-card); }
.allwr-web-links a svg, .allwr-web-links a img { width: 16px; height: 16px; color: var(--allwr-gold-deep); object-fit: contain; }

.allwr-web-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.allwr-web-grid--dense { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.allwr-web-card {
    display: block;
    background: var(--allwr-card);
    border: 1px solid var(--allwr-line);
    border-radius: var(--allwr-radius);
    padding: 1.35rem 1.3rem;
    box-shadow: var(--allwr-shadow-soft);
    color: inherit; text-decoration: none;
    transition: box-shadow var(--allwr-transition-base), border-color var(--allwr-transition-base);
}
.allwr-web-card:hover { border-color: var(--allwr-line-strong); box-shadow: var(--allwr-shadow); }
.allwr-web-card:focus-visible { outline: 3px solid var(--allwr-gold-soft); outline-offset: 3px; }
.allwr-web-card__icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--allwr-off-white); color: var(--allwr-gold-deep); margin-bottom: 0.85rem; }
.allwr-web-card__icon svg { width: 20px; height: 20px; }
.allwr-web-card__logo { display: block; width: 40px; height: 40px; object-fit: contain; margin-bottom: 0.85rem; }
.allwr-web-card h3 { margin: 0 0 0.35rem; font-family: var(--allwr-font); font-weight: 700; font-size: 1.02rem; color: var(--allwr-navy); letter-spacing: -0.01em; }
.allwr-web-card p { margin: 0; color: var(--allwr-text-strong); font-size: 0.9rem; line-height: 1.5; }
.allwr-web-empty { color: var(--allwr-text-strong); }

.allwr-web-facts { margin: 0; display: grid; gap: 0.8rem; }
.allwr-web-facts dt { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--allwr-muted); font-weight: 700; }
.allwr-web-facts dd { margin: 0.15rem 0 0; color: var(--allwr-navy); font-weight: 500; line-height: 1.45; }
.allwr-web-facts__link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--allwr-text-strong); font-size: 0.9rem; }
.allwr-web-facts__link svg { width: 14px; height: 14px; }

.allwr-web-matrix-wrap { overflow-x: auto; }
.allwr-web-matrix { width: 100%; border-collapse: collapse; background: var(--allwr-card); border: 1px solid var(--allwr-line); border-radius: var(--allwr-radius-sm); overflow: hidden; }
.allwr-web-matrix th, .allwr-web-matrix td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--allwr-line); font-size: 0.93rem; }
.allwr-web-matrix thead th { background: var(--allwr-off-white); font-family: var(--allwr-font); font-weight: 700; color: var(--allwr-navy); }
.allwr-web-matrix tbody th { font-weight: 500; color: var(--allwr-navy); }
.allwr-web-matrix tbody th a { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.allwr-web-matrix tbody th a svg { width: 16px; height: 16px; color: var(--allwr-gold-deep); }
.allwr-web-matrix td svg { width: 18px; height: 18px; }
.allwr-web-matrix__yes { color: var(--allwr-gold-deep); }
.allwr-web-matrix__no { color: var(--allwr-muted); }
.allwr-web-matrix--numbers td, .allwr-web-matrix--numbers th { text-align: right; font-variant-numeric: tabular-nums; }
.allwr-web-matrix--numbers td:first-child, .allwr-web-matrix--numbers th:first-child { text-align: left; }
.allwr-web-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.allwr-web-verdict { margin-top: 1.5rem; padding: 1.4rem 1.6rem; border-radius: var(--allwr-radius); background: var(--allwr-navy); color: var(--allwr-off-white); }
.allwr-web-verdict h3 { margin: 0 0 0.4rem; font-family: var(--allwr-font); color: var(--allwr-gold); font-size: 1.05rem; }
.allwr-web-verdict p { margin: 0; line-height: 1.6; }
.allwr-web-disclaimer { margin: 1rem 0 0; color: var(--allwr-muted); font-size: 0.82rem; line-height: 1.5; }

.allwr-web-faq { display: grid; gap: 0.6rem; }
.allwr-web-faq__item { background: var(--allwr-card); border: 1px solid var(--allwr-line); border-radius: var(--allwr-radius-sm); padding: 0.2rem 1.2rem; }
.allwr-web-faq__item summary { cursor: pointer; padding: 0.85rem 0; font-family: var(--allwr-font); font-weight: 700; color: var(--allwr-navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.allwr-web-faq__item summary::-webkit-details-marker { display: none; }
.allwr-web-faq__item summary::after { content: "+"; color: var(--allwr-gold-deep); font-weight: 500; }
.allwr-web-faq__item[open] summary::after { content: "−"; }
.allwr-web-faq__item p { margin: 0 0 1rem; color: var(--allwr-text-strong); line-height: 1.6; }

.allwr-web-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; counter-reset: step; }
.allwr-web-steps li { display: grid; gap: 0.6rem; background: var(--allwr-card); border: 1px solid var(--allwr-line); border-radius: var(--allwr-radius); padding: 1.4rem; }
.allwr-web-steps li > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--allwr-navy); color: var(--allwr-gold); font-family: var(--allwr-font); font-weight: 700; }
.allwr-web-steps p { margin: 0; color: var(--allwr-text-strong); line-height: 1.55; }
.allwr-web-badges { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.allwr-web-badges li { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.85rem; border-radius: var(--allwr-radius-pill); background: var(--allwr-card); border: 1px solid var(--allwr-line); font-size: 0.85rem; color: var(--allwr-navy); }
.allwr-web-badges svg { width: 14px; height: 14px; color: var(--allwr-gold-deep); }

/* Herramientas (calculadoras) */
.allwr-web-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .allwr-web-tool { grid-template-columns: 1fr; } }
.allwr-web-tool__form { display: grid; gap: 1rem; background: var(--allwr-card); border: 1px solid var(--allwr-line); border-radius: var(--allwr-radius); padding: 1.6rem; }
.allwr-web-tool__field { display: grid; gap: 0.35rem; }
.allwr-web-tool__field label { font-size: 0.86rem; font-weight: 600; color: var(--allwr-navy); }
.allwr-web-tool__field input, .allwr-web-tool__field select {
    font: inherit; padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--allwr-line-strong); border-radius: var(--allwr-radius-sm);
    background: var(--allwr-off-white); color: var(--allwr-navy);
    transition: border-color var(--allwr-transition-fast), box-shadow var(--allwr-transition-fast);
}
.allwr-web-tool__field input:focus-visible, .allwr-web-tool__field select:focus-visible { outline: none; border-color: var(--allwr-navy); box-shadow: 0 0 0 3px var(--allwr-gold-soft); }
.allwr-web-tool__results { position: sticky; top: 1.5rem; display: grid; gap: 1rem; background: var(--allwr-navy); color: var(--allwr-off-white); border-radius: var(--allwr-radius); padding: 1.6rem; }
.allwr-web-tool__results .allwr-eyebrow { color: var(--allwr-gold); }
.allwr-web-tool__results dl { margin: 0; display: grid; gap: 0.9rem; }
.allwr-web-tool__results dt { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.allwr-web-tool__results dd { margin: 0.1rem 0 0; font-family: var(--allwr-font); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.allwr-web-tool__results dl > div:first-child dd, .allwr-web-tool__results dl > div:last-child dd { color: var(--allwr-gold); }
.allwr-web-tool__results .allwr-web-disclaimer { color: var(--allwr-off-white); opacity: 0.75; }
.allwr-web-tool__results h3 { margin: 0 0 0.5rem; font-family: var(--allwr-font); font-size: 0.95rem; color: var(--allwr-gold); }
.allwr-web-tool__results .allwr-web-matrix { background: transparent; border-color: rgba(248, 247, 244, 0.2); }
.allwr-web-tool__results .allwr-web-matrix th, .allwr-web-tool__results .allwr-web-matrix td { border-color: rgba(248, 247, 244, 0.15); color: var(--allwr-off-white); font-size: 0.85rem; padding: 0.5rem 0.6rem; }
.allwr-web-tool__results .allwr-web-matrix thead th { background: rgba(248, 247, 244, 0.08); color: var(--allwr-gold); }

/* Banda CTA de cierre */
.allwr-web-cta__inner {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem;
    background: var(--allwr-navy); color: var(--allwr-off-white);
    border-radius: var(--allwr-radius); padding: clamp(1.75rem, 4vw, 3rem);
}
.allwr-web-cta__inner .allwr-eyebrow { color: var(--allwr-gold); }
.allwr-web-cta__inner h2 { margin: 0.4rem 0 0.4rem; color: var(--allwr-off-white); font-family: var(--allwr-font); font-weight: 900; letter-spacing: -0.03em; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.allwr-web-cta__inner p { margin: 0; opacity: 0.85; max-width: 38rem; }
.allwr-web-cta__ghost { color: var(--allwr-off-white); border-color: var(--allwr-off-white); }
.allwr-web-cta__ghost:hover { background: var(--allwr-off-white); color: var(--allwr-navy); }

@media (prefers-reduced-motion: reduce) {
    .allwr-web-card, .allwr-web-links a, .allwr-web-breadcrumb a::after,
    .allwr-web-tool__field input, .allwr-web-tool__field select { transition-duration: 0.01ms !important; }
    .allwr-web-breadcrumb a::after { transform: none !important; }
}
