/* --- Variáveis de Cor (Extraídas e adaptadas da imagem) --- */
:root {
    --bg-app: #0f101a; /* Fundo da página bem escuro */
    --bg-card: rgba(30, 32, 44, 0.95); /* Fundo do card semi-transparente */
    --bg-input: #252836; /* Fundo dos campos */
    --text-primary: #ffffff;
    --text-secondary: #a0a3bd; /* Cor para labels e placeholders */
    --accent-color-start: #02854a; /* Roxo do gradiente */
    --accent-color-end: #00BA67; /* Azul do gradiente */
    --accent-glow: rgba(94, 96, 206, 0.5);
    --border-focus: #05da7a;
}

/* --- Reset Básico --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif; /* Fonte moderna e legível */
    background-color: var(--bg-app);
    /* Adicionando um gradiente sutil no fundo para simular a luz da foto */
    background-image: radial-gradient(circle at 20% 50%, #1a1c2e 0%, var(--bg-app) 70%);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Container Principal e Card --- */
.login-container {
    overflow-y: auto;
    height: 100vh;
    padding: 20px;
    width: 100%;
    max-width: 680px; /* Largura ideal para leitura confortável */
}

/* --- Estilização do Scrollbar Customizado --- */
.login-container {
    max-height: 90vh;
    overflow-y: auto;
    padding-right: 8px; /* Espaço para o scroll não colar no card */
}

/* Largura do Scroll */
.login-container::-webkit-scrollbar {
    width: 6px;
}

/* Fundo do Scroll (Track) */
.login-container::-webkit-scrollbar-track {
    background: var(--bg-app);
    border-radius: 10px;
}

/* Barra de arraste (Thumb) */
.login-container::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-color-start), var(--accent-color-end));
    border-radius: 10px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.login-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color-end);
}

/* --- Estilo da Miniatura de Logo --- */
#logo-preview-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 10px auto;
    border-radius: 12px;
    border: 2px solid var(--accent-color-end);
    overflow: hidden;
    background: var(--bg-app);
    display: none; /* Escondido por padrão */
}

.preview-hidden { display: none; }

#logo-img-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

#remove-logo {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 77, 77, 0.8);
    border: none;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

#remove-logo:hover { background: #ff4d4d; }

.login-card {
    background-color: var(--bg-card);
    padding: 40px 35px;
    border-radius: 16px;
    /* Sombra suave e um brilho sutil na borda para o efeito tech */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.05),
                0 0 20px -10px var(--accent-glow);
    backdrop-filter: blur(10px); /* Efeito de vidro fosco moderno */
}

/* --- Header e Logo (Simulação) --- */
.login-header {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}

.logo-placeholder {
    display: inline-flex;
    align-items: center;
    /* gap: 12px; */
}

.logo-icon {
    font-size: 2rem;
    font-weight: 800;
    /* Gradiente no texto do ícone */
    background: linear-gradient(135deg, var(--accent-color-start), var(--accent-color-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon img{
    height: 80px;
}

.logo-placeholder h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 0.8;
    text-align: left;
    letter-spacing: 1px;
}

.logo-placeholder .subtitle {
    font-size: 1rem;
    color: var(--accent-color-end);
    font-weight: 500;
}

/* --- Abas de Navegação (Tabs) --- */
.tabs-container {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--bg-input);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

/* O estado ativo da aba */
.tab-btn.active {
    color: var(--text-primary);
}

/* A linha inferior indicadora da aba ativa */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color-start), var(--accent-color-end));
    border-radius: 2px 2px 0 0;
}

/* --- Formulários e Inputs --- */
.auth-form {
    display: none; /* Oculta por padrão */
    animation: fadeIn 0.4s ease forwards;
}

.auth-form.active-form {
    display: block; /* Mostra apenas o ativo */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-group input::placeholder {
    color: #5c5f77;
}

/* Usabilidade: Foco claro no input */
.input-group input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(78, 168, 222, 0.2);
    background-color: #2a2d3d;
}

/* --- Botões e Links --- */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    /* O gradiente principal do botão */
    background: linear-gradient(135deg, var(--accent-color-start), var(--accent-color-end));
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    margin-top: 16px;
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--accent-color-end);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--accent-color-start);
    text-decoration: underline;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    margin-right: 10px;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-header-back {
    margin-bottom: 10px;
}

.back-link {
    background: none;
    border: none;
    color: var(--accent-color-end);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

.info-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 20px;
    line-height: 1.4;
}

/* Progress Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}
.step-dot {
    width: 30px;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    transition: 0.3s;
}
.step-dot.active {
    background: var(--accent-color-end);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Step Management */
