/* Casca compartilhada das telas anônimas de autenticação. */
html {
    min-height: 100%;
    background: #111827;
}

.auth-shell {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(43, 68, 104, 0.68), transparent 38%),
        radial-gradient(circle at 84% 76%, rgba(24, 55, 99, 0.62), transparent 42%),
        linear-gradient(125deg, #172235 0%, #142136 38%, #101d32 68%, #172944 100%);
    background-size: 180% 180%;
    animation: auth-background-shift 20s ease-in-out infinite alternate;
}

.auth-shell::before,
.auth-shell::after {
    position: fixed;
    z-index: -1;
    width: min(72vw, 52rem);
    aspect-ratio: 1;
    border-radius: 9999px;
    content: "";
    filter: blur(5rem);
    opacity: 0.38;
    pointer-events: none;
}

.auth-shell::before {
    top: -34%;
    left: -18%;
    background: #334155;
    animation: auth-orb-one 18s ease-in-out infinite alternate;
}

.auth-shell::after {
    right: -22%;
    bottom: -40%;
    background: #1e3f70;
    animation: auth-orb-two 22s ease-in-out infinite alternate;
}

.auth-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    background: linear-gradient(145deg, rgba(126, 137, 154, 0.67), rgba(82, 94, 114, 0.62));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 1px 0 0 rgba(255, 255, 255, 0.14),
        0 2rem 5rem rgba(2, 8, 23, 0.42),
        0 0.5rem 1.5rem rgba(2, 8, 23, 0.18);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
    backdrop-filter: blur(28px) saturate(155%);
}

.auth-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 42%;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent);
    content: "";
    pointer-events: none;
}

.auth-card > * {
    position: relative;
}

.auth-login-card {
    min-height: 34rem;
}

.auth-program-name {
    color: #ffffff;
    font-size: 1.5rem;
    font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Inter", ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.auth-submit {
    display: block;
    width: min(100%, 12rem);
    margin-right: auto;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 9999px;
    background: transparent;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background-color 150ms ease, color 150ms ease;
}

.auth-submit:hover {
    background: rgba(255, 255, 255, 0.14);
}

.auth-welcome {
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.auth-field {
    position: relative;
}

.auth-field-icon {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 1;
    display: flex;
    width: 3rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.88);
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-field-icon::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.28);
    content: "";
}

.auth-field-icon svg {
    width: 1rem;
    height: 1rem;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    height: 2.75rem;
    margin-top: 0;
    border-color: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    background: rgba(207, 214, 226, 0.35);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding-left: 3.6rem;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(222, 228, 238, 0.46);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
    outline: none;
}

.auth-card input::placeholder {
    color: rgba(15, 23, 42, 0.62);
    opacity: 1;
}

.auth-forgot-link {
    color: rgba(255, 255, 255, 0.68);
}

.auth-forgot-link:hover {
    color: #ffffff;
}

.auth-login-form {
    margin-top: 2.5rem;
}

.auth-login-fields {
    display: grid;
    gap: 1.25rem;
}

.auth-login-form .auth-submit {
    margin-top: 2.25rem;
}

.auth-login-recovery {
    margin-top: 1.5rem;
}

@keyframes auth-background-shift {
    0% { background-position: 0% 30%; }
    50% { background-position: 55% 70%; }
    100% { background-position: 100% 35%; }
}

@keyframes auth-orb-one {
    from { transform: translate3d(-4%, -3%, 0) scale(0.94); }
    to { transform: translate3d(26%, 18%, 0) scale(1.12); }
}

@keyframes auth-orb-two {
    from { transform: translate3d(4%, 5%, 0) scale(1); }
    to { transform: translate3d(-28%, -20%, 0) scale(1.14); }
}

@media (max-width: 640px) {
    .auth-card {
        border-radius: 1.5rem;
    }

    .auth-program-name {
        font-size: 1.3rem;
    }

    .auth-login-card {
        min-height: 32rem;
    }

    .auth-login-form {
        margin-top: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell,
    .auth-shell::before,
    .auth-shell::after {
        animation: none;
    }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .auth-card {
        background: rgba(83, 96, 116, 0.96);
    }
}
