@font-face {
    font-family: 'Qindret';
    src: url('font/Qindret Demo.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Electrolize';
    src: url('font/Electrolize-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EagleLake';
    src: url('font/EagleLake-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #100A1C;
    --bg-elevada: #1A1128;
    --bg-cartao: #170F26;
    --borda: rgba(241, 237, 249, 0.09);
    --primaria: #4A1B7A;
    --primaria-clara: #7A3FC2;
    --acento: #2FD9C7;
    --texto: #F1EDF9;
    --texto-fraco: #9C90B5;
    --sombra: 0 20px 60px rgba(0, 0, 0, 0.45);
    --raio: 14px;
    --sombra-forte: 0 35px 90px rgba(0, 0, 0, 0.55), 0 15px 35px rgba(0, 0, 0, 0.4);
    --sombra-hover-acento: 0 45px 110px rgba(0, 0, 0, 0.6), 0 0 70px color-mix(in srgb, var(--acento) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--acento) 35%, transparent);
    --fundo-linhas-bg: #000000;
    --fundo-linhas-cor: #7A3FC2;
    --logo-cor: var(--acento);
    --aviso-sino: #FFC93C;
}

:root[data-tema="light"] {
    --bg: #F5F1FA; --bg-elevada: #FFFFFF; --bg-cartao: #FFFFFF;
    --borda: rgba(74, 27, 122, 0.14);
    --texto: #1C1329; --texto-fraco: #5F5474;
    --acento: #1FA294;
    --sombra: 0 12px 40px rgba(74, 27, 122, 0.12);
    --sombra-forte: 0 30px 80px rgba(74, 27, 122, 0.28), 0 12px 30px rgba(74, 27, 122, 0.2);
    --sombra-hover-acento: 0 40px 100px rgba(74, 27, 122, 0.3), 0 0 70px rgba(74, 27, 122, 0.4), 0 0 0 1px rgba(74, 27, 122, 0.35);
    --fundo-linhas-bg: #FFFFFF;
    --fundo-linhas-cor: #7A3FC2;
    --logo-cor: var(--primaria-clara);
    --aviso-sino: #C98A00;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--texto);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.03em;
    min-height: 100%;
}

@property --r {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

.retrato-tema-antigo {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    overflow: hidden;
    --ox: 50%;
    --oy: 50%;
    -webkit-mask-image: radial-gradient(circle at var(--ox) var(--oy), transparent 0, transparent calc(var(--r) - 2px), black var(--r));
    mask-image: radial-gradient(circle at var(--ox) var(--oy), transparent 0, transparent calc(var(--r) - 2px), black var(--r));
    transition: --r 1200ms cubic-bezier(.65, 0, .35, 1);
}

.tema-congelado-dark {
    background: #100A1C;
    --bg: #100A1C; --bg-elevada: #1A1128; --bg-cartao: #170F26;
    --borda: rgba(241, 237, 249, 0.09);
    --acento: #2FD9C7;
    --texto: #F1EDF9; --texto-fraco: #9C90B5;
    --sombra: 0 20px 60px rgba(0, 0, 0, 0.45);
    --sombra-forte: 0 35px 90px rgba(0, 0, 0, 0.55), 0 15px 35px rgba(0, 0, 0, 0.4);
    --sombra-hover-acento: 0 45px 110px rgba(0, 0, 0, 0.6), 0 0 70px color-mix(in srgb, var(--acento) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--acento) 35%, transparent);
    --fundo-linhas-bg: #000000;
    --fundo-linhas-cor: #7A3FC2;
    --logo-cor: var(--acento);
}
.tema-congelado-light {
    background: #F5F1FA;
    --bg: #F5F1FA; --bg-elevada: #FFFFFF; --bg-cartao: #FFFFFF;
    --borda: rgba(74, 27, 122, 0.14);
    --texto: #1C1329; --texto-fraco: #5F5474;
    --acento: #1FA294;
    --sombra: 0 12px 40px rgba(74, 27, 122, 0.12);
    --sombra-forte: 0 30px 80px rgba(74, 27, 122, 0.28), 0 12px 30px rgba(74, 27, 122, 0.2);
    --sombra-hover-acento: 0 40px 100px rgba(74, 27, 122, 0.3), 0 0 70px rgba(74, 27, 122, 0.4), 0 0 0 1px rgba(74, 27, 122, 0.35);
    --fundo-linhas-bg: #FFFFFF;
    --fundo-linhas-cor: #7A3FC2;
    --logo-cor: var(--primaria-clara);
}

.fundo-linhas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.container-central {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cartao {
    position: relative;
    background: var(--bg-cartao);
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.marca {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}
.marca span { font-family: 'EagleLake', 'Electrolize', sans-serif; font-weight: 400; font-size: 20px; letter-spacing: 0.05em; }
.cartao .marca { justify-content: center; }
.cartao .marca span {
    font-size: 90px;
    letter-spacing: 0.16em;
    color: var(--logo-cor);
}

.logo-foros {
    font-family: 'EagleLake', 'Electrolize', sans-serif;
    font-weight: 400;
    letter-spacing: 0.16em;
    color: var(--logo-cor);
}

label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--texto-fraco);
    margin-bottom: 6px;
}

input[type="text"], input[type="email"], input[type="password"], input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-elevada);
    border: 2px solid var(--borda);
    border-radius: 10px;
    color: var(--texto);
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    height: 46px;
}
input:focus {
    border-color: var(--acento);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 20%, transparent);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--texto);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-elevada) inset;
    box-shadow: 0 0 0px 1000px var(--bg-elevada) inset;
    caret-color: var(--texto);
    transition: background-color 5000s ease-in-out 0s, color 5000s ease-in-out 0s;
}
input:autofill {
    background-color: var(--bg-elevada);
    color: var(--texto);
}

textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-elevada);
    border: 2px solid var(--borda);
    border-radius: 10px;
    color: var(--texto);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    resize: vertical;
    min-height: 90px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea:focus {
    border-color: var(--acento);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 20%, transparent);
}

.campo { margin-bottom: 18px; }
.campo-com-icone { position: relative; }
.campo-com-icone input { padding-right: 44px; }
.botao-icone-campo {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--texto-fraco);
    padding: 8px;
    line-height: 0;
    border-radius: 8px;
}
.botao-icone-campo:hover { color: var(--acento); }
.botao-icone-campo svg { width: 18px; height: 18px; display: block; }

.botao {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primaria-clara), var(--primaria));
    color: #fff;
    font-family: 'Electrolize', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
.botao:hover { transform: translateY(-1px); box-shadow: 0 8px 24px color-mix(in srgb, var(--primaria) 45%, transparent); }

.link-discreto {
    display: inline-block;
    margin-top: 18px;
    font-size: 13px;
    color: var(--texto-fraco);
    text-align: center;
    width: 100%;
}
.link-discreto a { color: var(--acento); text-decoration: none; }
.link-discreto a:hover { text-decoration: underline; }

.escolha-papel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.opcao-papel {
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    background: var(--bg-elevada);
    transition: border-color .15s ease, background .15s ease;
}
.opcao-papel:hover { border-color: var(--acento); }
.opcao-papel.selecionada { border-color: var(--acento); background: color-mix(in srgb, var(--acento) 10%, var(--bg-elevada)); }
.opcao-papel .rotulo { font-family: 'Electrolize'; font-weight: 600; font-size: 14px; }
.opcao-papel .desc { font-size: 12px; color: var(--texto-fraco); margin-top: 4px; }

.botao-tema {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 12px;
    border: 1px solid var(--borda);
    background: var(--bg-cartao);
    color: var(--acento);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s ease, transform .15s ease;
}
.botao-tema:hover { border-color: var(--acento); transform: translateY(-1px); }
.botao-tema svg { width: 22px; height: 22px; display: block; }
.botao-tema-caixa { position: absolute; top: 20px; right: 20px; }

@media (max-width: 480px) {
    .cartao { padding: 28px 22px; }
    .escolha-papel { grid-template-columns: 1fr; }
}

.consentimento-cookies-fundo {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(6, 3, 12, 0.82);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.consentimento-cookies-cartao {
    background: var(--bg-cartao); border: 1px solid var(--borda); border-radius: var(--raio);
    box-shadow: var(--sombra-forte);
    max-width: 460px; width: 100%;
    padding: 32px;
}
.consentimento-cookies-cartao h2 { font-family: 'Electrolize', sans-serif; font-size: 19px; margin: 0 0 12px; letter-spacing: 0.03em; }
.consentimento-cookies-cartao p { font-size: 13.5px; line-height: 1.6; color: var(--texto-fraco); margin: 0 0 14px; }
.consentimento-cookies-detalhes { margin-bottom: 22px; font-size: 13px; color: var(--texto-fraco); }
.consentimento-cookies-detalhes summary { cursor: pointer; color: var(--acento); font-weight: 600; }
.consentimento-cookies-detalhes ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.7; }
.consentimento-cookies-botoes { display: flex; gap: 10px; margin-top: 4px; }
.consentimento-cookies-botoes .botao { margin-top: 0; }
.botao-secundario {
    background: transparent;
    border: 1px solid var(--borda);
    color: var(--texto);
}
.botao-secundario:hover { border-color: var(--acento); box-shadow: none; color: var(--acento); }

.guarda-carregando {
    position: fixed; inset: 0; z-index: 99998;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
}
.guarda-carregando .aro {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid var(--borda); border-top-color: var(--acento);
    animation: girar-aro 700ms linear infinite;
}
@keyframes girar-aro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .guarda-carregando .aro { animation: none; }
}

.erro-formulario {
    display: flex; align-items: center; gap: 8px;
    background: color-mix(in srgb, #E85D5D 14%, transparent);
    color: #E85D5D;
    border: 1px solid color-mix(in srgb, #E85D5D 35%, transparent);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}
.erro-formulario[hidden] { display: none; }
.erro-formulario svg { width: 16px; height: 16px; flex-shrink: 0; }
