* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #07101f;
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

.auth-page {
    align-items: center;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(37, 99, 235, 0.22),
            transparent 34%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(14, 165, 233, 0.13),
            transparent 34%
        ),
        #07101f;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    padding: 40px 24px;
    position: relative;
}

.background-grid {
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
    inset: 0;
    position: absolute;
}

.background-light {
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.6;
    position: absolute;
}

.light-one {
    animation: floatLight 8s ease-in-out infinite;
    background: rgba(37, 99, 235, 0.25);
    height: 280px;
    left: 4%;
    top: 9%;
    width: 280px;
}

.light-two {
    animation: floatLight 10s ease-in-out infinite reverse;
    background: rgba(14, 165, 233, 0.16);
    bottom: 7%;
    height: 340px;
    right: 2%;
    width: 340px;
}

.auth-container {
    align-items: center;
    display: grid;
    gap: 80px;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 480px);
    margin: 0 auto;
    max-width: 1180px;
    position: relative;
    width: 100%;
    z-index: 2;
}

.auth-presentation {
    color: #fff;
    max-width: 650px;
}

.system-symbol {
    align-items: center;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.3);
    display: flex;
    font-size: 20px;
    font-weight: 700;
    height: 70px;
    justify-content: center;
    letter-spacing: 1px;
    margin-bottom: 30px;
    width: 70px;
}

.animated-title {
    animation: titleEntry 900ms ease forwards;
    font-size: clamp(38px, 5vw, 66px);
    letter-spacing: -2px;
    line-height: 1.06;
    opacity: 0;
    transform: translateY(24px);
}

.auth-presentation p {
    animation: titleEntry 900ms ease 250ms forwards;
    color: #aebdd2;
    font-size: 18px;
    line-height: 1.7;
    margin-top: 24px;
    max-width: 580px;
    opacity: 0;
    transform: translateY(24px);
}

.presentation-line {
    animation: lineGrowth 900ms ease 500ms forwards;
    background: linear-gradient(90deg, #2563eb, transparent);
    height: 3px;
    margin-top: 34px;
    transform: scaleX(0);
    transform-origin: left;
    width: 240px;
}

.auth-card {
    animation: cardEntry 800ms ease forwards;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    padding: 38px;
}

.auth-label {
    color: #2563eb;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.3px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.auth-card-heading h2 {
    color: #111827;
    font-size: 30px;
}

.auth-card-heading p {
    color: #64748b;
    line-height: 1.55;
    margin-top: 9px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    margin-top: 28px;
}

.auth-form label {
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    margin: 17px 0 8px;
}

.auth-form input {
    background: #f8fafc;
    border: 1px solid #dbe2ea;
    border-radius: 11px;
    color: #111827;
    outline: none;
    padding: 13px 14px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
    width: 100%;
}

.auth-form input:focus {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 82px;
}

.password-toggle {
    background: transparent;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
}

.submit-button {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    border-radius: 11px;
    box-shadow: 0 13px 25px rgba(37, 99, 235, 0.24);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    margin-top: 27px;
    padding: 14px;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease;
}

.submit-button:hover {
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.32);
    transform: translateY(-2px);
}

.auth-footer {
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 14px;
    margin-top: 28px;
    padding-top: 22px;
    text-align: center;
}

.auth-footer a {
    color: #2563eb;
    font-weight: 700;
    margin-left: 5px;
    text-decoration: none;
}

.alert {
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
    margin-top: 20px;
    padding: 13px 14px;
}

.alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

@keyframes titleEntry {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateX(35px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lineGrowth {
    to {
        transform: scaleX(1);
    }
}

@keyframes floatLight {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(25px, -20px, 0);
    }
}

@media (max-width: 900px) {
    .auth-container {
        gap: 45px;
        grid-template-columns: 1fr;
    }

    .auth-presentation {
        text-align: center;
    }

    .system-symbol {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-presentation p {
        margin-left: auto;
        margin-right: auto;
    }

    .presentation-line {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-card {
        margin: 0 auto;
        max-width: 520px;
        width: 100%;
    }
}

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

    .auth-container {
        gap: 32px;
    }

    .animated-title {
        font-size: 34px;
        letter-spacing: -1px;
    }

    .auth-presentation p {
        font-size: 15px;
    }

    .auth-card {
        border-radius: 18px;
        padding: 26px 20px;
    }
}

/* Rodapé institucional e modal do autor */
.auth-page {
    padding-bottom: 120px;
}

.site-credits {
    bottom: 22px;
    color: rgba(226, 232, 240, 0.68);
    font-size: 12px;
    left: 50%;
    line-height: 1.45;
    position: absolute;
    text-align: center;
    transform: translateX(-50%);
    width: min(92%, 720px);
    z-index: 4;
}

.site-credits p {
    margin: 0;
}

.author-link {
    appearance: none;
    background: transparent;
    border: 0;
    color: #38a0ff;
    cursor: pointer;
    display: inline-block;
    font-size: 12px;
    margin-top: 5px;
    padding: 0;
    text-decoration: none;
    transition: color 160ms ease, opacity 160ms ease;
}

.author-link:hover,
.author-link:focus-visible {
    color: #7cc4ff;
    outline: none;
    text-decoration: underline;
}

.author-modal[hidden] {
    display: none !important;
}

.author-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 10000;
}

.author-modal-backdrop {
    background: rgba(2, 8, 23, 0.76);
    backdrop-filter: blur(6px);
    inset: 0;
    position: absolute;
}

.author-modal-card {
    animation: authorModalEntry 180ms ease-out;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.42);
    color: #172033;
    max-width: 480px;
    padding: 32px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.author-modal-label {
    color: #2563eb;
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
    margin-bottom: 9px;
    text-transform: uppercase;
}

.author-modal-card h2 {
    font-size: 26px;
    margin: 0;
}

.author-modal-card p {
    color: #5f6f85;
    font-size: 15px;
    line-height: 1.65;
    margin: 16px 0 0;
}

.author-modal-close {
    align-items: center;
    background: #eef3f9;
    border: 0;
    border-radius: 50%;
    color: #475569;
    cursor: pointer;
    display: flex;
    font-size: 24px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 36px;
}

.author-modal-button {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    margin-top: 24px;
    padding: 12px 22px;
}

body.author-modal-open {
    overflow: hidden;
}

@keyframes authorModalEntry {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-height: 760px) and (min-width: 901px) {
    .auth-page {
        align-items: flex-start;
        overflow-y: auto;
        padding-bottom: 110px;
    }
}

@media (max-width: 900px) {
    .auth-page {
        overflow-y: auto;
        padding-bottom: 125px;
    }

    .site-credits {
        bottom: 18px;
    }
}

@media (max-width: 520px) {
    .site-credits,
    .author-link {
        font-size: 11px;
    }

    .author-modal-card {
        border-radius: 16px;
        padding: 27px 22px 24px;
    }
}
