/* =========================================================
   SUPER TAÇA — Stylesheet
   ========================================================= */

:root {
    --navy:    #0a1628;
    --navy2:   #1a2d4f;
    --navy3:   #243a63;
    --gold:    #f0a500;
    --gold2:   #ffc840;
    --green:   #1ec56a;
    --green2:  #17a85a;
    --red:     #e53e3e;
    --white:   #ffffff;
    --gray:    #94a3b8;
    --gray2:   #64748b;
    --border:  rgba(255,255,255,.08);
    --card-bg: rgba(255,255,255,.04);
    --radius:  12px;
    --shadow:  0 8px 32px rgba(0,0,0,.4);
    --font:    'Montserrat', sans-serif;
    --font2:   'Oswald', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(240,165,0,.15) 0%, transparent 70%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, var(--navy2), var(--navy));
    border-bottom: 2px solid var(--gold);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
    overflow: hidden;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 88px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* Logo no header */
.header-logo {
    display: flex;
    align-items: center;
    gap: .85rem;
    text-decoration: none;
}

.header-logo-img-wrap {
    display: flex;
    align-items: center;
}

.header-logo-img {
    height: 64px;
    width: auto;
    max-width: 320px;
    display: block;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.header-logo-text { display: flex; flex-direction: column; }

.title-sub {
    display: block;
    font-size: .72rem;
    letter-spacing: .1em;
    color: var(--gray);
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.header-vagas-txt {
    font-size: .78rem;
    color: var(--gray);
    background: rgba(255,255,255,.05);
    padding: .35rem .85rem;
    border-radius: 99px;
    border: 1px solid var(--border);
}

.btn-admin-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-family: inherit;
    font-weight: 800;
    color: #0d1b2e;
    background: #f0a500;
    border: none;
    outline: none;
    padding: .5rem 1.2rem;
    border-radius: 99px;
    text-decoration: none;
    letter-spacing: .1em;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(240,165,0,.4);
    cursor: pointer;
    transition: filter .2s, box-shadow .2s;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}
.btn-admin-link:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 18px rgba(240,165,0,.6);
}

/* Hero da logo no topo do formulário */
.form-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem 1rem 1.5rem;
}

.form-hero-logo {
    height: 160px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 32px rgba(240,165,0,.25));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.form-hero-tagline {
    margin-top: 1rem;
    font-size: .9rem;
    color: var(--gray);
    letter-spacing: .04em;
}

/* Logo no rodapé */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: .5rem; }

.footer-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    opacity: .55;
    filter: drop-shadow(0 2px 6px rgba(240,165,0,.15));
}

/* Logo na página de sucesso */
.sucesso-logo-principal {
    height: 160px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 6px 24px rgba(240,165,0,.3));
    animation: float 4s ease-in-out infinite;
}

/* ── Main ────────────────────────────────────────────────── */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ── Section title ───────────────────────────────────────── */
.section-title {
    font-family: var(--font2);
    font-size: 1.35rem;
    letter-spacing: .08em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}

/* ── Vagas cards ─────────────────────────────────────────── */
.vagas-section { margin-bottom: 2.5rem; }

.vagas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.vaga-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform .2s;
}
.vaga-card:hover { transform: translateY(-2px); }

.vaga-card.livre { border-color: rgba(30,197,106,.3); }
.vaga-card.esgotada { opacity: .6; }
.vaga-card.esgotada::after {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(229,62,62,.06) 6px, rgba(229,62,62,.06) 12px);
}

.vaga-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gray);
    margin-bottom: .5rem;
}

.vaga-contador {
    display: flex;
    align-items: baseline;
    gap: .25rem;
    margin-bottom: .25rem;
}

.vaga-num {
    font-family: var(--font2);
    font-size: 2.2rem;
    color: var(--gold);
    line-height: 1;
}

.vaga-total {
    font-size: .9rem;
    color: var(--gray);
}

.vaga-status {
    font-size: .72rem;
    color: var(--gray);
    margin-bottom: .6rem;
}

.esgotada .vaga-status { color: var(--red); font-weight: 700; }

.vaga-bar {
    height: 4px;
    background: rgba(255,255,255,.1);
    border-radius: 99px;
    overflow: hidden;
}

.vaga-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold2));
    border-radius: 99px;
    transition: width .6s ease;
}

.esgotada .vaga-bar-fill { background: var(--red); }

/* ── Form cards ──────────────────────────────────────────── */
.form-section { margin-bottom: 2rem; }

.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

