:root {
    --login-wine: #8f1d1d;
    --login-wine-deep: #5f1014;
    --login-gold: #f1c742;
    --login-ink: #201d1d;
    --login-muted: #6f6868;
    --login-line: #e7e1dc;
}

[ng-cloak] {
    display: none !important;
}

html,
body.login-v2 {
    min-height: 100%;
    margin: 0;
}

body.login-v2 {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    overflow-x: hidden;
    color: var(--login-ink);
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    background-color: #27191a;
    background-image: url("images/FundoSite.webp");
    background-position: center right;
    background-repeat: no-repeat;
    background-size: cover;
}

body.login-v2::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(28, 13, 14, .88) 0%, rgba(46, 18, 20, .73) 42%, rgba(28, 13, 14, .36) 100%);
    pointer-events: none;
}

.login-v2-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 64px));
    min-height: calc(100vh - 72px);
    min-height: calc(100svh - 72px);
    margin: 0 auto;
    padding: 56px 0 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    align-items: center;
    gap: clamp(48px, 9vw, 140px);
}

.login-v2-copy {
    max-width: 610px;
    color: #fff;
}

.login-v2-brand {
    width: 96px;
    height: 96px;
    margin-bottom: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .26);
}

.login-v2-brand img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.login-v2-message h1 {
    max-width: 560px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(40px, 5vw, 68px);
    font-weight: 780;
    line-height: 1.02;
    letter-spacing: -.045em;
}

.login-v2-message p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: clamp(17px, 1.7vw, 21px);
    line-height: 1.55;
}

.login-v2-benefits {
    margin-top: 34px;
    display: grid;
    gap: 12px;
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
}

.login-v2-benefits span {
    display: flex;
    align-items: center;
    gap: 11px;
}

.login-v2-benefits i {
    width: 23px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b1719;
    border-radius: 50%;
    background: var(--login-gold);
    font-size: 11px;
}

.login-v2-card {
    padding: 42px 42px 36px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 32px 80px rgba(19, 8, 9, .38);
    backdrop-filter: blur(16px);
}

.login-v2-card header {
    margin-bottom: 30px;
}

.login-v2-card-brand {
    margin: 0 0 10px !important;
    color: var(--login-wine) !important;
    font-size: 12px !important;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-v2-card h2 {
    margin: 0 0 8px;
    color: var(--login-ink);
    font-size: 31px;
    font-weight: 760;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.login-v2-card header > p:last-child {
    margin: 0;
    color: var(--login-muted);
    font-size: 15px;
}

.login-v2-field {
    margin-bottom: 20px;
}

.login-v2-field label {
    margin: 0 0 8px;
    display: block;
    color: #413b3b;
    font-size: 13px;
    font-weight: 700;
}

.login-v2-input {
    position: relative;
}

.login-v2-input > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    color: var(--login-wine);
    transform: translateY(-50%);
}

.login-v2-input input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    color: var(--login-ink);
    border: 1px solid var(--login-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    font: inherit;
    font-size: 16px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.login-v2-input input:hover {
    border-color: #cfc3bd;
}

.login-v2-input input:focus {
    outline: 0;
    border-color: var(--login-wine);
    box-shadow: 0 0 0 4px rgba(143, 29, 29, .11);
}

.login-v2-alert {
    margin: 2px 0 18px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #7f1d1d;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff1f2;
    font-size: 13px;
    line-height: 1.4;
}

.login-v2-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 12px 20px;
    color: #fff;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #a72123, var(--login-wine-deep));
    box-shadow: 0 14px 30px rgba(95, 16, 20, .25);
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.login-v2-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(95, 16, 20, .32);
}

.login-v2-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

.login-v2-support {
    margin: 24px 0 0;
    color: var(--login-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.login-v2-footer {
    position: absolute;
    right: 32px;
    bottom: 22px;
    left: 32px;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, .66);
    font-size: 11px;
}

.login-v2 :focus-visible {
    outline: 3px solid var(--login-gold);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .login-v2-shell {
        width: min(100% - 36px, 560px);
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 30px;
    }

    .login-v2-copy {
        text-align: center;
    }

    .login-v2-brand {
        width: 78px;
        height: 78px;
        margin-bottom: 22px;
    }

    .login-v2-brand img {
        width: 66px;
        height: 66px;
    }

    .login-v2-message h1,
    .login-v2-message p {
        margin-right: auto;
        margin-left: auto;
    }

    .login-v2-message h1 {
        font-size: clamp(34px, 9vw, 48px);
    }

    .login-v2-benefits {
        display: none;
    }
}

@media (max-width: 520px) {
    body.login-v2 {
        background-position: 68% center;
    }

    body.login-v2::before {
        background: linear-gradient(180deg, rgba(28, 13, 14, .78), rgba(28, 13, 14, .9));
    }

    .login-v2-shell {
        width: calc(100% - 24px);
        padding: 22px 0 76px;
        gap: 22px;
    }

    .login-v2-copy {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }

    .login-v2-brand {
        width: 62px;
        height: 62px;
        margin: 0;
        flex: 0 0 62px;
    }

    .login-v2-brand img {
        width: 52px;
        height: 52px;
    }

    .login-v2-message h1 {
        margin-bottom: 4px;
        font-size: 25px;
        line-height: 1.08;
    }

    .login-v2-message p {
        display: none;
    }

    .login-v2-card {
        padding: 30px 24px 26px;
        border-radius: 20px;
    }

    .login-v2-card h2 {
        font-size: 27px;
    }

    .login-v2-footer {
        right: 18px;
        bottom: 14px;
        left: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-v2 *,
    .login-v2 *::before,
    .login-v2 *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.login-auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(115deg, rgba(42, 24, 24, .92), rgba(116, 77, 77, .72)),
        url("images/FundoSite.webp") center / cover no-repeat fixed;
}

.login-auth-card {
    width: min(100%, 520px);
    padding: clamp(28px, 6vw, 48px);
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 28px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(31, 16, 16, .28);
    text-align: center;
}

.login-auth-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    margin-bottom: 20px;
}

.login-auth-eyebrow {
    margin: 0 0 8px;
    color: #9f373d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.login-auth-card h1,
.login-auth-card h2 {
    margin: 0;
    color: #241d1d;
}

.login-auth-card h1 {
    font-size: clamp(30px, 5vw, 42px);
}

.login-auth-status,
.login-auth-error {
    margin-top: 24px;
}

.login-auth-status p,
.login-auth-error p {
    margin: 14px 0 0;
    color: #665b5b;
    line-height: 1.6;
}

.login-auth-spinner {
    display: inline-block;
    width: 42px;
    height: 42px;
    border: 4px solid #efd7d8;
    border-top-color: #a9363d;
    border-radius: 50%;
    animation: login-auth-spin .85s linear infinite;
}

.login-auth-action,
.login-auth-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 18px;
    border-radius: 14px;
    font-weight: 800;
}

.login-auth-action {
    border: 0;
    background: #a9363d;
    color: #fff;
}

.login-auth-link {
    color: #7b292e;
    text-decoration: none;
}

.login-auth-action:focus-visible,
.login-auth-link:focus-visible {
    outline: 3px solid #f5bd36;
    outline-offset: 3px;
}

@keyframes login-auth-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
    .login-auth-page {
        padding: 16px;
    }

    .login-auth-card {
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-auth-spinner {
        animation-duration: 1.8s;
    }
}
