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

body {
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    background-color: #f9fafb;
    color: #1e293b;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('assets/background.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 60%;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 24px;
    padding-bottom: 56px;
}

.view.active {
    display: flex;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 350px;
}

h1 {
    font-weight: 500;
    font-size: 20px;
    line-height: normal;
}

.subtitle {
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding-top: 16px;
}

.btn-container {
    background: #dde1e8;
    padding: 6px;
    border-radius: 40px;
    box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.btn-container.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit {
    margin-top: 8px;
}

.btn {
    background: #b5c2ff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 52px;
    padding: 0 16px;
    border-radius: 40px;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: normal;
    color: #0a1023;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    transition: filter 0.15s ease;
}

.btn:hover:not(:disabled) {
    filter: brightness(0.95);
}

.btn:active:not(:disabled) {
    filter: brightness(0.9);
}

.btn:disabled {
    cursor: not-allowed;
}

.btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn.loading {
    filter: brightness(0.9);
    pointer-events: none;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.input-group label {
    font-size: 10px;
    font-weight: 400;
    line-height: normal;
    color: #4b5563;
    text-transform: uppercase;
}

.input-group input {
    background: #fafaf9;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    height: 44px;
    padding: 12px 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #1e293b;
    box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
    outline: none;
    width: 100%;
    transition: border-color 0.15s ease;
}

.input-group input:focus {
    border-color: #bae6fd;
    box-shadow: inset 0px 2px 5px 0px #def0fb;
}

.mensagem {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    text-align: center;
}

.mensagem.hidden {
    display: none;
}

.mensagem.erro {
    background: #ffb4b4;
    color: #1e293b;
}

.mensagem.sucesso {
    background: #d4edda;
    color: #1e293b;
}

.voltar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 24px;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    color: #1e293b;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.voltar:hover {
    opacity: 0.7;
}

.voltar svg {
    width: 24px;
    height: 24px;
}

.strength-bar {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.strength-track {
    position: relative;
    width: 100%;
    height: 7px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    box-shadow: inset 0px 0.4px 1.7px 0px rgba(0, 0, 0, 0.25);
}

.strength-fill {
    position: absolute;
    top: -1px;
    left: 0;
    height: 7px;
    border-radius: 20px;
    width: 0;
    transition: width 0.25s ease, background-color 0.25s ease;
    box-shadow: inset 0px -0.24px 0.96px 0px rgba(0, 0, 0, 0.25);
}

.strength-fill.nivel-1 { background: #ffb4b4; }
.strength-fill.nivel-2 { background: #fca5a5; }
.strength-fill.nivel-3 { background: #fde68a; }
.strength-fill.nivel-4 { background: #86efac; }
.strength-fill.nivel-5 { background: #4ade80; }

.strength-text {
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
    min-height: 15px;
}

.criterios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.criterio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
}

.criterio .icone-ok {
    display: none;
}

.criterio.ok .icone-erro {
    display: none;
}

.criterio.ok .icone-ok {
    display: block;
}

.criterio svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    padding-top: 8px;
}

.code-input {
    width: 48px;
    height: 52px;
    background: #fafaf9;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s ease;
    flex-shrink: 1;
    min-width: 0;
}

.code-input:focus {
    border-color: #bae6fd;
    box-shadow: inset 0px 2px 5px 0px #def0fb;
}

.reenviar-texto {
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    color: #4b5563;
    padding-top: 8px;
}

.reenviar-link {
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.reenviar-link:hover {
    opacity: 0.7;
}

.reenviar-link.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.card-sucesso {
    padding-top: 32px;
}

.sucesso-icone {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.sucesso-icone img,
.sucesso-icone svg {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

footer {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
    color: #1e293b;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

footer .accent {
    color: #1d4ed8;
}

@media (max-width: 480px) {
    body::before {
        background-size: 100%;
    }

    .view {
        padding: 16px;
        padding-bottom: 56px;
    }

    .card {
        max-width: 100%;
    }

    .sucesso-icone img,
    .sucesso-icone svg {
        width: 140px;
        height: 140px;
    }

    .sucesso-icone {
        padding: 24px 0;
    }

    .code-inputs {
        gap: 6px;
    }

    .code-input {
        width: 42px;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .code-input {
        width: 36px;
        height: 44px;
        font-size: 18px;
        border-radius: 6px;
    }

    .code-inputs {
        gap: 4px;
    }
}
