/* The login template and the Vue navigation share the same wordmark. */
html body img[src="/brand/logo.svg"],
html body img[src^="/brand/logo.svg?"] {
    content: url("/brand/avanza-logo-microsoft.png");
    object-fit: contain;
    object-position: left center;
}

#access-app .login-intro .intro-eyebrow,
#access-app .login-intro .intro-foot {
    display: none !important;
}

#access-app .login-card form button:not(.avanza-password-toggle) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #0F6CBD;
    border-color: #0F6CBD;
    color: #fff;
}

#access-app .login-card form button svg {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
}

#access-app .login-card label:has(.avanza-password-toggle) {
    position: relative;
}

#access-app .login-card label:has(.avanza-password-toggle) input {
    padding-inline-end: 3rem !important;
}

html body #access-app#access-app#access-app .login-card form label .avanza-password-toggle {
    position: absolute;
    inset-inline-end: 0.25rem;
    inset-block-end: 0.25rem;
    display: grid !important;
    place-items: center;
    width: 2.375rem !important;
    height: 2.375rem;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0.25rem !important;
    background: transparent !important;
    color: #0F6CBD !important;
    cursor: pointer;
}

#access-app .login-card form .avanza-password-toggle:focus-visible {
    outline: 2px solid #0F6CBD;
    outline-offset: -2px;
}

/* Override the legacy access theme only while its login layout is visible. */
html body #access-app#access-app#access-app .access-shell:has(.login-layout) {
    background: #fafafa !important;
    padding: clamp(1rem, 4vw, 3rem) !important;
}

html body #access-app#access-app#access-app .login-layout {
    width: min(100%, 29rem) !important;
    min-height: auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden;
    background: #f3f7fb !important;
    border: 1px solid #e0e3e7 !important;
    border-radius: 1rem !important;
    box-shadow: none !important;
}

html body #access-app#access-app#access-app .login-layout .login-intro {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem !important;
    padding: 2rem 2rem 0 !important;
    border: 0 !important;
    background: transparent !important;
}

html body #access-app#access-app#access-app .login-layout .login-intro .intro-mark {
    width: 15rem !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    align-self: center !important;
}

html body #access-app#access-app#access-app .login-layout .login-intro .intro-mark img {
    content: url("/brand/avanza-logo-microsoft.png") !important;
    aspect-ratio: 2400 / 384 !important;
    object-fit: contain !important;
}

html body #access-app#access-app#access-app .login-layout .login-intro h2 {
    display: none !important;
    max-width: none;
    margin: 0 !important;
    color: #000 !important;
    font-size: clamp(1.125rem, 2.3vw, 1.875rem) !important;
    font-weight: 700 !important;
    line-height: 1.12 !important;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

html body #access-app#access-app#access-app .login-layout .login-intro > p {
    max-width: none;
    margin: 0 !important;
    color: #475467 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    text-align: center !important;
}

html body #access-app#access-app#access-app .login-layout .login-card {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 1.75rem 2rem 2rem !important;
    border: 0 !important;
    background: transparent !important;
}

html body #access-app#access-app#access-app .login-layout .login-card h1 {
    margin: 0 0 1.4rem !important;
    color: #202124 !important;
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
}

#access-app .login-card h1 + p:not(.error) {
    display: none !important;
}

html body #access-app#access-app#access-app .login-layout .login-card form {
    margin-block: 0 !important;
}

html body #access-app#access-app#access-app .login-layout .login-card form[action$="/acceso/google/entrar"] {
    margin-block: 1rem 0 !important;
    padding-block-start: 1rem;
    border-top: 1px solid #dce4ed;
}

html body #access-app#access-app#access-app .login-layout .login-card input {
    background: #fff !important;
    border-color: #a9bacb !important;
    border-radius: 0.375rem !important;
}

html body #access-app#access-app#access-app .login-layout .login-card input:focus-visible,
html body #access-app#access-app#access-app .login-layout .login-card button:focus-visible {
    outline: 2px solid #0f6cbd !important;
    outline-offset: 2px;
}

@media (max-width: 680px) {
    html body #access-app#access-app#access-app .login-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        min-height: auto !important;
    }

    html body #access-app#access-app#access-app .login-layout .login-intro,
    html body #access-app#access-app#access-app .login-layout .login-card {
        padding: 1.5rem !important;
    }

    html body #access-app#access-app#access-app .login-layout .login-intro h2 {
        max-width: none;
        font-size: clamp(1rem, 5vw, 1.625rem) !important;
    }

    html body #access-app#access-app#access-app .login-layout .login-intro .intro-mark {
        width: 14rem !important;
        margin-bottom: 0 !important;
    }

    html body #access-app#access-app#access-app .login-layout .login-card {
        padding-top: 1rem !important;
    }
}

