/* ============================================================
   KAVERI - acesso (login e cadastro)
   Tela propria das paginas de entrada. Prefixo kva- para nao
   colidir com o tema base (kv-*) nem com as telas internas.
   ============================================================ */

.kva-screen {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 0 26px;
    overflow: hidden;
    background:
        radial-gradient(520px 380px at 88% -8%, rgba(81, 171, 116, .34), transparent 66%),
        radial-gradient(420px 360px at -10% 34%, rgba(201, 162, 92, .16), transparent 70%),
        linear-gradient(168deg, #0b2a1b 0%, #103a26 48%, #0a2416 100%);
}

/* grao fino por cima do gradiente */
.kva-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .07;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.kva-glow {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(58px);
    will-change: transform;
}

.kva-glow--a {
    top: -110px;
    right: -90px;
    width: 300px;
    height: 300px;
    background: rgba(81, 171, 116, .40);
    animation: kvaDrift 18s ease-in-out infinite;
}

.kva-glow--b {
    top: 210px;
    left: -130px;
    width: 260px;
    height: 260px;
    background: rgba(201, 162, 92, .18);
    animation: kvaDrift 22s ease-in-out infinite reverse;
}

/* folhas gigantes no fundo, mesma linguagem da marca */
.kva-leaf {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    color: var(--kv-lime);
    opacity: .10;
}

.kva-leaf--a {
    top: 40px;
    right: -70px;
    width: 240px;
    transform: rotate(-14deg);
    animation: kvaSway 14s ease-in-out infinite;
}

.kva-leaf--b {
    top: 300px;
    left: -86px;
    width: 210px;
    transform: rotate(16deg);
    opacity: .07;
    animation: kvaSway 17s ease-in-out infinite reverse;
}

/* ---------- topo ---------- */

.kva-head {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 6px;
    color: var(--kv-paper);
    animation: kvaUp .5s both;
}

.kva-head__switch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(217, 239, 193, .28);
    background: rgba(255, 253, 248, .07);
    color: var(--kv-lime);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .01em;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.kva-head__switch:hover {
    background: rgba(255, 253, 248, .13);
    border-color: rgba(217, 239, 193, .46);
}

.kva-head__switch:active {
    transform: scale(.97);
}

.kva-head__switch svg {
    width: 13px;
    height: 13px;
}

/* ---------- chamada ---------- */

.kva-intro {
    position: relative;
    z-index: 3;
    padding: 26px 22px 20px;
    animation: kvaUp .6s .05s both;
}

/* Cadastro sem titulo de chamada: so o selo acima do cartao. */
.kva-intro--short {
    padding: 24px 22px 12px;
}

.kva-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(217, 239, 193, .10);
    border: 1px solid rgba(217, 239, 193, .22);
    color: var(--kv-lime);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.kva-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kv-leaf-2);
    box-shadow: 0 0 0 3px rgba(81, 171, 116, .22);
}

.kva-title {
    margin: 15px 0 0;
    font-family: var(--kv-display);
    font-size: 36px;
    line-height: 1.03;
    font-weight: 600;
    letter-spacing: -.035em;
    color: var(--kv-paper);
}

.kva-title em {
    font-style: italic;
    color: var(--kv-lime);
}

.kva-lead {
    margin: 11px 0 0;
    max-width: 300px;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 253, 248, .70);
}

/* ---------- cartao ---------- */

.kva-card {
    position: relative;
    z-index: 3;
    margin: 4px 12px 0;
    padding: 20px 17px 19px;
    border-radius: 26px;
    background: var(--kv-paper);
    border: 1px solid rgba(231, 220, 198, .85);
    box-shadow: 0 26px 60px rgba(5, 22, 14, .42), 0 2px 0 rgba(255, 255, 255, .6) inset;
    animation: kvaUp .7s .11s both;
}

.kva-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 16px;
}

.kva-card__title {
    margin: 0;
    font-family: var(--kv-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--kv-forest);
}

