/* ===== Paleta & base (tema gradiente gaming, legível) ===== */
:root {
    --gradient-hero:
        radial-gradient(1200px 700px at 80% -10%, #1b2c69 0, transparent 60%),
        radial-gradient(800px 500px at -10% 110%, #8128ff40 0, transparent 60%),
        linear-gradient(135deg, #0d0f1a 0%, #101a3a 50%, #0e1430 100%);
    --brand-1: #ff8a00;
    --brand-2: #ffd257;
    --accent-1: #31e8a7;
    --accent-2: #7aa7ff;
    --text: #f5f7ff;
    --muted: #b9c0d4;
    --line: #263453;
    --ring: #ff8a0050;
    --ok-1: #2fe079;
    --ok-2: #11b35d;
    --bad-1: #ff4d6d;
    --bad-2: #d43852;
    --card: #121a33;
    --card-2: #0f1730;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    color: var(--text);
    font:
        16px/1.45 "Inter",
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto;
    background: var(--gradient-hero);
    background-attachment: fixed;
}

.wrap {
    max-width: 760px;
    margin: 48px auto;
    padding: 0 20px;
}
.center {
    text-align: center;
}
.brand {
    font-weight: 800;
    font-size: 44px;
    letter-spacing: 0.2px;
    text-shadow: 0 4px 24px #0006;
}
.subtitle {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--brand-2), var(--brand-1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.title {
    margin: 26px 0 10px;
    font-size: 26px;
}
.title-accent {
    color: var(--brand-2);
}
.lead {
    color: var(--muted);
    margin: 16px auto 28px;
    max-width: 640px;
}

.card {
    background: linear-gradient(180deg, #1a2447 0%, var(--card) 60%, var(--card-2) 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px;
    box-shadow:
        0 12px 40px #04081680,
        inset 0 1px 0 #ffffff08;
}
.label {
    display: block;
    margin: 0 0 10px 4px;
    color: #9fb0d3;
}

/* Input CPF */
.inp {
    display: block;
    width: 100%;
    padding: 18px 22px;
    border-radius: 16px;
    border: 1px solid #2a3a66;
    background: #0d1633;
    color: var(--text);
    font-size: 20px;
    outline: none;
    box-shadow: inset 0 0 0 1px #0008;
}
.inp::placeholder {
    color: #90a0c9;
}
.inp:focus {
    border-color: var(--brand-1);
    box-shadow:
        0 0 0 6px var(--ring),
        inset 0 0 0 1px #0008;
}

/* Botões */
.btn {
    display: block;
    width: 100%;
    border: 0;
    padding: 16px 20px;
    margin-top: 18px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.2px;
}
.btn-primary {
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    color: #1b1206;
    text-shadow: 0 1px 0 #ffffff55;
    box-shadow:
        0 8px 24px #ff8a0022,
        inset 0 -2px 0 #0005;
}
.btn-primary:hover {
    filter: brightness(1.05);
}
.btn-primary:disabled {
    background: linear-gradient(180deg, #3b4657, #6a7487);
    color: #0b0f1a;
    cursor: not-allowed;
    opacity: 1;
    filter: saturate(0.3);
    box-shadow: none;
}
.btn-link {
    background: linear-gradient(180deg, #121a33, #0e1730);
    color: #dbe6ff;
    border: 1px solid #2a3a66;
}
.hint {
    font-size: 13px;
    color: #9fb0d3;
    margin-top: 10px;
}
.extra {
    margin-top: 22px;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: #050814a8;
    backdrop-filter: blur(2px);
    z-index: 50;
}
.modal {
    width: min(560px, 92vw);
    background: linear-gradient(180deg, #141d3a, #0f1730);
    border: 1px solid #2a3a66;
    border-radius: 24px;
    box-shadow: 0 30px 60px #000a;
    overflow: hidden;
}
.modal header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 24px;
    color: #fff;
    font-weight: 800;
}
.ok {
    background: linear-gradient(180deg, var(--ok-1), var(--ok-2));
}
.bad {
    background: linear-gradient(180deg, var(--bad-1), var(--bad-2));
}
.body {
    padding: 20px 24px;
    color: #e8edff;
}
.actions {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}
.cta {
    flex: 1;
    padding: 14px 18px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}
.cta-ok {
    background: linear-gradient(180deg, #31e8a7, #1bbf86);
    color: #041e14;
}
.cta-alt {
    background: #101a3a;
    color: #cfe0ff;
    border: 1px solid #2b3c6b;
}
.cta-danger {
    background: linear-gradient(180deg, #ff5a7a, #e23d5d);
    color: #fff;
    box-shadow:
        0 8px 24px #ff5a7a22,
        inset 0 -2px 0 #0005;
}

.close {
    margin-left: auto;
    background: transparent;
    border: 0;
    font-size: 26px;
    color: #fff;
    cursor: pointer;
}
/* Confetti: overlay fixo, fora do fluxo, e invisível até disparar */
#confetti-canvas {
    position: fixed; /* não ocupa espaço no layout */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0; /* equivalente ao inset:0; com melhor compat. */
    width: 100vw;
    height: 100dvh; /* usa viewport dinâmica no mobile */
    display: none; /* começa oculto */
    pointer-events: none; /* não bloqueia cliques */
    z-index: 9999; /* acima do conteúdo/modal */
}
