/* =========================================================
   RESET BÁSICO
========================================================= */

.auth-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================================
   BACKGROUND
========================================================= */

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    width: 100%;
    padding: 40px 20px;
    background: linear-gradient(to bottom, #004aad, #0b93f2, #d9ecf8);
    font-family: "Inter", "Lato", Arial, sans-serif;
}

/* =========================================================
   CARD
========================================================= */

.auth-card {
    width: 100%;
    max-width: 360px;
    background: #f3f3f3;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    padding: 32px 28px;
    text-align: center;
}

/* =========================================================
   TITLE
========================================================= */

.auth-title {
    margin-bottom: 28px;
    color: #004aad;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
}

/* =========================================================
   FORM
========================================================= */

.auth-form {
    width: 100%;
}

/* =========================================================
   INPUTS
========================================================= */

.auth-field {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    border-bottom: 1px solid #b8b8b8;
}

.auth-field input {
    width: 100%;
    height: 44px;
    padding: 10px 38px 10px 8px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #222;
}

.auth-field label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #9b9b9b;
    font-size: 16px;
    pointer-events: none;
    transition: 0.2s ease;
}

/* FLOAT LABEL */
.auth-field input:focus ~ label,
.auth-field input:not(:placeholder-shown) ~ label {
    top: -6px;
    font-size: 12px;
    color: #004aad;
}

/* =========================================================
   PASSWORD ICON
========================================================= */

.auth-password-field input {
    padding-right: 42px;
}

.auth-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.75;
}

.auth-toggle-password:hover {
    opacity: 1;
}

/* =========================================================
   BUTTON
========================================================= */

.auth-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 6px;
    background: #004aad;
    color: #fff !important;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.auth-btn:hover {
    background: #00348a;
}

.auth-btn-signup {
    background: #16a34a;
}

.auth-btn-signup:hover {
    background: #12813a;
}

/* =========================================================
   SOCIAL
========================================================= */

.auth-social {
    margin-top: 20px;
}

.auth-social p {
    margin-bottom: 14px;
    font-size: 14px;
    color: #222;
}

/* linha */
.auth-social-buttons {
    border-top: 1px solid #cfcfcf;
    padding-top: 16px;
    display: flex;
    justify-content: center;
    gap: 28px;
}

/* botão social */
.auth-social-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #111;
    font-size: 12px;
    text-decoration: none;
}

.auth-social-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    text-decoration: none;
}

/* CÍRCULO */
.auth-social-button .icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: 0.2s;
}

/* CORES OFICIAIS */
.auth-social-button.google .icon-circle {
    background: #db4437;
}

.auth-social-button.apple .icon-circle {
    background: #000;
}

.auth-social-button.facebook .icon-circle {
    background: #3b5998;
}

/* ÍCONE */
.auth-social-button img {
    width: 24px;
    height: 24px;
}

/* HOVER */
.auth-social-button:hover .icon-circle {
    transform: scale(1.08);
}

/* =========================================================
   LINKS
========================================================= */

.auth-links {
    margin-top: 22px;
    font-size: 14px;
    color: #111;
    line-height: 1.8;
}

.auth-links a {
    color: #004aad;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links span {
    margin: 0 2px;
}

/* =========================================================
   ERROR
========================================================= */

.auth-error {
    display: block;
    margin: 8px 0 4px 0;
    color: #b30000;
    font-size: 14px;
}

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width: 480px) {

    .auth-card {
        max-width: 100%;
        padding: 26px 18px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-social-buttons {
        gap: 18px;
    }
}

.auth-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, #0d57b7 0%, #53a9ea 100%);
}

.auth-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.auth-card-verify {
    max-width: 560px;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: #0b3d91;
    text-align: center;
    margin-bottom: 16px;
}

.auth-subtitle {
    font-size: 15px;
    color: #444;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.5;
}

.auth-form {
    margin-top: 24px;
}

.auth-code-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.code-box {
    width: 56px;
    height: 60px;
    border: 1px solid #cfd8e3;
    border-radius: 14px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    outline: none;
    transition: 0.2s ease;
}

.code-box:focus {
    border-color: #0d57b7;
    box-shadow: 0 0 0 3px rgba(13, 87, 183, 0.12);
}

.auth-error {
    display: block;
    min-height: 22px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 14px;
    color: #d93025;
}

.auth-error.is-success {
    color: #198754;
}

.auth-error.is-error {
    color: #d93025;
}

.auth-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 14px;
    background: #0d57b7;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.auth-btn:hover {
    background: #004aad;
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-resend {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

.auth-link-btn {
    border: none;
    background: transparent;
    color: #0d57b7;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
}

.auth-link-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}

.auth-links a {
    color: #0d57b7;
    text-decoration: none;
    font-weight: 600;
}

#codeWrap.is-error .code-box {
    border-color: #d93025;
}

#codeWrap.is-success .code-box {
    border-color: #198754;
}

.shake {
    animation: shakeX 0.35s;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@media (max-width: 640px) {
    .auth-card {
        padding: 28px 18px;
        border-radius: 18px;
    }

    .auth-code-wrap {
        gap: 8px;
    }

    .code-box {
        width: 44px;
        height: 52px;
        font-size: 20px;
    }
}

.auth-actions,
.validMessage-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 10px;
}

.auth-btn,
.validMessage-btn,
.auth-secondary-link,
.validMessage-link {
    width: 100%;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-secondary-link,
.validMessage-link {
    text-decoration: none;
    background: #5b9df6;
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.auth-secondary-link:hover,
.validMessage-link:hover {
    background: #4a8eea;
    color: #ffffff;
    transform: translateY(-1px);
}