.kva-card__sub {
    margin: 4px 0 0;
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--kv-muted);
}

.kva-lock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--kv-mint);
    border: 1px solid #d9e8c6;
    color: var(--kv-green);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.kva-lock svg {
    width: 11px;
    height: 11px;
}

/* faixa de beneficios */
.kva-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 0 0 18px;
}

.kva-stat {
    padding: 10px 6px 9px;
    border-radius: 14px;
    text-align: center;
    background: linear-gradient(165deg, #f7fbf1 0%, #fffdf7 100%);
    border: 1px solid var(--kv-sand);
}

.kva-stat svg {
    width: 15px;
    height: 15px;
    margin: 0 auto 5px;
    color: var(--kv-leaf);
}

.kva-stat b {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--kv-forest);
    letter-spacing: -.01em;
}

.kva-stat span {
    display: block;
    margin-top: 2px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--kv-muted-2);
}

/* ---------- campos ---------- */

.kva-field {
    display: block;
    margin: 0 0 13px;
}

.kva-label {
    display: block;
    margin: 0 0 6px 2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--kv-muted);
}

.kva-box {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 12px;
    border-radius: 16px;
    background: #fffefa;
    border: 1.5px solid var(--kv-sand);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.kva-box:focus-within {
    background: #fff;
    border-color: var(--kv-leaf);
    box-shadow: 0 0 0 4px rgba(47, 143, 91, .12);
}

.kva-box__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--kv-mint);
    color: var(--kv-leaf);
    transition: background .16s ease, color .16s ease;
}

.kva-box:focus-within .kva-box__icon {
    background: var(--kv-leaf);
    color: #fff;
}

.kva-box__icon svg {
    width: 15px;
    height: 15px;
}

.kva-box input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--kv-sans);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--kv-ink);
    letter-spacing: .01em;
}

.kva-box input::placeholder {
    color: #a8b3a9;
    font-weight: 500;
    letter-spacing: 0;
}

.kva-box__eye {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--kv-muted);
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}

.kva-box__eye:hover {
    color: var(--kv-green);
    background: var(--kv-mint-2);
}

.kva-box__eye svg {
    width: 17px;
    height: 17px;
}

.kva-box__eye.is-on {
    color: var(--kv-leaf);
}

/* medidor de senha */
.kva-meter {
    display: none;
    gap: 5px;
    margin: 9px 2px 0;
}

.kva-meter.is-on {
    display: flex;
}

.kva-meter i {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: #ebe5d6;
    transition: background .2s ease;
}

.kva-meter[data-score="1"] i:nth-child(-n+1) { background: #c2564a; }
.kva-meter[data-score="2"] i:nth-child(-n+2) { background: #d0973f; }
.kva-meter[data-score="3"] i:nth-child(-n+3) { background: #9bb446; }
.kva-meter[data-score="4"] i { background: var(--kv-leaf); }

.kva-meter__label {
    display: flex;
    justify-content: space-between;
    margin: 5px 2px 0;
    font-size: 9.5px;
    color: var(--kv-muted);
}

.kva-meter__label b {
    color: var(--kv-green);
    font-weight: 800;
}

/* convite opcional sempre visivel */
.kva-label__opt {
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: none;
    opacity: .6;
}

/* convite ja preenchido pelo link: campo com tom de confirmado */
.kva-box--filled {
    border-color: #b9d8a4;
    background: #f6fbf0;
}

.kva-box__ok {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--kv-leaf);
    color: #fff;
}

.kva-box__ok svg {
    width: 13px;
    height: 13px;
}

.kva-field__hint {
    display: block;
    margin: 6px 2px 0;
    font-size: 9.5px;
    line-height: 1.5;
    color: var(--kv-muted);
}

/* termos */
.kva-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 3px 0 16px;
    font-size: 10px;
    line-height: 1.55;
    color: var(--kv-muted);
    cursor: pointer;
}

.kva-terms input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin: 1px 0 0;
    border-radius: 6px;
    border: 1.5px solid #d9cfb8;
    background: #fff;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.kva-terms input:checked {
    border-color: var(--kv-leaf);
    background-color: var(--kv-leaf);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.kva-terms b {
    color: var(--kv-green);
    font-weight: 800;
}

/* ---------- acoes ---------- */

.kva-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #238055 0%, var(--kv-forest) 100%);
    color: #fff;
    font-family: var(--kv-sans);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 16px 28px rgba(18, 63, 42, .26);
    transition: transform .15s ease, box-shadow .15s ease;
}

