/* Juventudes pela Água — visual referência (dark gamificado + verde) */

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
.aviso-de-formulario {
    position: sticky; top: 0; z-index: 1200;
    padding: 12px 16px;
    background: var(--orange); color: #0A0A0C;
    font-weight: 700; font-size: .9rem; text-align: center;
}

:root {
    --lime: #C6FF00;
    --lime-dim: #9ACC00;
    --purple: #9B7BFF;
    --purple-soft: #B8A0FF;
    --purple-deep: #6C4DFF;
    --orange: #FF8C42;
    --pink: #FF6B9D;
    --lavanda: #C4B5FD;

    --bg: #0A0A0C;
    --surface: #16161A;
    --surface-2: #1E1E24;
    --line: #2A2A32;

    --campo-fundo: #34343F;
    --campo-borda: #B0B0BA;
    --campo-borda-destaque: #D1D5DB;
    --campo-placeholder: #BDBDC6;

    --white: #FFFFFF;
    --muted: #9CA3AF;
    --soft: #D1D5DB;

    --r: 28px;
    --r-sm: 18px;
    --pill: 999px;
    --shadow: 0 12px 40px rgba(0,0,0,.45);
    --t: .22s ease;

    /* aliases (páginas antigas) */
    --verde: var(--lime);
    --cor-primaria: var(--lime);
    --cor-acento: var(--orange);
    --cor-texto-claro: var(--soft);
    --texto-muted: var(--muted);
}

body {
    font-family: 'Nunito', system-ui, sans-serif;
    background: var(--bg);
    color: var(--white);
    font-size: 16px;
    line-height: 1.45;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--lime); text-decoration: none; }
h1,h2,h3,h4 { font-weight: 800; color: var(--white); margin-bottom: 12px; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
p { margin-bottom: 12px; }

.container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 18px;
}
@media (min-width: 768px) { .container { max-width: 520px; } }

.content { padding: 18px 0 110px; }
body.com-bottom-nav .content { padding-bottom: 110px; }

/* Header minimal — greeting lives in content like the ref */
.header {
    padding: 14px 0 0;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--lime);
    font-size: 1rem;
}
.logo-icon { font-size: 1.4rem; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 700; font-size: .9rem; }
.user-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 2px solid var(--lime);
    object-fit: cover;
    background: var(--surface-2);
}

/* Menu do usuário (avatar no cabeçalho) */
.menu-usuario { position: relative; }
.menu-usuario-gatilho {
    background: none;
    border: none;
    padding: 2px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    border-radius: var(--pill);
}
.menu-usuario-gatilho:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.menu-usuario-gatilho img.user-avatar { display: block; }
.user-avatar-iniciais {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .85rem;
    color: #0A0A0C;
    background: var(--lime);
}
.menu-usuario-painel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 230px;
    padding: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow);
    z-index: 1100;
}
.menu-usuario-painel.aberto { display: block; }
.menu-usuario-info {
    padding: 10px 12px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.menu-usuario-nome { font-weight: 800; }
.menu-usuario-detalhe { font-size: .78rem; color: var(--muted); }
.menu-usuario-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: none;
    color: var(--white);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.menu-usuario-item:hover { background: rgba(255,255,255,.06); color: var(--white); }
.menu-usuario-item svg { width: 18px; height: 18px; }
.menu-usuario-item.sair { color: var(--pink); }
.menu-usuario-item.sair:hover { color: var(--pink); }

/* Buttons — pills like reference */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    border-radius: var(--pill);
    font-family: inherit;
    font-weight: 800;
    font-size: .95rem;
    cursor: pointer;
    transition: var(--t);
    min-height: 48px;
}
.btn:active { transform: scale(.97); }

