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

/* ================= FONTE ================= */
@font-face {
    font-family: 'BalooBhaijaan';
    src: url('/public/assets/fonts/BalooBhaijaan.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* BASE */
html,
body {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'BalooBhaijaan', 'Segoe UI', sans-serif;
    min-height: 100vh;
    background-color: #f4f6f8;
}

/* BACKGROUND */
.background-full {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.background-full::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/login/backteste.png");
    background-repeat: no-repeat;
    background-size: cover;

    /*
     * ─── AJUSTE DE POSIÇÃO DO BACKGROUND ───────────────────────────────────────
     * background-position: X Y
     *   X → "left" / "center" / "right" / porcentagem (ex: 60%) / pixels (ex: 40px)
     *   Y → "top" / "center" / "bottom" / porcentagem (ex: 60%) / pixels (ex: 40px)
     *
     * Exemplos rápidos:
     *   center 30%   → centraliza horizontalmente, sobe a imagem
     *   center 60%   → centraliza horizontalmente, desce a imagem  ← valor atual
     *   center 80%   → desce ainda mais
     *   center bottom → cola no fundo
     * ────────────────────────────────────────────────────────────────────────────
     */
    background-position: center 30%; /* ← altere o segundo valor para mover para cima/baixo */

    transform: translateX(11%); /* ← ajusta deslocamento horizontal da imagem */
}

/* ===== MODAL ===== */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-termos {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}

.modal-content {
    background: #ffffff;
    padding: 28px;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.08);
    animation: fadeInModal 0.2s ease;
}

.termos-clean {
    max-width: 460px;
    text-align: left;
}

.termos-clean h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.termos-resumo {
    font-size: 15px;
    margin-bottom: 10px;
    color: #333;
}

.termos-resumo a {
    color: #0C5F8C;
    font-weight: 600;
    text-decoration: none;
}

.termos-resumo a:hover {
    text-decoration: underline;
}

.termos-info {
    font-size: 13px;
    color: #777;
    margin-bottom: 22px;
    line-height: 1.5;
}

/* Botão aceitar */
.btn-aceitar {
    background: #0C5F8C;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-aceitar:hover {
    background: #09486b;
    transform: translateY(-1px);
}

.btn-aceitar:disabled {
    background: #9aa4ab;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

/* Botão cancelar */
.btn-cancelar {
    background: #f1f3f5;
    color: #555;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-cancelar:hover {
    background: #e2e6ea;
}

.termos-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.termos-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 3px 0 0 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #0C5F8C;
    -webkit-appearance: checkbox;
    appearance: checkbox;
}

.termos-check label {
    margin: 0;
    cursor: pointer;
}

.termos-check a {
    color: #0C5F8C;
    font-weight: 600;
    text-decoration: none;
}

.termos-check a:hover {
    text-decoration: underline;
}

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

/* ===== LINK FIXO TERMOS ===== */
.link-termos-fixo {
    position: fixed;
    bottom: 18px;
    left: 40px;
    background: #ffffff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    color: #0C5F8C;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    z-index: 100;
}

.link-termos-fixo:hover {
    background: #f5f7f9;
    transform: translateY(-2px);
}

/* ===== WRAPPER ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(20px, 4vw, 60px) clamp(20px, 6vw, 120px);
}

/* ===== CARD ===== */
.login-card {
    width: 100%;
    max-width: clamp(340px, 30vw, 460px);
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 4px 10px rgba(0, 0, 0, 0.05);
}

/* INNER */
.login-card-inner {
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: clamp(10px, 1.5vw, 16px) clamp(16px, 3.5vw, 36px);
}

/* LOGO */
.login-logo {
    display: block;
    margin: 0 auto 6px;
    max-width: 85px;
    height: auto;
}

/* TITLE */
.login-card h1 {
    text-align: center;
    font-size: clamp(16px, 2vw, 19px);
    font-weight: 600;
    color: #0C5F8C;
    margin-bottom: 10px;
}

/* SOCIAL LOGIN */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 12px;
    min-height: 38px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-size: clamp(12px, 1.5vw, 13px);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    width: 100%;
    text-align: center;
}

