/* Ambev Invest — auth screens v20260906c */
:root {
    --auth-navy: #001a4d;
    --auth-blue: #003DA5;
    --auth-bright: #0057FF;
    --auth-sky: #4D8AFF;
    --auth-ink: #0b1220;
    --auth-muted: #64748b;
    --auth-line: #e8eef8;
    --auth-soft: #f4f7fc;
    --auth-card: rgba(255, 255, 255, 0.96);
    --auth-radius: 22px;
    --auth-font: "Manrope", system-ui, sans-serif;
    --auth-display: "Sora", "Manrope", system-ui, sans-serif;
}

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

html { height: 100%; }

.login-body,
.auth-body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--auth-font);
    color: var(--auth-ink);
    background: var(--auth-navy) !important;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.auth-bg,
.ag-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 55% at 15% -10%, rgba(77, 138, 255, 0.55), transparent 55%),
        radial-gradient(ellipse 70% 45% at 95% 20%, rgba(0, 87, 255, 0.35), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 110%, rgba(0, 61, 165, 0.5), transparent 55%),
        linear-gradient(165deg, #002866 0%, #001a4d 42%, #0a1630 100%);
}

.auth-bg::before,
.auth-bg::after,
.ag-bg::before,
.ag-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    animation: authFloat 12s ease-in-out infinite;
}

.auth-bg::before,
.ag-bg::before {
    width: 280px;
    height: 280px;
    top: 8%;
    right: -80px;
    background: radial-gradient(circle, rgba(77, 138, 255, 0.28), transparent 70%);
}

.auth-bg::after,
.ag-bg::after {
    width: 220px;
    height: 220px;
    bottom: 12%;
    left: -70px;
    background: radial-gradient(circle, rgba(0, 87, 255, 0.22), transparent 70%);
    animation-delay: -4s;
}

@keyframes authFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.05); }
}

@keyframes authRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes authFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ag,
.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 20px 20px 36px;
    display: flex;
    flex-direction: column;
    animation: authRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ag-top,
.auth-top {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 4px;
}

.ag-back,
.auth-back {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ag-back:hover,
.auth-back:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(-2px);
}

.ag-hero,
.auth-brand {
    text-align: center;
    padding: 12px 8px 8px;
}

.auth-card-brand {
    text-align: center;
    margin: 0 0 18px;
}

.ag-logo,
.auth-logo {
    width: auto;
    height: 40px;
    max-width: 170px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 8px 18px rgba(0, 40, 120, 0.18));
    animation: authFade 0.7s ease both;
}

.auth-card-brand .auth-logo,
.auth-card-brand .ag-logo {
    height: 44px;
    max-width: 190px;
}

.ag--register .ag-logo,
.auth-shell--register .auth-logo {
    height: 44px;
    max-width: 190px;
}

.auth-shell--compact {
    justify-content: center;
    padding-top: 28px;
    padding-bottom: 28px;
}

.auth-shell--compact .auth-top {
    position: relative;
    top: auto;
    left: auto;
    z-index: 2;
    margin: 0 0 14px;
    min-height: 42px;
}

.auth-shell--compact.auth-shell--register {
    justify-content: flex-start;
    padding-top: max(16px, env(safe-area-inset-top, 0px));
}

.auth-shell--compact .auth-card {
    margin-top: 0;
}

.auth-shell--compact .auth-footer {
    margin-top: 24px;
}

.auth-brand h1,
.auth-title {
    margin: 0;
    font-family: var(--auth-display);
    font-size: clamp(1.55rem, 5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #fff;
    line-height: 1.15;
}

.auth-brand p,
.auth-tagline {
    margin: 8px 0 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.68);
}

.auth-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 22px 0 8px;
}

.auth-feature {
    text-align: center;
    padding: 12px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.25s ease, background 0.25s ease;
    animation: authRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-feature:nth-child(1) { animation-delay: 0.08s; }
.auth-feature:nth-child(2) { animation-delay: 0.14s; }
.auth-feature:nth-child(3) { animation-delay: 0.2s; }

.auth-feature:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.14);
}

.auth-feature .icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(77, 138, 255, 0.35), rgba(0, 87, 255, 0.15));
    color: #fff;
    font-size: 16px;
}

.auth-feature span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
}

.auth-card {
    margin-top: 20px;
    padding: 26px 22px 22px;
    background: var(--auth-card);
    border-radius: var(--auth-radius);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        0 24px 60px rgba(0, 20, 70, 0.35),
        0 2px 0 rgba(255, 255, 255, 0.7) inset;
    animation: authRise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.auth-card h2 {
    margin: 0;
    font-family: var(--auth-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--auth-ink);
    text-align: center;
}

.auth-card .subtitle {
    margin: 6px 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-muted);
    font-weight: 500;
}

.ag-tabs,
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 22px;
    padding: 4px;
    background: var(--auth-soft);
    border-radius: 999px;
    border: 1px solid var(--auth-line);
}

.ag-tabs a,
.auth-tabs a {
    text-align: center;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--auth-muted);
    padding: 11px 8px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ag-tabs a.is-on,
.auth-tabs a.is-on {
    background: linear-gradient(135deg, var(--auth-bright) 0%, var(--auth-blue) 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 87, 255, 0.28);
}

.ag-alert,
.auth-alert,
.alert-error {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff1f2;
    border: 1px solid rgba(220, 53, 69, 0.18);
    color: #c1121f;
    font-size: 13px;
    font-weight: 600;
    animation: authRise 0.3s ease both;
}