.btn-primario { background: var(--lime); color: #0A0A0C; }
.btn-primario:hover { background: var(--lime-dim); color: #0A0A0C; }

.btn-secundario { background: var(--purple); color: #fff; }
.btn-acento { background: var(--orange); color: #fff; }

.btn-soft {
    background: rgba(155, 123, 255, .35);
    color: var(--white);
    border: none;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--lime);
    color: var(--lime);
}
.btn-ghost {
    background: var(--surface-2);
    color: var(--white);
    border: 1px solid var(--line);
}
.btn-pequeno { padding: 8px 14px; font-size: .8rem; min-height: 36px; }
.btn-grande { width: 100%; padding: 16px; font-size: 1rem; }

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--r);
    padding: 20px;
    margin-bottom: 14px;
    border: none;
}
.card-lime {
    background: var(--lime);
    color: #0A0A0C;
    border-radius: var(--r);
}
.card-lime h1, .card-lime h2, .card-lime h3,
.card-lime p, .card-lime .text-claro { color: #0A0A0C; }

.card-orange { background: var(--orange); color: #fff; border-radius: var(--r); }
.card-purple { background: var(--purple); color: #fff; border-radius: var(--r); }
.card-lavanda { background: var(--lavanda); color: #1a1028; border-radius: var(--r); }

/* Hero home — like "Hi John!" + big balance */
.hero-home {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
    margin-bottom: 8px;
}
.hero-saudacao {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}
.hero-sub {
    color: var(--muted);
    font-size: .9rem;
    margin: 4px 0 0;
}
.hero-mascote {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 8px 16px rgba(155,123,255,.4));
    animation: floaty 3s ease-in-out infinite;
}
@keyframes floaty {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.saldo-pontos {
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    margin: 8px 0 18px;
    color: var(--white);
}
.saldo-pontos small {
    font-size: 1.1rem;
    color: var(--lime);
    font-weight: 800;
    margin-left: 4px;
}

.acoes-rapidas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.acoes-rapidas .btn { width: 100%; }

/* Bento / impact cards */
.bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.bento-wide { grid-column: 1 / -1; }

.bento-card {
    border-radius: var(--r);
    padding: 18px;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.bento-card .emoji {
    font-size: 1.8rem;
    position: absolute;
    right: 12px;
    top: 12px;
}
.bento-card .label {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    opacity: .75;
}
.bento-card .valor {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
}
.bento-card .hint {
    font-size: .8rem;
    font-weight: 700;
    opacity: .85;
    margin-top: 6px;
}

/* Progress */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,.2);
    border-radius: var(--pill);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--white);
    border-radius: var(--pill);
    transition: width .5s ease;
}
.progress-on-dark .progress-bar-container { background: rgba(255,255,255,.2); }
.progress-on-dark .progress-bar { background: var(--lime); }

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: .8rem;
    color: var(--muted);
    font-weight: 700;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-weight: 800;
    font-size: .92rem;
    color: var(--white);
    margin-bottom: 8px;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    border: 2px solid var(--campo-borda);
    background: var(--campo-fundo);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    color-scheme: dark;
    transition: border-color var(--t), box-shadow var(--t);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--campo-placeholder); opacity: 1; }
.form-input:-webkit-autofill {
    -webkit-text-fill-color: var(--white);
    -webkit-box-shadow: 0 0 0 1000px var(--campo-fundo) inset;
}
.form-input:hover, .form-textarea:hover, .form-select:hover { border-color: var(--campo-borda-destaque); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(198,255,0,.35);
}
.form-input.input-validation-error, .form-textarea.input-validation-error, .form-select.input-validation-error {
    border-color: var(--pink);
}
.form-input.input-validation-error:focus, .form-textarea.input-validation-error:focus, .form-select.input-validation-error:focus {
    box-shadow: 0 0 0 3px rgba(255,107,157,.35);
}
.form-textarea { min-height: 110px; resize: vertical; }
.campo-senha { position: relative; }
.campo-senha .form-input { padding-right: 56px; }
.campo-senha-alternar {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: 12px; background: transparent;
    color: var(--soft); cursor: pointer;
}
.campo-senha-alternar:hover, .campo-senha-alternar[aria-pressed="true"] { color: var(--lime); }
.campo-senha-alternar:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.campo-senha-alternar .icone { width: 22px; height: 22px; }

/* Status pills */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--pill);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}
.status-disponivel { background: rgba(198,255,0,.2); color: var(--lime); }
.status-em-andamento { background: rgba(255,140,66,.25); color: var(--orange); }
.status-concluida { background: rgba(155,123,255,.25); color: var(--purple-soft); }
.status-bloqueada { background: var(--surface-2); color: var(--muted); }

/* Alerts */
.alert {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: .9rem;
    margin-bottom: 12px;
}
.alert-sucesso { background: rgba(198,255,0,.12); color: var(--lime); }
.alert-info { background: rgba(155,123,255,.15); color: var(--purple-soft); }
.alert-alerta { background: rgba(255,140,66,.15); color: var(--orange); }
.alert-erro { background: rgba(255,107,157,.15); color: var(--pink); }

/* Bottom nav — flutuante (pill + CTA central) */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 380px;
    height: 64px;
    background: rgba(22, 22, 28, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pill);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.bottom-nav-grupo {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}
