/* ==========================================================================
   Bvsoft brand pages (apps/web)
   A small subset of the design system in apps/admin/public/css/bv.css: same
   tokens, same look, for the public pages that live here (e.g. the stats
   email unsubscribe screens). Keep the token values in sync with bv.css.
   ========================================================================== */

:root {
    color-scheme: light;

    --bv-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bv-navy:     #1F2A4D;
    --bv-forest:   #1F6B3A;
    --bv-olive:    #7A7D35;
    --bv-ochre:    #C8962E;
    --bv-burgundy: #7A1E3A;

    --bv-bg:            #F6F4EE;
    --bv-surface:       #FFFFFF;
    --bv-surface-2:     #F1EEE6;
    --bv-border:        #E4DFD3;
    --bv-text:          #1B2340;
    --bv-text-muted:    #575E75;
    --bv-text-subtle:   #7E8497;

    --bv-primary:        var(--bv-forest);
    --bv-on-primary:     #FFFFFF;
    --bv-primary-soft:   #E1EFE5;
    --bv-on-primary-soft:#134325;

    --bv-accent-soft:    #FAEFD6;
    --bv-on-accent-soft: #6A4A0C;
    --bv-danger-soft:    #F8E3E9;
    --bv-on-danger-soft: #6E1030;

    --bv-radius-md: 14px;
    --bv-radius-xl: 28px;
    --bv-radius-full: 999px;

    --bv-shadow-lg: 0 24px 48px -16px rgba(27, 35, 64, .28);
    --bv-focus: 0 0 0 3px color-mix(in srgb, var(--bv-primary) 35%, transparent);
    --bv-ease: cubic-bezier(.2, 0, 0, 1);
}

:root[data-app="finance"] {
    --bv-primary:        #1F3A6E;
    --bv-primary-soft:   #E3E9F5;
    --bv-on-primary-soft:#15284D;
    --bv-bg:             #F5F6F8;
    --bv-surface-2:      #EEF1F5;
    --bv-border:         #DFE4EC;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --bv-bg:          #0E1322;
        --bv-surface:     #151B2E;
        --bv-surface-2:   #1C2339;
        --bv-border:      #29314D;
        --bv-text:        #EDEFF6;
        --bv-text-muted:  #A9AFC4;
        --bv-text-subtle: #7F869D;

        --bv-primary:        #5BC285;
        --bv-on-primary:     #06210F;
        --bv-primary-soft:   #173424;
        --bv-on-primary-soft:#BFEBD0;

        --bv-accent-soft:    #372B12;
        --bv-on-accent-soft: #F5DDA6;
        --bv-danger-soft:    #3B1626;
        --bv-on-danger-soft: #FFC9D6;

        --bv-shadow-lg: 0 28px 56px -18px rgba(0, 0, 0, .75);
    }

    :root[data-app="finance"] {
        --bv-primary:        #8FB0F0;
        --bv-on-primary:     #0A1730;
        --bv-primary-soft:   #1B2A4A;
        --bv-on-primary-soft:#C9D8F7;
        --bv-bg:             #0C111E;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bv-bg);
    color: var(--bv-text);
    font-family: var(--bv-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--bv-primary); font-weight: 700; }

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 40;
}

/* Page ------------------------------------------------------------------- */

.brand-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 40px 16px;
    overflow: hidden;
    isolation: isolate;
}

/* Diagonal stripes echoing the logo, like the admin login panel. */
.brand-page__stripes {
    position: absolute;
    inset: -20% -10% auto auto;
    width: min(720px, 110vw);
    z-index: -1;
    opacity: .9;
    pointer-events: none;
}

.brand-card {
    width: 100%;
    max-width: 480px;
    background: var(--bv-surface);
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-xl);
    box-shadow: var(--bv-shadow-lg);
    padding: 36px 32px 30px;
    text-align: center;
    animation: card-in .5s var(--bv-ease) both;
}

.brand-card__logo { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 26px; }
.brand-card__mark { width: 34px; height: 34px; }
.brand-card__wordmark { font-size: 17px; font-weight: 800; letter-spacing: .08em; color: var(--bv-text); }

.brand-card__icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: var(--bv-primary-soft);
    color: var(--bv-primary);
}
.brand-card__icon .material-symbols-rounded { font-size: 40px; }
.brand-card__icon--warning { background: var(--bv-accent-soft); color: var(--bv-on-accent-soft); }
.brand-card__icon--danger { background: var(--bv-danger-soft); color: var(--bv-on-danger-soft); }