.kva-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .24) 47%, transparent 62%);
    transform: translateX(-130%);
    transition: transform .65s ease;
}

.kva-submit:hover::after {
    transform: translateX(130%);
}

.kva-submit:hover {
    box-shadow: 0 20px 32px rgba(18, 63, 42, .32);
}

.kva-submit:active {
    transform: scale(.985);
}

.kva-submit:disabled {
    cursor: default;
    opacity: .72;
    transform: none;
}

.kva-submit svg {
    width: 17px;
    height: 17px;
}

.kva-submit span {
    position: relative;
    z-index: 1;
}

.kva-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--kv-muted-2);
}

.kva-or::before,
.kva-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--kv-sand);
}

.kva-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 15px;
    border: 1.5px solid var(--kv-sand);
    background: #fffdf6;
    color: var(--kv-forest);
    font-size: 11.5px;
    font-weight: 800;
    transition: border-color .16s ease, background .16s ease;
}

.kva-ghost:hover {
    border-color: var(--kv-leaf);
    background: var(--kv-mint-2);
}

.kva-ghost svg {
    width: 15px;
    height: 15px;
    color: var(--kv-leaf);
}

.kva-forgot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: -3px 2px 15px;
}

.kva-forgot a {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--kv-green);
}

/* ---------- rodape ---------- */

.kva-help {
    display: flex;
    justify-content: center;
    margin: 20px 0 0;
    position: relative;
    z-index: 3;
}

.kva-help a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 253, 248, .16);
    background: rgba(255, 253, 248, .06);
    color: rgba(255, 253, 248, .82);
    font-size: 10px;
    font-weight: 700;
    transition: background .16s ease, border-color .16s ease;
}

.kva-help a:hover {
    background: rgba(255, 253, 248, .12);
    border-color: rgba(255, 253, 248, .28);
}

.kva-help svg {
    width: 13px;
    height: 13px;
    color: var(--kv-lime);
}

.kva-foot {
    position: relative;
    z-index: 3;
    margin: 14px auto 0;
    padding: 0 26px;
    text-align: center;
    font-size: 10px;
    line-height: 1.6;
    color: rgba(255, 253, 248, .56);
}

.kva-foot a {
    color: var(--kv-lime);
    font-weight: 800;
}

.kva-legal {
    position: relative;
    z-index: 3;
    margin: 10px auto 0;
    padding: 0 34px;
    text-align: center;
    font-size: 9px;
    line-height: 1.55;
    color: rgba(255, 253, 248, .34);
}

/* alerta de erro dentro do cartao */
.kva-card .kv-alert {
    border-radius: 13px;
    font-weight: 600;
}

/* ---------- animacoes ---------- */

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

@keyframes kvaDrift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-18px, 22px, 0) scale(1.08); }
}

@keyframes kvaSway {
    0%, 100% { transform: rotate(-14deg) translateY(0); }
    50% { transform: rotate(-9deg) translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
    .kva-head,
    .kva-intro,
    .kva-card,
    .kva-glow,
    .kva-leaf {
        animation: none;
    }

    .kva-submit::after {
        display: none;
    }
}

@media (max-width: 360px) {
    .kva-title { font-size: 32px; }
    .kva-card { margin: 4px 10px 0; padding: 18px 14px 16px; }
    .kva-stat b { font-size: 9px; }
}
