:root {
    --altis-primary: #1351ec;
    --altis-secondary: #0f42c7;
    --altis-background: #ffffff;
    --altis-text: #111827;
    --altis-text-light: #6b7280;
    --altis-border: #e5e7eb;
    --altis-error: #ef4444;
    --altis-success: #10b981;
    --altis-gray: #4b5563;
}

.altis-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: var(--altis-background);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
}

.altis-form-container * {
    box-sizing: border-box;
}

.altis-progress-bar {
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.altis-progress-steps {
    display: flex;
    justify-content: space-between;
    min-width: 500px;
}

.altis-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.altis-step span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--altis-border);
    color: var(--altis-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.altis-step small {
    font-size: 10px;
    color: var(--altis-text-light);
    text-align: center;
    max-width: 60px;
}

.altis-step.active span {
    background: var(--altis-primary);
    color: white;
}

.altis-step.completed span {
    background: var(--altis-success);
    color: white;
}

.altis-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: var(--altis-border);
}

.altis-step.completed:not(:last-child)::after {
    background: var(--altis-success);
}

.altis-step-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--altis-text);
    margin: 0 0 8px 0;
}

.altis-step-description {
    color: var(--altis-text-light);
    margin: 0 0 24px 0;
    font-size: 14px;
}

.altis-form-row {
    margin-bottom: 20px;
}

.altis-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.altis-three-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.altis-col-4 {
    max-width: 50%;
}

.altis-form-group {
    display: flex;
    flex-direction: column;
}

.altis-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--altis-text);
    margin-bottom: 6px;
}

.altis-form-group input,
.altis-form-group select {
    padding: 12px 16px;
    border: 1px solid var(--altis-border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--altis-text);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.altis-form-group input:focus,
.altis-form-group select:focus {
    outline: none;
    border-color: var(--altis-primary);
    box-shadow: 0 0 0 3px rgba(25, 199, 124, 0.1);
}

.altis-form-group input::placeholder {
    color: #9ca3af;
}

.altis-form-group input:disabled,
.altis-form-group select:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.altis-input-group {
    display: flex;
    gap: 8px;
}

.altis-input-group input {
    flex: 1;
}

.altis-help-text {
    font-size: 12px;
    color: var(--altis-text-light);
    margin-top: 4px;
}

.altis-radio-group {
    display: flex;
    gap: 16px;
}

.altis-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.altis-radio input {
    margin-right: 8px;
    accent-color: var(--altis-primary);
}

.altis-radio span {
    font-size: 14px;
    color: var(--altis-text);
}

.altis-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.altis-btn-primary {
    background: var(--altis-primary);
    color: white;
}

.altis-btn-primary:hover {
    background: var(--altis-secondary);
}

.altis-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.altis-btn-secondary {
    background: transparent;
    color: var(--altis-primary);
    border: 1px solid var(--altis-primary);
}

.altis-btn-secondary:hover {
    background: rgba(25, 199, 124, 0.1);
}

.altis-form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 16px;
}

.altis-form-actions .altis-btn:only-child {
    margin-left: auto;
}

.altis-verification-code {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
}

.altis-code-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--altis-border);
    border-radius: 12px;
}

.altis-code-input:focus {
    border-color: var(--altis-primary);
    outline: none;
}

.altis-info-text {
    text-align: center;
    color: var(--altis-text-light);
    font-size: 14px;
}

.altis-vehicle-card {
    background: #f9fafb;
    border: 1px solid var(--altis-border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.altis-vehicle-card h4 {
    margin: 0 0 16px 0;
    color: var(--altis-primary);
}

.altis-vehicle-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.altis-vehicle-info p {
    margin: 0;
    font-size: 14px;
}

.altis-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--altis-text-light);
}

.altis-divider::before,
.altis-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--altis-border);
}

.altis-divider span {
    padding: 0 16px;
    font-size: 14px;
}

.altis-fipe-value {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid var(--altis-success);
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--altis-success);
}

.altis-simulation-loader {
    text-align: center;
    padding: 60px 20px;
}

.altis-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--altis-border);
    border-top-color: var(--altis-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.altis-credit-info {
    background: linear-gradient(135deg, var(--altis-primary), var(--altis-secondary));
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.altis-credit-range span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.altis-credit-range strong {
    display: block;
    color: white;
    font-size: 24px;
    margin-top: 4px;
}

.altis-options-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.altis-option-card {
    border: 1px solid var(--altis-border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.altis-option-card:hover {
    border-color: var(--altis-primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(19, 81, 236, 0.15);
}

.altis-option-card.selected {
    border-color: var(--altis-primary);
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(19, 81, 236, 0.1);
}

.altis-option-card.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--altis-primary);
}

.altis-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.altis-option-installments {
    font-size: 18px;
    font-weight: 600;
    color: var(--altis-text);
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 8px;
}

.altis-option-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--altis-primary);
    letter-spacing: -0.5px;
}

.altis-option-details {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--altis-text-light);
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
}

