/* ─────────────────────────────────────────────────────────────────────
   MOOB CP — Portal do cliente
   Mobile-first · self-contained (sem fontes/recursos externos, pois o
   portal carrega ANTES da internet ser liberada) · tema futurista.
   ───────────────────────────────────────────────────────────────────── */

:root {
    --bg:      #05060f;
    --bg2:     #0a0e24;
    --ink:     #eaf2ff;
    --muted:   rgba(234, 242, 255, 0.52);
    --faint:   rgba(234, 242, 255, 0.28);
    --line:    rgba(255, 255, 255, 0.10);
    --glass:   rgba(255, 255, 255, 0.045);
    --cyan:    #22d3ee;
    --violet:  #a855f7;
    --grad:    linear-gradient(135deg, #22d3ee 0%, #6366f1 52%, #a855f7 100%);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
    position: relative;
}

/* ── Fundo: grade em perspectiva + brilho aurora ─────────────────────── */
.bg-grid {
    position: fixed;
    inset: -50% 0 0 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.14) 1px, transparent 1px);
    background-size: 44px 44px;
    transform: perspective(420px) rotateX(58deg);
    transform-origin: 50% 0;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 72%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 72%);
    animation: grid-drift 8s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 44px, 0 44px; }
}

.bg-glow {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(38% 30% at 22% 12%, rgba(34, 211, 238, 0.20), transparent 70%),
        radial-gradient(42% 34% at 82% 20%, rgba(168, 85, 247, 0.20), transparent 70%),
        radial-gradient(60% 50% at 50% 108%, rgba(99, 102, 241, 0.16), transparent 70%);
    animation: glow-pulse 7s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes glow-pulse {
    from { opacity: 0.75; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .bg-grid, .bg-glow { animation: none; }
}

/* ── Cartão ──────────────────────────────────────────────────────────── */
.cartao {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 30px 24px 24px;
    text-align: center;
    background: var(--glass);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 30px 60px rgba(0, 0, 0, 0.55),
        0 0 90px rgba(99, 102, 241, 0.12);
    animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

/* ── Marca ───────────────────────────────────────────────────────────── */
.marca {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.marca-glifo { filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45)); flex: none; }

.marca-nome {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.marca-nome span {
    margin-left: 6px;
    font-weight: 600;
    letter-spacing: 3px;
    -webkit-text-fill-color: var(--faint);
    color: var(--faint);
    background: none;
}

h1 {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.sub {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ── Passo a passo ───────────────────────────────────────────────────── */
.passos {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 22px;
}

.passos li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }

.passo-num {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.passos li:first-child .passo-num {
    color: var(--bg);
    background: var(--grad);
    border-color: transparent;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
}

.passo-seta { color: var(--faint); font-size: 14px; }

/* ── Rótulos e campos ────────────────────────────────────────────────── */
label {
    display: block;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    margin: 14px 0 7px;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.opcional { font-weight: 400; color: var(--faint); text-transform: none; letter-spacing: 0; }

.campo { position: relative; display: flex; align-items: center; }

.campo-ico {
    position: absolute;
    left: 14px;
    font-size: 16px;
    opacity: 0.85;
    pointer-events: none;
}

input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 16px; /* >=16px evita zoom automático no iOS */
    color: var(--ink);
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

#codigo { letter-spacing: 6px; text-align: center; font-weight: 700; padding-left: 44px; }

input::placeholder { color: var(--faint); letter-spacing: normal; }

input:focus {
    border-color: rgba(34, 211, 238, 0.7);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

/* ── Botões ──────────────────────────────────────────────────────────── */
button {
    position: relative;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
    background: var(--grad);
    background-size: 180% 180%;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
    animation: grad-shift 5s ease infinite;
}

@keyframes grad-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* brilho passando por cima do botão */
button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-18deg);
    animation: sheen 3.4s ease-in-out infinite;
}

@keyframes sheen {
    0%, 65% { left: -60%; }
    100%    { left: 130%; }
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

button:active:not(:disabled) { transform: translateY(0); }

button:disabled {
    filter: saturate(0.35) brightness(0.7);
    color: var(--faint);
    box-shadow: none;
    cursor: default;
    animation: none;
}

button:disabled::after { display: none; }

@media (prefers-reduced-motion: reduce) {
    button, button::after, .cartao { animation: none; }
}

/* ── Avisos ──────────────────────────────────────────────────────────── */
.aviso {
    display: flex;
    gap: 9px;
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    background: rgba(34, 211, 238, 0.08);
    color: rgba(190, 240, 255, 0.92);
    border: 1px solid rgba(34, 211, 238, 0.18);
}

.aviso-ico { flex: none; }

.aviso.erro {
    background: rgba(255, 71, 87, 0.10);
    color: rgba(255, 179, 186, 0.95);
    border-color: rgba(255, 71, 87, 0.24);
}

.aviso.info-sms { margin: 4px 0 4px; }

/* utilitário de ocultar — !important vence o display dos seletores por id */
.oculto { display: none !important; }

/* ── Selos de confiança ──────────────────────────────────────────────── */
.selos {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 22px 0 4px;
}

.selos li {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

/* ── Rodapé ──────────────────────────────────────────────────────────── */
.rodape {
    margin-top: 16px;
    font-size: 11px;
    color: var(--faint);
    line-height: 1.6;
}

.rodape-links { display: flex; justify-content: center; gap: 8px; }

.rodape a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
}

.rodape a:hover { text-decoration: underline; }

/* ── Ajuste para telas bem baixas ────────────────────────────────────── */
@media (max-height: 680px) {
    .passos { display: none; }
    .cartao { padding-top: 24px; }
}