.brand-card__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bv-primary);
}

.brand-card__title { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.brand-card__text { margin: 12px 0 0; color: var(--bv-text-muted); }
.brand-card__note { margin: 22px 0 0; font-size: 13px; color: var(--bv-text-subtle); }

.brand-card__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--bv-radius-full);
    font: inherit;
    font-size: 15.5px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s var(--bv-ease), filter .15s var(--bv-ease);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--bv-focus); }
.btn .material-symbols-rounded { font-size: 20px; }
.btn--primary { background: var(--bv-primary); color: var(--bv-on-primary); box-shadow: 0 8px 18px -10px var(--bv-primary); }
.btn--ghost { background: transparent; color: var(--bv-text-muted); }
.btn--ghost:hover { background: var(--bv-surface-2); color: var(--bv-text); filter: none; }

.brand-footer { margin: 22px 0 0; text-align: center; font-size: 12.5px; color: var(--bv-text-subtle); }
.brand-footer p { margin: 10px 0 0; }

/* Success check ------------------------------------------------------------ */

.success-mark { display: block; width: 84px; height: 84px; margin: 0 auto 18px; }
.success-mark__circle {
    fill: var(--bv-primary-soft);
    stroke: var(--bv-primary);
    stroke-width: 3;
    stroke-dasharray: 252;
    stroke-dashoffset: 252;
    animation: draw .7s var(--bv-ease) .15s forwards;
}
.success-mark__tick {
    fill: none;
    stroke: var(--bv-primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: draw .45s var(--bv-ease) .7s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .brand-card { animation: none; }
    .success-mark__circle, .success-mark__tick { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 480px) {
    .brand-card { padding: 30px 20px 24px; border-radius: 22px; }
    .brand-card__title { font-size: 23px; }
}

/* Legal links (aviso legal, privacidad, condiciones, cookies) shown in every
   footer of apps/web: templates/legal/_links.html.twig. */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13px; }
.legal-links a { color: var(--bv-text-muted); font-weight: 600; text-decoration: none; }
.legal-links a:hover { color: var(--bv-primary); text-decoration: underline; }

/* Registration consents (templates/registration/_registration_consents.html.twig)
   and the first-layer privacy notice below the submit button. */
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.consents { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.consent__input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--bv-primary); }
.consent__input:focus-visible { outline: none; box-shadow: var(--bv-focus); }
.consent__label { font-size: 14px; line-height: 1.5; color: var(--bv-text-muted); }
.consent__label a { font-weight: 700; }
.consent__tag { color: var(--bv-text-subtle); font-size: 12.5px; white-space: nowrap; }
.consent__error { grid-column: 2; margin: 0; font-size: 13px; font-weight: 600; color: var(--bv-on-danger-soft); }
.consent--error .consent__input { outline: 2px solid var(--bv-on-danger-soft); outline-offset: 1px; }
.privacy-notice { margin: 16px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--bv-text-subtle); text-align: left; }

/* Registration and email verification forms (templates/registration/,
   templates/verification/). Same fields as apps/admin's .field / .input. */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 14px; font-weight: 700; color: var(--bv-text); }
.field__hint { margin: 0; font-size: 12.5px; color: var(--bv-text-subtle); }
.field__error { margin: 0; font-size: 13px; font-weight: 600; color: var(--bv-on-danger-soft); }
.input {
    width: 100%; min-height: 46px; padding: 10px 14px;
    font: inherit; font-size: 15px; color: var(--bv-text);
    background: var(--bv-surface); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-md);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--bv-primary); box-shadow: var(--bv-focus); }
.input[aria-invalid="true"] { border-color: var(--bv-on-danger-soft); }
/* Contact form (templates/contact/). */
.input--textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
select.input { appearance: auto; }
.alert {
    display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0; padding: 12px 14px;
    border-radius: var(--bv-radius-md); font-size: 14px; line-height: 1.5; text-align: left;
}
.alert .material-symbols-rounded { font-size: 20px; }
.alert--error { background: var(--bv-danger-soft); color: var(--bv-on-danger-soft); }
.alert--info { background: var(--bv-primary-soft); color: var(--bv-on-primary-soft); }
.form altcha-widget { --altcha-max-width: 100%; --altcha-border-radius: var(--bv-radius-md); }
.brand-card__switch { margin: 18px 0 0; font-size: 14px; color: var(--bv-text-muted); }
.brand-card__switch a { font-weight: 700; color: var(--bv-primary); }
