:root {
    --brand: #1B56E2;
    --brand-dark: #0D2C7A;
    --brand-light: #EEF3FD;
    --surface: #F7F9FC;
    --white: #FFFFFF;
    --border: #E4EAF4;
    --text: #0F1C2E;
    --text2: #5A6A82;
    --text3: #94A3B8;
    --green: #16A34A;
    --red: #DC2626;
    --yellow: #CA8A04;
    --radius: 16px;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--surface);
    color: var(--text);
    min-height: 100vh;
}

/* ── HEADER ── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.header-logo .logo-mark {
    width: 38px;
    height: 38px;
    background: var(--brand);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    letter-spacing: -1px;
}

.header-logo .logo-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.header-logo .logo-name span {
    color: var(--brand);
}

/* ── PROGRESS ── */
.progress-wrap {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
}

.progress-track {
    max-width: 640px;
    margin: 0 auto;
}

.progress-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text3);
    background: #fff;
    flex-shrink: 0;
    transition: all 0.3s;
}

.step-circle.done {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.step-circle.active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
    white-space: nowrap;
}

.step-label.active {
    color: var(--brand);
}

.step-label.done {
    color: var(--green);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
}

.step-line.done {
    background: var(--green);
}

/* ── MAIN CONTENT ── */
.main {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 28px;
}

/* ── CARD ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

/* ── FORM ── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}

.form-label .opt {
    font-weight: 400;
    color: var(--text3);
    font-size: 11px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 11px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(27, 86, 226, 0.12);
}

.form-control.is-invalid {
    border-color: var(--red);
}

.form-control::placeholder {
    color: var(--text3);
}

.invalid-feedback {
    font-size: 12px;
    color: var(--red);
    margin-top: 5px;
}

.form-hint {
    font-size: 12px;
    color: var(--text3);
    margin-top: 5px;
}

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

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.vehicle-type-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    background-color: transparent;
}

.vehicle-type-label.active {
    border-color: var(--brand);
    background-color: var(--brand-light);
}

.vehicle-type-label.active span {
    color: var(--brand) !important;
}

/* ── PLATE INPUT ── */
.plate-input-wrap {
    position: relative;
}

.plate-input-wrap .plate-input {
    text-transform: uppercase;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    padding: 14px 60px 14px 16px;
}

.plate-lookup-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* ── VEHICLE INFO BOX ── */
.vehicle-info {
    background: var(--brand-light);
    border: 1.5px solid rgba(27, 86, 226, 0.15);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.vehicle-info .car-icon {
    font-size: 28px;
}

.vehicle-info .info-main {
    flex: 1;
}

.vehicle-info .car-model {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-dark);
}

.vehicle-info .car-meta {
    font-size: 12px;
    color: var(--brand);
    margin-top: 2px;
}

/* ── FIPE VALUE DISPLAY ── */
.fipe-display {
    background: linear-gradient(135deg, #0D2C7A 0%, #1B56E2 100%);
    border-radius: 14px;
    padding: 20px 24px;
    color: #fff;
    margin-bottom: 20px;
}

.fipe-display .label {
    font-size: 11px;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.fipe-display .value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 4px 0;
}

.fipe-display .max-label {
    font-size: 12px;
    opacity: 0.7;
}

.fipe-display .max-value {
    font-size: 16px;
    font-weight: 700;
    opacity: 0.9;
}

/* ── RANGE SLIDER ── */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(27, 86, 226, 0.35);
}

/* ── INSTALLMENT CARDS ── */
.installment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.installment-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.installment-card:hover {
    border-color: var(--brand);
}

.installment-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.installment-card.selected {
    border-color: var(--brand);
    background: var(--brand-light);
}

.installment-card .installments-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
}

.installment-card .installment-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin: 4px 0;
}

.installment-card .rate-label {
    font-size: 11px;
    color: var(--text3);
}

.installment-card .check-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.installment-card.selected .check-icon {
    display: flex;
}

.fipe-card-blue {
    background-color: #1a3cb3; /* Ajuste para o tom exato de azul do seu layout */
    color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.fipe-card-blue .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

/* Transforma o input em um texto grande e limpo */
.input-as-text {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    padding: 0;
    margin: 0 0 16px 0;
    width: 100%;
    font-family: inherit;
    transition: opacity 0.2s;
}

.input-as-text:focus {
    opacity: 0.9;
    /* Opcional: colocar um leve border-bottom se quiser mostrar que está focado */
    /* border-bottom: 1px dashed rgba(255,255,255,0.5); */
}

.input-as-text::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.fipe-card-blue .max-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.fipe-card-blue .max-value {
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
}

/* ── CHECKBOX ── */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--brand);
}

.checkbox-group label {
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

/* ── BTN ── */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    background: var(--brand-dark);
}

[x-cloak] { 
    display: none !important; 
}

.btn-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    text-decoration: none;
    margin-top: 10px;
    transition: border-color 0.15s;
}

.btn-back:hover {
    border-color: var(--text2);
}

/* ── ALERT ── */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: #FEE2E2;
    color: var(--red);
    border: 1px solid #FECACA;
}

.alert-success {
    background: #DCFCE7;
    color: var(--green);
    border: 1px solid #BBF7D0;
}

.alert-info {
    background: var(--brand-light);
    color: var(--brand);
    border: 1px solid rgba(27, 86, 226, 0.2);
}


.step-circle.done i {
    font-size: 16px;
}

.card-plan-content {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}

/* Botão Branco do CET */
.btn-cet-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.2s;
    text-align: left;
    margin-top: 16px;
    margin-bottom: 20px;
}
.btn-cet-trigger:hover {
    border-color: var(--brand, #1a3cb3);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.cet-trigger-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text1, #1e293b);
}
.cet-trigger-subtitle {
    font-size: 12px;
    color: var(--text3, #64748b);
    margin-top: 2px;
}
.cet-trigger-action {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand, #1a3cb3);
}

/* Card de Detalhamento estilo Extrato */
.cet-breakdown-card {
    background-color: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 0 20px;
    margin-top: 12px;
    margin-bottom: 20px;
}
.cet-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.cet-row:last-child {
    border-bottom: none;
}
.cet-label-block {
    flex: 1;
    padding-right: 16px;
}
.cet-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text1, #1e293b);
}
.cet-sublabel {
    font-size: 12px;
    color: var(--text3, #64748b);
    margin-top: 4px;
    line-height: 1.4;
}
.cet-value-block {
    text-align: right;
}
.cet-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text1, #1e293b);
}
.cet-subvalue {
    font-size: 12px;
    color: var(--text3, #64748b);
    margin-top: 4px;
}

/* ── LOADING SPINNER ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ── FOOTER ── */
.site-footer {
    text-align: center;
    padding: 24px;
    font-size: 12px;
    color: var(--text3);
    border-top: 1px solid var(--border);
}


/* ── MOBILE ── */

@media (max-width: 440px) {
    .card-plan-content {
        grid-template-columns:repeat(2,1fr);
    }
}