.card-title {
    font-family: var(--font2);
    font-size: 1.1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.step-num {
    background: var(--gold);
    color: var(--navy);
    font-size: .85rem;
    font-weight: 900;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.atletaCont {
    font-size: .75rem;
    font-weight: 400;
    color: var(--gray);
    font-family: var(--font);
    text-transform: none;
    letter-spacing: 0;
}

/* ── Form rows & groups ──────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-row:last-child { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: .4rem; }

label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray);
}

label small {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--gray2);
}

.req { color: var(--gold); }

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font);
    font-size: .95rem;
    padding: .7rem 1rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

input:focus, select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(240,165,0,.2);
}

input::placeholder { color: var(--gray2); }

select option {
    background: var(--navy2);
    color: var(--white);
}

select option:disabled { color: var(--gray2); }

.field-hint {
    font-size: .75rem;
    color: var(--gray);
    margin-top: .2rem;
}

.field-error {
    font-size: .75rem;
    color: var(--red);
    margin-top: .2rem;
}

/* ── Logo upload ─────────────────────────────────────────── */
.logo-group { position: relative; }

.logo-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
    overflow: hidden;
}

.logo-upload-area:hover,
.logo-upload-area.drag-over {
    border-color: var(--gold);
    background: rgba(240,165,0,.05);
}

.logo-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    padding: 0;
}

.logo-preview-wrap {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#logoPreview {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--gold);
    background: rgba(255,255,255,.05);
}

#logoPlaceholder { color: var(--gray); }
#logoPlaceholder svg { stroke: var(--gray); margin-bottom: .5rem; }
#logoPlaceholder p { font-size: .9rem; margin-bottom: .25rem; }
#logoPlaceholder span { font-size: .75rem; color: var(--gray2); }

/* ── Atletas ─────────────────────────────────────────────── */
#atletasContainer {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1rem;
}

.atleta-row {
    display: grid;
    grid-template-columns: 36px 1.8fr 1.3fr 160px 36px;
    gap: .65rem;
    align-items: end;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-bottom: .5rem;
}

@media (max-width: 820px) {
    .atleta-row {
        grid-template-columns: 36px 1fr 1fr 36px;
        grid-template-rows: auto auto;
    }
    .atleta-nome { grid-column: 2 / 4; }
    .atleta-cpf  { grid-column: 2 / 3; }
    .atleta-nasc { grid-column: 3 / 4; }
    .btn-remove-atleta { grid-column: 4; grid-row: 1; }
}

@media (max-width: 520px) {
    .atleta-row {
        grid-template-columns: 36px 1fr 36px;
        grid-template-rows: auto auto auto;
    }
    .atleta-nome { grid-column: 2 / 3; }
    .atleta-cpf  { grid-column: 2 / 3; }
    .atleta-nasc { grid-column: 2 / 3; }
    .btn-remove-atleta { grid-column: 3; grid-row: 1; }
}

.atleta-num {
    font-family: var(--font2);
    font-size: 1.1rem;
    color: var(--gold);
    text-align: center;
    padding-bottom: .2rem;
}

.cpf-wrap { position: relative; display: flex; align-items: center; }
.cpf-wrap input { padding-right: 2rem; }
.cpf-status {
    position: absolute;
    right: .6rem;
    font-size: 1rem;
    pointer-events: none;
}

.atletas-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.atleta-count {
    font-size: .8rem;
    color: var(--gray);
}

/* ── Pagamento card ──────────────────────────────────────── */
.pagamento-info {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .pagamento-info { flex-direction: column; }
}

.pagamento-valor {
    background: linear-gradient(135deg, var(--navy3), var(--navy2));
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.25rem 2rem;
    text-align: center;
    min-width: 160px;
    flex-shrink: 0;
}

.label-valor {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--gray);
    margin-bottom: .35rem;
}

.valor {
    display: block;
    font-family: var(--font2);
    font-size: 2rem;
    color: var(--gold);
    line-height: 1;
}

.pagamento-desc p {
    font-size: .88rem;
    color: var(--gray);
    margin-bottom: .5rem;
    line-height: 1.6;
}

.pagamento-desc p:last-child { margin-bottom: 0; }
.pagamento-desc strong { color: var(--white); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--font);
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    padding: .65rem 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: var(--navy);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(240,165,0,.4); }

.btn-secondary {
    background: rgba(255,255,255,.07);
    color: var(--white);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,.12); }

.btn-lg { font-size: 1rem; padding: .9rem 2rem; }

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    font-size: 1rem;
    padding: .9rem 1.75rem;
    white-space: nowrap;
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.4); }

.btn-remove-atleta {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--red);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    padding: 0;
}
.btn-remove-atleta:hover { background: rgba(229,62,62,.15); }

/* ── Submit area ─────────────────────────────────────────── */
.form-submit { text-align: center; margin-top: 2rem; }
.submit-note {
    font-size: .78rem;
    color: var(--gray2);
    margin-top: .75rem;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: .88rem;
    line-height: 1.6;
}