.ag-form,
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 4px;
}

.form-group label,
.auth-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}

.form-group .input-wrapper {
    position: relative;
}

.form-group .input-wrapper > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-group input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid var(--auth-line);
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    color: var(--auth-ink);
    background: var(--auth-soft);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--auth-bright);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 87, 255, 0.12);
}

.form-group .input-wrapper:focus-within > i {
    color: var(--auth-bright);
}

.form-group input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.ag-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 14px;
    background: var(--auth-soft);
    border: 1.5px solid var(--auth-line);
    border-radius: 14px;
    color: var(--auth-ink);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ag-box:focus-within {
    background: #fff;
    border-color: var(--auth-bright);
    box-shadow: 0 0 0 4px rgba(0, 87, 255, 0.12);
}

.ag-box > i {
    width: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 15px;
    transition: color 0.2s ease;
}

.ag-box:focus-within > i { color: var(--auth-bright); }

.ag-box input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 52px;
    border: 0;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-ink);
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.ag-box input::placeholder { color: #94a3b8; }

.ag-cc {
    flex: 0 0 auto;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--auth-blue);
    padding-right: 10px;
    border-right: 1px solid var(--auth-line);
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.ag-eye {
    border: 0;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    font-size: 15px;
    transition: color 0.2s ease;
}

.ag-eye:hover { color: var(--auth-bright); }

.ag-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 64px;
    padding: 8px 8px 8px 14px;
    background:
        repeating-linear-gradient(
            -18deg,
            transparent,
            transparent 6px,
            rgba(255, 255, 255, 0.06) 6px,
            rgba(255, 255, 255, 0.06) 7px
        ),
        linear-gradient(135deg, #0b2a7a 0%, #0057FF 52%, #1e6bff 100%);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 87, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.ag-chip::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.12), transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(0,0,0,.18), transparent 40%);
    pointer-events: none;
}

.ag-chip b {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 10px;
    color: #fff;
    font-variant-numeric: tabular-nums;
    font-family: var(--auth-display);
}

.captcha-wild__codes {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-height: 44px;
    position: relative;
    z-index: 1;
    user-select: none;
}

.captcha-wild__char {
    display: inline-block;
    font-size: 30px;
    line-height: 1;
    color: #fff;
    text-shadow: 1px 2px 0 rgba(0, 20, 60, 0.35);
    font-weight: 700;
}

.captcha-wild__char--0 {
    font-family: "Bangers", cursive;
    transform: rotate(-14deg) translateY(3px) skewX(-8deg);
    font-size: 34px;
    color: #ffe566;
}

.captcha-wild__char--1 {
    font-family: "Permanent Marker", cursive;
    transform: rotate(10deg) translateY(-4px) scale(1.08);
    font-size: 28px;
    color: #fff;
    letter-spacing: -1px;
}

.captcha-wild__char--2 {
    font-family: "Bangers", cursive;
    transform: rotate(-6deg) translateY(5px) skewY(4deg);
    font-size: 32px;
    color: #9fd0ff;
}

.captcha-wild__char--3 {
    font-family: "Permanent Marker", cursive;
    transform: rotate(16deg) translateY(-2px) skewX(10deg);
    font-size: 30px;
    color: #ffd0a8;
}

.ag-refresh {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--auth-bright);
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.ag-refresh:hover { transform: rotate(45deg); }

.ag-check,
.ag-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--auth-muted);
    cursor: pointer;
    user-select: none;
    margin-top: 2px;
}

.ag-check input {
    accent-color: var(--auth-bright);
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.ag-terms a {
    color: var(--auth-bright);
    font-weight: 700;
    text-decoration: none;
}

.ag-terms a:hover { text-decoration: underline; }

.login-btn,
.ag-btn,
.auth-btn {
    margin-top: 6px;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #4D8AFF 0%, #0057FF 48%, #003DA5 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 87, 255, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-btn:hover,
.ag-btn:hover,
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 87, 255, 0.4);
    filter: brightness(1.04);
}

.login-btn:active,
.ag-btn:active,
.auth-btn:active {
    transform: translateY(0) scale(0.99);
}

.auth-btn--ghost {
    background: transparent;
    color: var(--auth-bright);
    box-shadow: none;
    border: 1.5px solid rgba(0, 87, 255, 0.25);
    margin-top: 10px;
}

.auth-btn--ghost:hover {
    background: rgba(0, 87, 255, 0.06);
    box-shadow: none;
    filter: none;
}

.login-links,
.auth-links {
    text-align: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--auth-line);
}

.login-links p,
.auth-links p {
    margin: 0 0 12px;
    color: var(--auth-muted);
    font-size: 13.5px;
    font-weight: 500;
}

.login-links a,
.auth-links a {
    color: var(--auth-bright);
    text-decoration: none;
    font-weight: 800;
}

.login-links a:hover,
.auth-links a:hover { text-decoration: underline; }

.ag-note,
.auth-note {
    margin: 8px 4px 12px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-footer,
.auth-footer {
    text-align: center;
    padding: 22px 8px 0;
    margin-top: auto;
}

.login-footer p,
.auth-footer p {
    margin: 0;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.42);
    font-weight: 500;
}

.auth-shell--register .auth-card,
.ag--register .auth-card {
    margin-top: 0;
}

.auth-shell--register .ag-hero {
    padding-bottom: 4px;
}

@media (max-width: 380px) {
    .ag, .auth-shell { padding: 16px 14px 28px; }
    .auth-card { padding: 22px 16px 18px; }
    .auth-features { gap: 8px; }
}
