/* ============================================
   PoposLeague - Tema Copa do Mundo
   Estilos globais compartilhados
============================================ */

/* ---------- VARIÁVEIS ---------- */
:root {
    --verde-copa: #009c3b;
    --verde-claro: #07b84a;
    --azul-copa: #002776;
    --amarelo-copa: #ffdf00;
    --cinza-fundo: #f8fafc;
    --cinza-texto: #64748b;
    --sombra-padrao: 0 8px 25px rgba(0, 0, 0, 0.07);
}

/* ---------- RESET E BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* ---------- FUNDO DE AUTENTICAÇÃO (gradiente verde/azul) ---------- */
body.auth-bg {
    background: linear-gradient(135deg, var(--verde-copa) 0%, var(--azul-copa) 100%);
    min-height: 100vh;
    position: relative;
}

body.auth-bg::before {
    content: "🏆 ⚽ 🌟 🏅";
    position: absolute;
    font-size: 150px;
    opacity: 0.06;
    bottom: 0;
    right: 0;
    white-space: nowrap;
    pointer-events: none;
    width: 100%;
    text-align: right;
}

/* ---------- LAYOUT DE AUTENTICAÇÃO (cards lado a lado) ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 12px;
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--verde-copa);
    letter-spacing: -0.5px;
}

.auth-mobile-brand span {
    color: var(--azul-copa);
}

.auth-card {
    background: white;
    border-radius: 32px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Lado esquerdo (verde gradiente) */
.auth-left {
    background: linear-gradient(135deg, var(--verde-copa), var(--verde-claro));
    padding: 48px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: "⚽";
    position: absolute;
    font-size: 200px;
    opacity: 0.1;
    bottom: -50px;
    left: -50px;
    pointer-events: none;
}

.auth-left::after {
    content: "🏆";
    position: absolute;
    font-size: 150px;
    opacity: 0.1;
    top: -50px;
    right: -50px;
    pointer-events: none;
}

.brand {
    color: white;
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.brand span {
    color: var(--amarelo-copa);
    text-shadow: 0 0 10px rgba(255, 223, 0, 0.5);
}

.subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.hero-img {
    width: 100%;
    max-width: 280px;
    margin-top: 20px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* Lado direito (formulários) */
.auth-right {
    flex: 1;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.form-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--verde-copa);
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 16px;
    color: var(--cinza-texto);
    margin-bottom: 32px;
}

/* ---------- COMPONENTES DE FORMULÁRIO ---------- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.form-label i {
    color: var(--verde-copa);
    margin-right: 6px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: var(--cinza-fundo);
}

.form-control:focus {
    outline: none;
    border-color: var(--verde-copa);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 156, 59, 0.1);
}

.input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--verde-copa);
}

.btn-brand {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--verde-copa), var(--verde-claro));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin: 8px 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 156, 59, 0.3);
}

.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
}

.links a {
    color: var(--verde-copa);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.links a:hover {
    color: var(--azul-copa);
    text-decoration: underline;
}

/* Termos de uso */
.terms {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--cinza-texto);
}

.terms input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--verde-copa);
}

.terms a {
    color: var(--verde-copa);
    text-decoration: none;
    font-weight: 600;
}

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

/* Mensagens toast */
.toast-msg {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.toast-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

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

.footer-home {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    color: #94a3b8;
    font-size: 12px;
    border-top: 1px solid #e2e8f0;
}

.footer-home strong {
    color: var(--verde-copa);
}

/* Dica de segurança (esqueci senha) */
.security-tip {
    background: var(--cinza-fundo);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--amarelo-copa);
}

.security-tip i {
    color: var(--verde-copa);
    font-size: 20px;
}