.bottom-nav-item {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8a8a96;
    border-radius: 50%;
    transition: var(--t);
    flex-shrink: 0;
}
.bottom-nav-item:hover { color: var(--white); }
.bottom-nav-item.ativo {
    color: #0A0A0C;
    background: rgba(198, 255, 0, 0.9);
}
.bottom-nav-item svg,
.bottom-nav-cta svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.25;
}
.bottom-nav-cta {
    width: 58px;
    height: 58px;
    margin-top: -30px;
    border-radius: 50%;
    background: var(--lime);
    color: #0A0A0C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 10px 28px rgba(198, 255, 0, 0.35);
    border: 4px solid var(--bg);
    text-decoration: none;
    transition: var(--t);
}
.bottom-nav-cta:hover {
    background: var(--lime-dim);
    color: #0A0A0C;
    transform: scale(1.04);
}
.bottom-nav-cta.ativo {
    box-shadow: 0 0 0 3px rgba(198, 255, 0, 0.35), 0 10px 28px rgba(198, 255, 0, 0.35);
}
.bottom-nav-icon { display: none; }
.bottom-nav-label { display: none; }

/* Badges / avatars */
.badge-icon { font-size: 2.2rem; }
.badge-icon.bloqueado { filter: grayscale(1) opacity(.35); }
.badge-card {
    text-align: center;
    padding: 14px 8px;
    background: var(--surface-2);
    border-radius: var(--r-sm);
}
.badge-card.bloqueado { opacity: .45; }
.badge-nome { font-weight: 800; font-size: .78rem; margin: 6px 0 2px; }
.badge-descricao { font-size: .68rem; color: var(--muted); }
.badge-data { font-size: .68rem; color: var(--lime); font-weight: 700; margin-top: 4px; }

.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Tooltip admin */
.tooltip-wrap { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.btn-info {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid var(--muted); background: transparent;
    color: var(--muted); font-size: .75rem; font-weight: 800;
    cursor: pointer; font-family: inherit;
}
.btn-info.ativo, .btn-info:hover { border-color: var(--lime); color: var(--lime); }
.tooltip-balao {
    display: none; position: absolute; bottom: calc(100% + 10px); left: 50%;
    transform: translateX(-50%); width: 220px;
    background: var(--surface-2); border: 1px solid var(--lime);
    padding: 12px; border-radius: var(--r-sm); font-size: .8rem; font-weight: 600;
    z-index: 40; box-shadow: var(--shadow);
}
.tooltip-balao.aberto { display: block; }

/* Utils */
.text-center { text-align: center; }
.text-claro { color: var(--soft); }
.text-muted { color: var(--muted); }
.text-verde { color: var(--lime); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 14px; }
.mb-lg { margin-bottom: 22px; }
.mb-xl { margin-bottom: 32px; }
.mt-md { margin-top: 14px; }
.mt-lg { margin-top: 22px; }
.fw-bold { font-weight: 800; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: block; } }

.fade-in { animation: fadeIn .4s ease; }
.slide-up { animation: slideUp .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Ilustração de jovens (Humaaans) sobre formas coloridas */
.ilustracao-jovens {
    position: relative;
    isolation: isolate;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: clamp(160px, 44vw, 230px);
}
.ilustracao-jovens::before,
.ilustracao-jovens::after {
    content: '';
    position: absolute;
    z-index: -1;
}
.ilustracao-jovens::before {
    left: 8%;
    right: 8%;
    bottom: 0;
    height: 72%;
    background: var(--lime);
    border-radius: 46% 54% 38% 62% / 62% 58% 42% 38%;
}
.ilustracao-jovens::after {
    width: 34%;
    aspect-ratio: 1;
    right: 2%;
    top: 4%;
    background: var(--lavanda);
    border-radius: 50%;
    opacity: .85;
}
.ilustracao-jovens img {
    height: 100%;
    width: auto;
    margin: 0 -8.5%;
}
.ilustracao-jovens--pequena { height: 130px; margin-bottom: 18px; }
.ilustracao-jovens--pequena img { margin: 0 -14px; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(198,255,0,.12), transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(155,123,255,.15), transparent 45%),
        var(--bg);
}
.login-container {
    background: var(--surface);
    border-radius: var(--r);
    padding: 36px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}
.demo-users {
    margin-top: 18px;
    padding: 14px;
    background: var(--surface-2);
    border-radius: var(--r-sm);
    font-size: .85rem;
}
.demo-users-title { font-weight: 800; color: var(--lime); margin-bottom: 8px; }
.demo-user-item { padding: 8px; border-radius: 10px; cursor: pointer; color: var(--soft); }
.demo-user-item:hover { background: rgba(198,255,0,.1); color: var(--white); }

.resumo-erros,
.erro-campo {
    color: var(--pink);
    font-size: .82rem;
    font-weight: 700;
}
.resumo-erros ul { list-style: none; margin-bottom: 12px; }
.erro-campo { display: block; margin-top: 6px; }
.validation-summary-valid { display: none; }

.checkbox-linha {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--soft);
    font-size: .9rem;
    cursor: pointer;
}
.checkbox-linha input { width: 18px; height: 18px; accent-color: var(--lime); }

.icone {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
