/* ==========================================================================
   ZIP LIFESTYLE — DESIGN SYSTEM & REDESIGN PARA CADASTRO PREMIUM (CADFREE)
   ========================================================================== */

:root {
    /* Paleta de Cores (Copiadas da nova Landing Page) */
    --bg-base: #ffffff;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.75);
    
    --text-primary: #0d0d0d;      /* Preto Suave / Ink */
    --text-secondary: #6b7280;    /* Cinza Muted */
    --text-muted-lt: #9ca3af;     /* Cinza Claro */
    
    --brand-green: #8fd600;       /* Verde Limão vívido — BG de botão com texto escuro */
    --brand-green-dark: #5a9400;  /* Verde hover (WCAG AA no branco) */
    --brand-ink: #0d0d0d;
    --brand-ink-soft: #1c1c1c;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);
    --border-focus: var(--brand-green-dark);
    
    /* Cantos Arredondados — alinhados ao design system */
    --r-xl: 28px;
    --r-lg: 20px;
    --r-md: 12px;
    --r-full: 99px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.10);
    
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================= RESET E BASES ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100dvh;
    overscroll-behavior: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Gradientes Radiais Suaves de Luz no Fundo */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(163, 255, 18, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(110, 200, 0, 0.03) 0%, transparent 40%);
}

/* Padrão Dotted Grid do Fundo (Estilo Landing Page) */
.bg-pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.25;
    background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 90%);
    pointer-events: none;
}

h1, h2, h3, .brand-logo, .btn-primary {
    touch-action: manipulation;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

/* ================= ESTRUTURA DO CONTAINER PRINCIPAL ================= */
.page-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 2;
    animation: containerFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo da Marca (Design idêntico ao da Navbar da LP) */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 900;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.brand-logo .logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--brand-ink);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 900;
    color: var(--brand-green);
    letter-spacing: 0;
}

/* CARD PRINCIPAL (AUTENTICAÇÃO) */
.auth-wrapper {
    width: 100%;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--r-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
}

.auth-wrapper:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

/* ================= HEADER DO CARD ================= */
.auth-header {
    text-align: center;
    padding: 40px 32px 16px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Pequeno Badge de Raio (Zip Icon) */
.badge-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f6f6f6;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.auth-wrapper:hover .badge-icon-wrapper {
    background: var(--brand-ink);
    color: var(--brand-green);
    border-color: var(--brand-ink);
    transform: scale(1.05) rotate(5deg);
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 90%;
}

/* ================= FLUXO E TRANSICÕES DE PASSOS ================= */
.step-container {
    position: relative;
    min-height: 380px;
    overflow: hidden;
}

.step {
    width: 100%;
    padding: 16px 32px 40px 32px;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.step.inactive-left {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.step.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.step.inactive-right {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

/* ================= FORMULÁRIO E INPUTS ================= */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05rem;
    color: var(--text-muted-lt);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--r-md);
    font-size: 0.95rem;
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.form-control::placeholder {
    color: var(--text-muted-lt);
    font-weight: 400;
}

/* Efeito Premium de Foco */
.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(13, 13, 13, 0.05);
}

/* Ativa cor do ícone no foco do input */
.input-with-icon:focus-within i {
    color: var(--text-primary);
}

/* ================= BOTÕES ================= */
/* Estilo Botão Verde Neon (IDÊNTICO AO PRINCIPAL DA LP) */
.btn-primary {
    touch-action: manipulation;
    background: var(--brand-green);
    color: var(--brand-ink);
    border: none;
    padding: 16px 24px;
    border-radius: var(--r-md);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(90, 148, 0, 0.18);
}

.btn-primary:hover {
    touch-action: manipulation;
    cursor: pointer;
    background: var(--brand-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90, 148, 0, 0.28);
}

.btn-primary:disabled {
    touch-action: manipulation;
    cursor: pointer;
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary i {
    touch-action: manipulation;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary:hover i {
    touch-action: manipulation;
    cursor: pointer;
    transform: translateX(3px);
}

/* Botão WhatsApp */
.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: var(--r-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.btn-whatsapp:hover {
    touch-action: manipulation;
    cursor: pointer;
    background: #1ebc5a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

/* ================= STEP 2: TELA DE SUCESSO ================= */
#step2 {
    text-align: center;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Círculo do Ícone de Sucesso */
.success-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10B981;
    font-size: 2.2rem;
    margin-bottom: 24px;
    animation: successScale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes successScale {
    from {
        transform: scale(0.6);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Card do WhatsApp Gate Refinada (Vidro Suave) */
.whatsapp-gate-card {
    background: #f6f6f6;
    border: 1px solid var(--border-color);
    border-radius: var(--r-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 28px;
    width: 100%;
    transition: var(--transition-smooth);
}

.whatsapp-gate-card:hover {
    border-color: rgba(37, 211, 102, 0.3);
    background: rgba(37, 211, 102, 0.01);
}

.whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 211, 102, 0.08);
    color: #1ebc5a;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    border: 1px solid rgba(37, 211, 102, 0.15);
}

.whatsapp-gate-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.whatsapp-gate-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-access {
    padding: 16px 32px;
}

/* ================= TOAST SYSTEM (Elegante e Moderno) ================= */
#toastContainer {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100% - 48px);
}

.toast {
    background: #ffffff;
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.02);
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.error i {
    color: var(--danger);
}

.toast.success {
    border-left: 4px solid #10B981;
}

.toast.success i {
    color: #10B981;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================= RESPONSIVO / ADAPTAÇÕES MOBILE ================= */
@media (max-width: 600px) {
    body {
        padding: 16px;
        align-items: center;
    }
    
    .page-container {
        gap: 24px;
    }
    
    .auth-wrapper {
        border-radius: var(--r-xl);
    }
    
    .auth-header {
        padding: 32px 24px 12px 24px;
    }
    
    .step {
        padding: 16px 24px 32px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    #toastContainer {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}