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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #010727;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.form-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: #F4F4F4;
    color: #333;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.header-logo {
    height: 60px;
    width: auto;
    vertical-align: middle;
}

.progress-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F4F4F4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    color: #666;
}

.progress-step.active .step-number {
    background: #DD1828;
    color: white;
}

.progress-step.completed .step-number {
    background: #4CAF50;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    text-align: center;
}

.form-container {
    padding: 40px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-step h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 400;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.form-step h2 i {
    margin-right: 10px;
    color: #010727;
}

.form-step h3 {
    color: #555;
    margin: 30px 0 20px 0;
    font-size: 1.3rem;
    font-weight: 400;
}

.form-step h3 i {
    margin-right: 8px;
    color: #010727;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    min-height: 20px;
}

.document-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    min-height: 20px;
}

.document-status.checking {
    color: #2196F3;
}

.document-status.exists {
    color: #f44336;
}

.document-status.available {
    color: #4CAF50;
}

.document-status.error {
    color: #ff9800;
}

.document-status i {
    font-size: 0.8rem;
}

/* Estilos para a segunda etapa - Termos de Compra */
.terms-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.terms-content h3 {
    color: #495057;
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

/* Estilos para checkbox personalizado */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.5;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    color: #495057;
    font-weight: 500;
}

.checkbox-label strong {
    color: #667eea;
}

.checkbox-container.error .checkmark {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.checkbox-container.error .checkbox-label {
    color: #e74c3c;
}

/* Estilos para a terceira etapa - Pagamento e Resumo */
.summary-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.summary-container h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.summary-container h3 i {
    margin-right: 10px;
    color: #010727;
}

.product-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.product-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    flex-shrink: 0;
    padding: 10px;
}

.product-logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.product-info {
    flex: 1;
}

.product-title {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-description {
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

.summary-details {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-weight: 600;
    font-size: 1.1rem;
    color: #495057;
    border-top: 2px solid #e9ecef;
    margin-top: 10px;
    padding-top: 15px;
}

.summary-item .label {
    color: #6c757d;
    font-weight: 500;
}

.summary-item .value {
    color: #495057;
    font-weight: 500;
}

.summary-item.total .value {
    color: #667eea;
    font-size: 1.2rem;
}

.asaas-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 8px;
    color: #2e7d32;
    font-weight: 500;
}

.asaas-info i {
    color: #4caf50;
}

.payment-section {
    margin-top: 30px;
}

.payment-section h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.payment-section h3 i {
    margin-right: 10px;
    color: #010727;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.payment-method-option {
    cursor: pointer;
}

.payment-method-option input[type="radio"] {
    display: none;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
}

.payment-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.payment-method-option input[type="radio"]:checked + .payment-option {
    border-color: #667eea;
    background: #f0f4ff;
    color: #667eea;
}

.payment-option i {
    font-size: 1.5rem;
    color: #010727;
}

/* Seção de Termos e Condições */
.terms-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #DD1828;
}

.terms-text {
    font-size: 10px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    text-align: justify;
}

.terms-text strong {
    color: #DD1828;
    font-weight: 400;
}


@media (max-width: 768px) {
    .product-summary {
        flex-direction: column;
        text-align: center;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .card-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .terms-section {
        margin-top: 20px;
        padding: 15px;
    }
    
    .terms-text {
        font-size: 0.85rem;
        text-align: left;
    }
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 40px 0 40px;
    padding: 30px 0;
    border-top: 2px solid #f0f0f0;
}

/* Botão da etapa 1 alinhado à esquerda */
#nextBtn1 {
    margin-right: auto;
}

.step-button {
    display: none;
}

.step-button[style*="flex"] {
    display: flex !important;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: #DD1828;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(221, 24, 40, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

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

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    background: #ccc !important;
    color: #666 !important;
}

.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header-logo {
        height: 50px;
    }
    
    .progress-bar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 25px;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header-logo {
        height: 40px;
    }
    
    .progress-step {
        min-width: 60px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Modal de Assinatura Ativa */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon i {
    font-size: 40px;
    color: #010727;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #666;
    transform: scale(1.1);
}

.modal-close:focus {
    outline: 2px solid #010727;
    outline-offset: 2px;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp i {
    font-size: 1.3rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsivo para modal */
@media (max-width: 600px) {
    .modal-content {
        padding: 30px 20px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    .btn-whatsapp {
        padding: 12px 25px;
        font-size: 1rem;
    }
}