.altis-no-options {
    text-align: center;
    padding: 40px 20px;
    color: var(--altis-text-light);
    font-size: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed var(--altis-border);
}

.altis-success-message {
    text-align: center;
    padding: 40px 20px;
}

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

.altis-success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--altis-success);
}

.altis-success-message h3 {
    color: var(--altis-text);
    margin: 0 0 8px 0;
}

.altis-success-message p {
    color: var(--altis-text-light);
    margin: 0;
}

.altis-proposal-summary {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.altis-proposal-summary h4 {
    margin: 0 0 16px 0;
    color: var(--altis-text);
}

.altis-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--altis-border);
}

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

.altis-summary-item span {
    color: var(--altis-text-light);
}

.altis-summary-item strong {
    color: var(--altis-text);
}

.altis-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 100;
}

.altis-loading-overlay p {
    color: var(--altis-text);
    font-weight: 500;
}

.altis-error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--altis-error);
    color: white;
    padding: 16px 40px 16px 20px;
    border-radius: 8px;
    z-index: 1000;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.altis-error-message p {
    margin: 0;
}

.altis-btn-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}

@media (max-width: 600px) {
    .altis-form-container {
        padding: 20px;
        margin: 10px;
        border-radius: 12px;
    }

    .altis-two-cols,
    .altis-three-cols {
        grid-template-columns: 1fr;
    }

    .altis-col-4 {
        max-width: 100%;
    }

    .altis-radio-group {
        flex-direction: column;
    }

    .altis-form-actions {
        flex-direction: column-reverse;
    }

    .altis-form-actions .altis-btn {
        width: 100%;
    }

    .altis-code-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .altis-option-details {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Seção de Documentos */
.altis-documents-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--altis-border);
}

.altis-documents-section h4 {
    margin: 0 0 10px 0;
    color: var(--altis-text);
    font-size: 16px;
    font-weight: 600;
}

.altis-documents-section h4:not(:first-child) {
    margin-top: 20px;
}

/* File Upload */
.altis-file-upload {
    position: relative;
    border: 2px dashed var(--altis-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.altis-file-upload:hover {
    border-color: var(--altis-primary);
    background: #f0fdf4;
}

.altis-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.altis-file-name {
    font-size: 13px;
    color: var(--altis-text-light);
    display: block;
}

.altis-file-upload.has-file {
    border-color: var(--altis-success);
    background: #f0fdf4;
}

.altis-file-upload.has-file .altis-file-name {
    color: var(--altis-success);
    font-weight: 500;
}

/* Veículo Encontrado */
.altis-vehicle-found {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid var(--altis-success);
}

.altis-vehicle-found h4 {
    color: var(--altis-success);
    margin: 0 0 15px 0;
}

.altis-vehicle-info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.altis-vehicle-info-row p {
    margin: 0;
    flex: 1;
}

.altis-fipe-selected {
    background: #f0fdf4;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--altis-success);
    margin-top: 10px;
}

.altis-fipe-selected p {
    margin: 0;
    color: var(--altis-success);
}

/* Terms Checkbox */
.altis-terms-checkbox {
    margin: 20px 0;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.altis-terms-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.altis-terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--altis-primary);
}

.altis-terms-checkbox span {
    font-size: 14px;
    line-height: 1.5;
}

.altis-terms-checkbox a {
    color: var(--altis-primary);
    text-decoration: underline;
}

/* Botão Voltar - Cinza */
.altis-btn-secondary {
    background: var(--altis-gray) !important;
    color: white !important;
    border-color: var(--altis-gray) !important;
}

.altis-btn-secondary:hover {
    background: #374151 !important;
    border-color: #374151 !important;
}

/* Tela de Resultado (Negado/Sucesso) */
.altis-result-screen {
    text-align: center;
    padding: 60px 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.altis-result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.altis-result-icon svg {
    width: 40px;
    height: 40px;
}

.altis-result-icon.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: var(--altis-success);
}

.altis-result-icon.denied {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: var(--altis-error);
}

.altis-result-screen h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--altis-text);
    margin: 0 0 15px 0;
}

.altis-result-screen p {
    font-size: 16px;
    color: var(--altis-text-light);
    line-height: 1.6;
    max-width: 450px;
    margin: 0 auto 30px;
}

.altis-result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 320px;
}

.altis-btn-whatsapp {
    background: #25D366 !important;
    border-color: #25D366 !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.altis-btn-whatsapp:hover {
    background: #1ebe5d !important;
    border-color: #1ebe5d !important;
}

.altis-btn-whatsapp svg {
    width: 20px;
    height: 20px;
}

.altis-btn-outline {
    background: transparent !important;
    border: 2px solid var(--altis-primary) !important;
    color: var(--altis-primary) !important;
}

.altis-btn-outline:hover {
    background: var(--altis-primary) !important;
    color: white !important;
}

/* Ocultar stepper em telas de resultado */
.altis-form-container.result-mode .altis-progress-bar {
    display: none;
}