/* ===== Base visual ===== */
:root {
    --airocks-primary: #855AEC;
    --airocks-glow: rgba(166,142,255,.22);
    --text: #ffffff;
    --text-muted: #cbd5e1;
    --border: rgba(148,163,184,.35);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: url('/img/FUNDO-GRADIENT.png') no-repeat center center fixed;
    background-size: cover;
    overflow: hidden; /* a rolagem ficará no container da página */
}

/* ===== Página de login (apenas o frame) ===== */
.login-vr.only-login {
    min-height: 100dvh;
    min-height: 100svh;
    min-height: calc(var(--vh, 1vh) * 100); /* compat mobile */
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at 15% -10%, rgba(133,90,236,.20), transparent 55%), radial-gradient(circle at 95% 10%, rgba(56,189,248,.12), transparent 45%);
}

/* Form container */
.only-login .login-form {
    width: min(560px, 100%);
    padding: 0;
}

/* Card */
.only-login .login-card {
    width: 100%;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(15,23,42,.96), rgba(15,23,42,.84));
    box-shadow: 0 18px 60px rgba(15,23,42,.9), 0 0 26px rgba(129,140,248,.3) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: grid;
    grid-template-rows: auto 1fr; /* branding | form (scroll se necessário) */
    gap: 12px;
    max-height: 86dvh;
}

/* Branding */
.logo {
    width: 72px;
    height: auto;
}

.title_login {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0;
    background: linear-gradient(120deg,#a855f7,#38bdf8,#22c55e);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 10px 40px rgba(124,58,237,.35);
}

/* Form */
.only-login .login-card form {
    overflow: auto;
    padding-right: 4px; /* rolagem suave no mobile sem recortar o glow */
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    margin-bottom: 10px;
}

    .form-row label {
        font-size: .95rem;
        color: #e5e7eb;
    }

    .form-row input {
        height: 44px;
        padding: 0 12px;
        outline: none;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: 12px;
        background: rgba(255,255,255,.05);
        color: #fff;
        font-size: 1rem;
        transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
    }

        .form-row input:focus {
            border-color: #5a3ed3;
            box-shadow: 0 0 0 3px var(--airocks-glow);
        }

.field-error {
    color: #ffb3b3;
    font-size: .85rem;
}

.login-error {
    margin-top: 10px;
    color: #fecaca;
    font-size: .95rem;
}

/* ===== Ações: botões lado a lado ===== */
.login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

    /* Força 1 linha no desktop */
    .login-actions.login-actions-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        align-items: center;
        justify-content: flex-start;
    }

/* Forms GET não podem “quebrar” o alinhamento */
.inline-form {
    display: inline-flex;
    margin: 0;
}

/* Responsivo: no mobile pode quebrar em 2 linhas */
@media (max-width: 560px) {
    .login-actions.login-actions-row {
        flex-wrap: wrap;
    }
}

.btn-future.mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-width: 140px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.35);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .02em;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    cursor: pointer;
    user-select: none;
}

.mc-btn-primary {
    background: linear-gradient(135deg,#8b5cf6,#38bdf8);
    color: #fff;
    border-color: rgba(139,92,246,.6);
    box-shadow: 0 0 18px rgba(139,92,246,.35);
}

    .mc-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 0 26px rgba(56,189,248,.45);
    }

.mc-btn-secondary {
    background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(56,189,248,.18));
    color: #e5e7eb;
    border-color: rgba(148,163,184,.45);
}

    .mc-btn-secondary:hover {
        background: linear-gradient(135deg, rgba(139,92,246,.28), rgba(56,189,248,.28));
        transform: translateY(-1px);
    }

.mc-btn-ghost {
    background: rgba(15,23,42,.35);
    color: #e5e7eb;
    border-color: rgba(148,163,184,.35);
    backdrop-filter: blur(6px);
}

    .mc-btn-ghost:hover {
        background: rgba(15,23,42,.55);
        transform: translateY(-1px);
    }

/* ===== Responsividade ===== */
@media (max-width: 560px) {
    .only-login .login-card {
        padding: 16px;
    }

    .btn-future.mc-btn {
        min-width: 48%;
        height: 40px;
    }
}

@media (max-width: 400px) {
    .btn-future.mc-btn {
        min-width: 100%;
    }
}

.inline-form {
    display: inline;
    margin: 0;
}

    .inline-form button {
        /* mantém o estilo igual aos antigos <a> */
    }


.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 por linha = 2 linhas de 3 */
    gap: 5px;
    margin-top: 5px;
}

.icon-btn {
    background-color: #836FFF;
    border: none;
    padding: 3px;
    font-size: 12px;
    color: white;
    border-radius: 8px;
    margin-top: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .icon-btn:hover {
        background: rgba(166,142,255,0.25);
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(166,142,255,0.4);
    }

.btn-primario {
    background: linear-gradient(90deg, #9c27ff, #ff4081);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 8px 8px;
    cursor: pointer;
    font-weight: 600;
}

    .btn-primario:hover {
        opacity: 0.9;
    }

/* 4 botões iguais em uma linha */
.login-actions.login-actions-equal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-top: 12px;
}

    /* form não pode quebrar o grid */
    .login-actions.login-actions-equal .inline-form {
        margin: 0;
        width: 100%;
    }

        /* garante que TODOS os botões preencham a célula */
        .login-actions.login-actions-equal > button,
        .login-actions.login-actions-equal .inline-form > button {
            width: 100%;
            height: 46px; /* ajuste fino */
            min-height: 46px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 14px;
            white-space: nowrap; /* evita quebrar texto */
        }


/* container: 4 colunas iguais */
.login-actions-equal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-top: 12px;
}

    /* forms GET não quebram o grid */
    .login-actions-equal .inline-form {
        margin: 0;
        width: 100%;
    }

    /* força mesmos tamanhos (independente de ser ico-btn ou btn-primario) */
    .login-actions-equal .ico-btn,
    .login-actions-equal .btn-primario {
        width: 100%;
        height: 32px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 14px;
        white-space: nowrap;
    }

/* responsivo: 2 por linha no tablet e 1 no mobile */
@media (max-width: 720px) {
    .login-actions-equal {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .login-actions-equal {
        grid-template-columns: 1fr;
    }
}