.security-tip span {
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

/* ---------- RESPONSIVIDADE PARA TELAS DE AUTENTICAÇÃO ---------- */
@media (max-width: 768px) {
    body.auth-bg {
        min-height: 100vh;
        height: auto;
    }

    .auth-wrapper {
        padding: 16px;
        align-items: center;
    }

    .auth-card {
        flex-direction: column;
        border-radius: 20px;
    }

    /* Esconde o painel decorativo no mobile */
    .auth-left {
        display: none;
    }

    /* Exibe a marca compacta no topo do formulário */
    .auth-mobile-brand {
        display: block;
    }

    .auth-right {
        padding: 28px 24px 20px;
    }

    .form-title {
        font-size: 22px;
        text-align: center;
        margin-bottom: 4px;
    }

    .form-subtitle {
        font-size: 13px;
        text-align: center;
        margin-bottom: 18px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-control {
        padding: 11px 14px;
        font-size: 16px;
    }

    .btn-brand {
        padding: 12px;
        font-size: 15px;
        margin: 4px 0 14px;
    }

    .links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-bottom: 16px;
    }

    .security-tip span {
        font-size: 12px;
    }

    .footer-home {
        font-size: 10px;
        margin-top: 10px;
        padding-top: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .auth-left {
        padding: 32px;
    }

    .auth-right {
        padding: 32px;
    }

    .brand {
        font-size: 36px;
    }

    .hero-img {
        max-width: 220px;
    }

    .form-title {
        font-size: 28px;
    }
}

/* ============================================
   ESTILOS EXCLUSIVOS DA HOME (DASHBOARD)
============================================ */
.dashboard {
    background: #f6f8fb;
    min-height: 100vh;
}

.topbar {
    background: linear-gradient(90deg, var(--azul-copa), var(--verde-copa));
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: visible;
}

.topbar::before {
    content: "🏆 ⚽ 🌟";
    position: absolute;
    font-size: 80px;
    opacity: 0.05;
    right: -20px;
    top: -20px;
    white-space: nowrap;
    pointer-events: none;
}

.brand-top {
    color: white;
    font-size: 28px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.brand-top span {
    color: var(--amarelo-copa);
    text-shadow: 0 0 10px rgba(255, 223, 0, 0.5);
}

.top-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.icon-btn {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 18px;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.dropdown-menu {
    z-index: 2000;
}

.logout-btn {
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    background: #dc2626;
    color: white;
    font-weight: 700;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

.content {
    width: 1200px;
    max-width: 95%;
    margin: 35px auto;
}

.balance-card {
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--azul-copa), #0138a6);
    color: white;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0, 39, 118, 0.18);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: "⚽";
    position: absolute;
    font-size: 120px;
    opacity: 0.08;
    bottom: -30px;
    right: -20px;
    pointer-events: none;
}

.balance-label {
    opacity: 0.85;
    margin-bottom: 10px;
    font-size: 16px;
    letter-spacing: 1px;
}

.balance-value {
    font-size: 42px;
    font-weight: 900;
    color: var(--amarelo-copa);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    border: none;
    border-radius: 22px;
    padding: 28px;
    text-align: center;
    box-shadow: var(--sombra-padrao);
    transition: 0.25s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 223, 0, 0.1), transparent);
    transition: left 0.5s;
}

.action-card:hover::before {
    left: 100%;
}

.action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.action-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: auto;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    background: linear-gradient(135deg, var(--verde-copa), var(--verde-claro));
    transition: transform 0.3s;
}

.action-card:hover .action-icon {
    transform: scale(1.08);
}

.action-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: white;
    border-radius: 22px;
    padding: 25px;
    box-shadow: var(--sombra-padrao);
    transition: all 0.3s;
    border-left: 4px solid var(--verde-copa);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.info-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--azul-copa);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-title i {
    color: var(--amarelo-copa);
    font-size: 20px;
}

.info-text {
    color: var(--cinza-texto);
    line-height: 1.5;
}

/* Responsividade da HOME */
@media (max-width: 768px) {
    .topbar {
        padding: 12px 16px;
    }

    .brand-top {
        font-size: 20px;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .logout-btn {
        padding: 6px 14px;
        font-size: 13px;
    }

    .content {
        margin: 16px auto;
    }

    .balance-card {
        padding: 20px;
    }

    .balance-value {
        font-size: 28px;
    }

    .action-grid,
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .action-card {
        padding: 18px;
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }

    .action-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin: 0;
    }

    .action-title {
        font-size: 16px;
        margin: 0;
    }

    .info-card {
        padding: 18px;
    }

    .info-title {
        font-size: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .action-grid,
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar {
        padding: 20px 30px;
    }
}

@media (min-width: 1025px) {
    .action-grid,
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}