.step {
    display: none;
    animation: slideIn 0.4s ease-out;
}
.step.active { display: block; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Plans Design */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}
.plan-card {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}
.plan-card.featured {
    border-color: var(--accent-color-end);
    background: rgba(78, 168, 222, 0.1);
}
.btn-plan {
    display: block;
    margin-top: 15px;
    padding: 10px;
    background: var(--bg-input);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: 0.3s;
}
.btn-plan:hover { background: var(--accent-color-end); }

.input-row { display: flex; gap: 10px; }
select, textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: none;
    border-radius: 8px;
    color: white;
    margin-top: 5px;
}

/* Password Strength Meter */
.strength-meter {
    height: 4px;
    width: 100%;
    background-color: var(--bg-app);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Cores da força */
.strength-weak { width: 33%; background-color: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; }
.strength-medium { width: 66%; background-color: #ffd93d; box-shadow: 0 0 10px #ffd93d; }
.strength-strong { width: 100%; background-color: #2ecc71; box-shadow: 0 0 10px #2ecc71; }

/* Custom Color Picker */
.custom-color-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: 8px;
    height: 48px;
    cursor: pointer;
}

#reg-color {
    opacity: 0;
    position: absolute;
    width: 0; height: 0;
}

.color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    background-color: #5e60ce;
    box-shadow: 0 0 10px rgba(94, 96, 206, 0.5);
    transition: transform 0.2s;
}

.custom-color-wrapper:hover .color-circle {
    transform: scale(1.1);
}

#color-hex {
    font-size: 0.85rem;
    font-family: monospace;
    color: var(--text-secondary);
}

/* Módulos Preview */
.modules-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease;
}

.modules-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color-end);
    margin-bottom: 10px;
    font-weight: 700;
}

.modules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.module-tag {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 2px solid var(--accent-color-start);
    color: var(--text-secondary);
}

/* File Input Estilizado */
.file-drop-zone {
    position: relative;
    border: 2px dashed var(--bg-input);
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    transition: 0.3s;
}

.file-drop-zone:hover {
    border-color: var(--accent-color-end);
    background: rgba(78, 168, 222, 0.05);
}

#reg-logo {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Estilização Geral dos Planos */
.plans-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.plan-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    width: 280px;
    backdrop-filter: blur(10px);
}

.plan-card.featured {
    border-color: #00f2ff;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
    transform: scale(1.05);
}

/* O BOTÃO ESTILIZADO */
.btn-pay {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00f2ff 0%, #0072ff 100%);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 242, 255, 0.5);
    filter: brightness(1.1);
}

.btn-pay:active {
    transform: translateY(0);
}

.btn-pay:disabled {
    background: #2c2c2c;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

/* Efeito de brilho interno ao passar o mouse */
.btn-pay::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
}

.btn-pay:hover::after {
    left: 120%;
}

/* Estilo do Preço */
.price {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 15px 0;
}

.price small {
    font-size: 0.9rem;
    color: #a0a3bd;
}

/* --- LAYOUT RESPONSIVO --- */

/* Ajuste para telas menores (Celulares) */
@media (max-width: 768px) {
    .plans-grid {
        flex-direction: column; /* Empilha os cards um em cima do outro */
        align-items: center;
        gap: 30px;
    }

    .plan-card {
        width: 100%; /* Ocupa a largura disponível */
        max-width: 320px; /* Mas não fica gigante */
        padding: 20px;
    }

    .plan-card.featured {
        transform: scale(1.02); /* Reduz o zoom no mobile para não cortar */
        order: -1; /* Coloca o plano Pro no topo no celular (estratégia de vendas) */
    }

    .price {
        font-size: 1.8rem;
    }

    /* Botão maior no mobile para facilitar o toque (Touch Target) */
    .btn-pay {
        padding: 18px 20px; 
        font-size: 1.1rem;
    }
}

/* --- ESTILO DOS BOTÕES E CARDS (BASE) --- */
.plans-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.plan-card {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

/* Efeito Neon no Botão */
.btn-pay {
    width: 100%;
    background: linear-gradient(135deg, #00f2ff 0%, #0072ff 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    transition: 0.3s;
}

/* Animação de Pulso para o Plano Pro (Atrai o olhar) */
@keyframes pulse-neon {
    0% { box-shadow: 0 0 10px rgba(0, 242, 255, 0.4); }
    50% { box-shadow: 0 0 25px rgba(0, 242, 255, 0.7); }
    100% { box-shadow: 0 0 10px rgba(0, 242, 255, 0.4); }
}

.plan-card.featured .btn-pay {
    animation: pulse-neon 2s infinite;
}