.alert-error {
    background: rgba(229,62,62,.12);
    border: 1px solid rgba(229,62,62,.4);
    color: #fca5a5;
}

.alert-error strong {
    display: block;
    margin-bottom: .5rem;
    color: var(--red);
}

.alert-error ul {
    margin: 0;
    padding-left: 1.25rem;
}

.alert-error li { margin-bottom: .25rem; }

/* ── Sucesso page ─────────────────────────────────────────── */
.sucesso-page { max-width: 760px; margin: 0 auto; }

.sucesso-hero {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.sucesso-hero.confirmed {
    background: linear-gradient(135deg, rgba(30,197,106,.12), rgba(23,168,90,.06));
    border: 1px solid rgba(30,197,106,.3);
}

.sucesso-hero.pending {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
}

.sucesso-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.sucesso-icon.spin { animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sucesso-hero h1 {
    font-family: var(--font2);
    font-size: 1.8rem;
    margin-bottom: .75rem;
    letter-spacing: .05em;
}

.confirmed h1 { color: var(--green); }

.sucesso-hero p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin-top: 1rem;
}

.loading-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold);
    animation: bounce 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); opacity: .5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ── WhatsApp CTA ─────────────────────────────────────────── */
.whatsapp-cta {
    background: linear-gradient(135deg, rgba(37,211,102,.1), rgba(18,140,126,.1));
    border: 2px solid rgba(37,211,102,.4);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 2rem;
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.2); }
    50%  { box-shadow: 0 0 0 10px rgba(37,211,102,0); }
}

.whatsapp-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.whatsapp-icon { font-size: 2.5rem; flex-shrink: 0; }

.whatsapp-text { flex: 1; min-width: 200px; }
.whatsapp-text h2 {
    font-family: var(--font2);
    font-size: 1.2rem;
    color: #25D366;
    margin-bottom: .4rem;
}
.whatsapp-text p { font-size: .88rem; color: var(--gray); }

/* ── Resumo do time ───────────────────────────────────────── */
.resumo-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.resumo-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.resumo-logo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.resumo-header h2 {
    font-family: var(--font2);
    font-size: 1.3rem;
    letter-spacing: .04em;
    margin-bottom: .3rem;
}

.resumo-header p { font-size: .88rem; color: var(--gray); margin-bottom: .5rem; }

.status-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .2rem .7rem;
    border-radius: 99px;
}

.status-badge.confirmado { background: rgba(30,197,106,.2); color: var(--green); border: 1px solid rgba(30,197,106,.4); }
.status-badge.pendente   { background: rgba(240,165,0,.15); color: var(--gold);  border: 1px solid rgba(240,165,0,.3); }

/* ── Atletas list ─────────────────────────────────────────── */
.resumo-atletas { padding: 1.25rem 1.5rem; }
.resumo-atletas h3 {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gray);
    margin-bottom: .75rem;
}

.atletas-list {
    display: grid;
    gap: .4rem;
}

.atleta-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    background: rgba(255,255,255,.03);
    border-radius: 6px;
    font-size: .88rem;
}

.atleta-item .atleta-num {
    font-family: var(--font2);
    color: var(--gold);
    text-align: center;
    font-size: 1rem;
}

.atleta-item .atleta-nome { font-weight: 600; }

.atleta-item .atleta-cpf {
    font-size: .78rem;
    color: var(--gray2);
    font-family: monospace;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: .8rem;
    color: var(--gray2);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ── CPF valid/invalid states ────────────────────────────── */
input.cpf-valid    { border-color: var(--green) !important; }
input.cpf-invalid  { border-color: var(--red)   !important; }
input.cpf-checking { border-color: var(--gold)  !important; }

/* ── Alerta CPF já inscrito ─────────────────────────────── */
.cpf-inscrito-alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-top: .45rem;
    padding: .6rem .85rem;
    background: rgba(229, 62, 62, .1);
    border: 1px solid rgba(229, 62, 62, .45);
    border-left: 3px solid var(--red);
    border-radius: 8px;
    animation: slideIn .2s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cpf-inscrito-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: .05rem;
    color: var(--red);
}

.cpf-inscrito-texto {
    font-size: .78rem;
    line-height: 1.5;
    color: #fca5a5;
}

.cpf-inscrito-texto strong {
    display: block;
    font-size: .8rem;
    color: #fff;
    margin-bottom: .1rem;
}

.cpf-inscrito-texto em {
    font-style: normal;
    color: var(--gold);
    font-weight: 600;
}

/* Spinner de verificação */
.cpf-checking-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(240,165,0,.3);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin-cpf .7s linear infinite;
    vertical-align: middle;
    margin-right: .3rem;
}

@keyframes spin-cpf {
    to { transform: rotate(360deg); }
}