/* Shared heading for authenticated modules. */
html body .account-top-bar {
    position: fixed !important;
    top: 0 !important;
    z-index: 100 !important;
    gap: 1rem !important;
    align-items: center !important;
    background: #0f6cbd !important;
    color: #fff !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
}

html body .account-top-bar .account-module {
    margin: 0 !important;
    min-width: 0;
    color: #fff !important;
    font: 700 1.125rem/1.25 "Segoe UI", Arial, sans-serif !important;
}

html body .account-top-bar .account-clock {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

html body [id$="-app"] .account-top-bar .account-week,
html body .account-top-bar .account-week,
html body .account-top-bar .account-date,
html body .account-top-bar .account-short-date {
    color: #fff !important;
    font: 600 0.875rem/1.3 "Segoe UI", Arial, sans-serif !important;
    text-transform: none !important;
    white-space: nowrap;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

html body .account-top-bar .account-short-date {
    display: none !important;
}

html body .account-top-bar .account-clock button.fullscreen-toggle,
html body .account-top-bar button.account-profile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    min-width: 2.25rem !important;
    margin: 0 !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.09) !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    border-radius: 0.375rem !important;
    box-shadow: none !important;
}

html body .account-top-bar .account-clock button.fullscreen-toggle {
    width: 2.25rem !important;
    padding: 0 !important;
}

html body .account-top-bar .account-clock button.fullscreen-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
}

html body .account-top-bar button.account-profile {
    width: auto !important;
    max-width: min(13rem, 26vw);
    padding: 0 0.625rem !important;
}

html body [id$="-app"] .account-top-bar .account-profile,
html body .account-top-bar .account-profile {
    border: 0 !important;
    background: transparent !important;
    border-radius: 0.375rem !important;
}

html body .account-top-bar .account-profile img,
html body .account-top-bar .account-profile > span:not(.account-profile-label) {
    display: none !important;
}

html body .account-top-bar .account-profile:not(:has(.account-profile-label))::after {
    content: attr(title);
}

html body .account-top-bar .account-profile-label,
html body .account-top-bar .account-profile:not(:has(.account-profile-label))::after {
    display: block !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 600 0.875rem/1.3 "Segoe UI", Arial, sans-serif !important;
}

html body .account-top-bar .account-clock button.fullscreen-toggle:hover:not(:disabled),
html body [id$="-app"] .account-top-bar .account-profile:hover,
html body .account-top-bar .account-profile:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

@media (max-width: 960px) {
    html body .account-top-bar .account-date {
        display: none !important;
    }
    html body .account-top-bar .account-short-date {
        display: inline !important;
    }
}

@media (max-width: 640px) {
    html body .account-top-bar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.5rem !important;
    }
    html body .account-top-bar .account-user-controls {
        grid-column: 2;
        grid-row: 1;
    }
    html body .account-top-bar .account-clock {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem !important;
    }
    html body .account-top-bar button.account-profile {
        max-width: min(13rem, 55vw);
    }
}

html body .account-top-bar .account-header-brand {
    display: none;
    align-items: center;
    justify-content: center;
    order: -1;
    flex: 0 0 auto;
    margin-inline: 0.5rem 0.75rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    background: #fff;
}

html body.app-sidebar-collapsed .account-top-bar .account-header-brand {
    display: inline-flex !important;
}

html body .account-top-bar .account-header-brand img {
    display: block;
    object-fit: contain;
    width: 116px;
    height: 24px;
}

html body .account-top-bar .account-profile {
    gap: 0.5rem !important;
}

html body .account-top-bar .account-user-icon {
    display: inline-block !important;
    color: #fff !important;
}

html body .account-top-bar .account-time,
html body .account-top-bar .account-time small {
    color: #fff !important;
}

@media(max-width: 640px) {
    html body .account-top-bar:has(.account-header-brand) .account-module {
        grid-row: 1;
        grid-column: 2;
    }
    html body .account-top-bar .account-header-brand {
        display: inline-flex !important;
    }
    html body .account-top-bar:has(.account-header-brand) .account-user-controls {
        grid-row: 3;
        grid-column: 1;
        justify-self: start;
    }
    html body .account-top-bar .account-header-brand {
        grid-row: 1;
        grid-column: 1;
        justify-self: start;
        margin-inline-start: 0.5rem;
    }
    html body .account-top-bar .account-header-brand img {
        width: 96px;
        height: 20px;
    }
}