.social-btn img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.social-btn:hover {
    background: #f5f7f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* DIVIDER */
.divider {
    text-align: center;
    margin: 8px 0;
    position: relative;
}

.divider span {
    font-size: 11px;
    color: #999;
    background: #fff;
    padding: 0 10px;
    position: relative;
    z-index: 1;
    display: inline-block;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

/* LABEL */
label {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

/* INPUT */
input:not([type="checkbox"]) {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px; /* 16px previne zoom automático em iOS */
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 7px;
    font-family: inherit;
    font-weight: normal;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

/* Placeholder com fonte mais leve */
input::placeholder {
    font-weight: 300;
    color: #b0b8c1;
    font-size: 14px;
}

input:not([type="checkbox"]):focus {
    outline: none;
    border-color: #0C5F8C;
    box-shadow: 0 0 0 3px rgba(12, 95, 140, 0.12);
}

/* PASSWORD */
.password-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.password-wrapper input {
    margin-bottom: 0;
    padding-right: 44px; /* espaço para o ícone */
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s;
    /* Área de toque maior em mobile */
    min-width: 36px;
    min-height: 36px;
}

.toggle-password:hover {
    color: #0C5F8C;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* LINKS */
.form-links {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.form-links a {
    font-size: 13px;
    color: #0C5F8C;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

/* BUTTON */
.btn-login {
    width: 100%;
    padding: 9px;
    background: #0C5F8C;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.btn-login:hover {
    background: #09486b;
}

/* ========================================
   BREAKPOINTS
   ======================================== */

/* Telas grandes (1400px+) */
@media (min-width: 1400px) {
    .login-card {
        max-width: 500px;
    }

    .background-full::after {
    background-position: center 30%; /* ← altere o segundo valor para mover para cima/baixo */

}
}

/* Tablets landscape e desktops pequenos (1025px – 1399px) */
@media (max-width: 1399px) and (min-width: 1025px) {
    .login-wrapper {
        padding-left: clamp(40px, 5vw, 100px);
    }

        .background-full::after {
    background-position: center 20%; /* ← altere o segundo valor para mover para cima/baixo */

}
}

/* Tablets (769px – 1024px) */
@media (max-width: 1024px) {
    .login-wrapper {
        justify-content: center;
        padding: 30px 24px;
    }

    .login-card {
        max-width: 460px;
    }

    .login-card-inner {
        padding: 18px 28px;
    }

    .background-full {
        background-position: center;
    }

    .link-termos-fixo {
        right: 20px;
        bottom: 14px;
    }
            .background-full::after {
    background-position: center 10%; /* ← altere o segundo valor para mover para cima/baixo */

}
}

/* Tablets portrait (481px – 768px) */
@media (max-width: 768px) {
    .login-wrapper {
        justify-content: center;
        align-items: center;
        padding: 24px 16px 80px; /* padding bottom evita sobreposição com link fixo */
    }

    .login-card {
        max-width: 460px;
        width: 100%;
    }

    .login-card-inner {
        padding: 16px 20px;
    }

    .background-full {
        background-position: center;
    }

    .social-btn {
        font-size: 13px;
        min-height: 44px;
    }

    /* Modal ocupa mais tela */
    .modal-content {
        padding: 22px 20px;
    }

    .modal-actions {
        justify-content: stretch;
    }

    .btn-cancelar,
    .btn-aceitar {
        flex: 1;
        text-align: center;
    }
}

/* Mobile (até 480px) */
@media (max-width: 480px) {
    html,
    body {
        overflow: auto;
    }

    .login-wrapper {
        padding: 16px 12px 80px;
        align-items: center;
    }

    .login-card {
        border-radius: 14px;
        padding: 12px;
    }

    .login-card-inner {
        padding: 14px 14px;
    }

    .login-card h1 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .login-logo {
        max-width: 90px;
        margin-bottom: 8px;
    }

    .social-btn {
        font-size: 12px;
        gap: 8px;
        padding: 8px;
        min-height: 44px;
    }

    .divider span {
        font-size: 10px;
        padding: 0 6px;
    }

    .btn-login {
        font-size: 15px;
        padding: 13px; /* maior área de toque */
    }

    input {
        padding: 12px;
    }

    .link-termos-fixo {
        bottom: 12px;
        right: 12px;
        font-size: 12px;
        padding: 7px 12px;
    }

    /* Modal em tela cheia no mobile pequeno */
    .modal-termos {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        border-radius: 16px 16px 0 0;
        padding: 20px 18px 28px;
        max-width: 100%;
        width: 100%;
        animation: slideUpModal 0.25s ease;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .btn-cancelar,
    .btn-aceitar {
        width: 100%;
        padding: 12px;
        text-align: center;
    }
}

/* Mobile muito pequeno (até 360px) */
@media (max-width: 360px) {
    .login-card-inner {
        padding: 12px;
    }

    .social-btn span,
    .social-btn {
        font-size: 11px;
    }

    .login-card h1 {
        font-size: 18px;
    }
}

/* Animação alternativa para modal mobile (slide-up) */
@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Previne duplo-tap zoom em botões (iOS) */
button,
.social-btn,
.btn-login,
.btn-aceitar,
.btn-cancelar {
    touch-action: manipulation;
}