/* =========================================================
   COTA FÁCIL - APP.CSS LIMPO
   Paleta: verde escuro #007A2F / verde claro #8ED63E
   Ajustes: mini-card com label flutuante, Tom Select sem bloco interno,
   Zero KM seletor quadrado, CSS duplicado removido.
   ========================================================= */

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111827;
    --text-secondary: #6b7280;
    --primary: #007A2F;
    --primary-light: #8ED63E;
    --success: #007A2F;
    --border: #d9dde3;
    --border-soft: #e5e7eb;
    --soft-green: #eef8e8;
}

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

html,
body {
    height: 100%;
    font-family: 'Sora', sans-serif;
    background: var(--bg) !important;
    color: var(--text);
}

/* =========================================================
   TELAS / TRANSIÇÃO
   ========================================================= */

.screen {
    display: none;
    opacity: 0;
    transition: opacity .3s ease;
}

    .screen.active {
        display: block;
        opacity: 1;
        animation: slideIn .3s ease forwards;
    }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper {
    width: 100%;
    max-width: 430px !important;
    margin: 0 auto !important;
    padding: 28px 18px 120px !important;
}

h2 {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
}

/* =========================================================
   FORMULÁRIOS
   ========================================================= */

.form-group {
    margin-bottom: 18px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 16px;
    color: var(--text);
    background: #fafafa;
    font-family: 'Sora', sans-serif;
    transition: all .2s ease;
}

    .form-input::placeholder,
    .form-textarea::placeholder {
        color: var(--text-secondary);
    }

    input:focus,
    select:focus,
    textarea:focus,
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        outline: none !important;
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 3px rgba(0,122,47,.08) !important;
    }

    .form-input:hover,
    .form-select:hover,
    .form-textarea:hover {
        border-color: var(--primary);
    }

/* =========================================================
   MINI-CARDS COM LABEL FLUTUANTE
   Usar para CEP, MARCA, MODELO, Ano Modelo, Ano Fabricação e Zero KM.
   ========================================================= */

.mini-card {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    padding: 20px 14px 14px;
    position: relative;
}

.mini-card-label {
    position: absolute;
    top: -10px;
    left: 16px;
    background: #ffffff;
    padding: 0 8px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    color: var(--text-secondary);
    z-index: 3;
}

.mini-card-field {
    position: relative;
    width: 100%;
}

    .mini-card-field > i,
    .mini-card-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        color: var(--primary);
        z-index: 5;
        pointer-events: none;
    }

.mini-card .form-input,
.mini-card .form-select {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 44px;
    padding: 0 14px;
    border-radius: 0;
}

    .mini-card .form-input.with-icon,
    .mini-card .form-select.with-icon {
        padding-left: 42px !important;
    }

/* =========================================================
   TOM SELECT - MARCA / MODELO
   Remove o quadrado interno quando o select estiver dentro do mini-card.
   ========================================================= */

.ts-wrapper {
    width: 100% !important;
}

.ts-control {
    width: 100% !important;
    min-height: 50px !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: #fafafa !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: none !important;
    font-family: 'Sora', sans-serif !important;
}

.ts-wrapper.focus .ts-control {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0,122,47,.08) !important;
}

.mini-card .ts-wrapper,
.mini-card .ts-control {
    width: 100% !important;
}

.mini-card .ts-control {
    height: 44px !important;
    min-height: 44px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 14px 0 42px !important;
}

.mini-card .ts-wrapper.focus .ts-control {
    border: none !important;
    box-shadow: none !important;
}

.ts-control input,
.ts-control .item,
.ts-dropdown .option {
    font-family: 'Sora', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
}

#marca-ts-control input,
#modelo-ts-control input,
#marca-ts-control .item,
#modelo-ts-control .item,
.ts-dropdown .option {
    text-transform: uppercase !important;
}

.ts-dropdown {
    border-radius: 10px !important;
    border: 1px solid var(--border-soft) !important;
    overflow: hidden;
}

/* =========================================================
   ZERO KM - SELETOR QUADRADO COM RADIO ESCONDIDO
   ========================================================= */

.zero-km-selector {
    display: flex;
    width: 100%;
    overflow: hidden;
    border: 1px solid #d9dee5;
    border-radius: 12px;
    background: #ffffff;
}

    .zero-km-selector input {
        display: none;
    }

    .zero-km-selector label {
        flex: 1;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
        color: var(--text-secondary);
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        user-select: none;
    }

        .zero-km-selector label:first-of-type {
            border-right: 1px solid #d9dee5;
        }

    .zero-km-selector input:checked + label {
        background: #AAF45A;
        color: #06402B;
    }

/* =========================================================
   BOTÕES
   ========================================================= */

.btn-primary {
    height: 56px;
    border: none;
    border-radius: 10px !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 800 !important;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,122,47,.20);
    transition: all .2s ease;
}

    .btn-primary:hover {
        background: #006126 !important;
        transform: translateY(-1px);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.btn-secondary {
    height: 56px;
    border-radius: 10px !important;
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-size: 15px;
    font-weight: 800 !important;
    cursor: pointer;
    transition: all .2s ease;
}

    .btn-secondary:hover {
        background: rgba(0,122,47,.05);
    }

/* =========================================================
   HEADER / PROGRESS
   ========================================================= */

.header-logo {
    background: var(--primary-light) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 28px 20px !important;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.progress-bar {
    height: 4px;
    background: var(--border-soft);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width .3s ease;
}

/* =========================================================
   SCREEN 3 - CARDS DE USO
   ========================================================= */

.uso-card {
    width: 100%;
    min-height: 72px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
}

    .uso-card.selected {
        border-color: var(--primary);
        background: #f7fff4;
    }

.uso-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--soft-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

    .uso-icon i {
        width: 22px;
        height: 22px;
    }

.uso-card strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.uso-card span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 3px;
}

.uso-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.uso-radio {
    width: 26px;
    height: 26px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
}

/* =========================================================
   SCREEN 4 - GUINCHO / RCF / PLANOS
   ========================================================= */

.guincho-selector,
.rcf-selector {
    height: 48px !important;
    border: 1px solid var(--border);
    border-radius: 10px !important;
    overflow: hidden;
    background: #ffffff;
}

.guincho-selector {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.guincho-btn,
.btn-guincho,
.btn-rcf {
    flex: 1;
    border: none;
    background: #ffffff;
    color: #111827 !important;
    font-family: 'Sora', sans-serif !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: -0.2px !important;
    cursor: pointer;
    transition: .2s;
}

    .guincho-btn:not(:last-child) {
        border-right: 1px solid var(--border-soft);
    }

    .guincho-btn.active,
    .btn-guincho.active,
    .btn-rcf.active {
        background: var(--primary);
        color: #ffffff !important;
    }

.rcf-select {
    height: 42px !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.plan-tab {
    border-radius: 0 !important;
}

#valor-cotacao {
    background: #ffffff !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    border: 1px solid #eeeeee;
}

.plano-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    background: #ffffff;
    cursor: pointer;
}

    .plano-card.selected {
        border: 2px solid var(--primary);
        background: #fbfff8;
    }

.plano-info {
    flex: 1;
}

.plano-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

    .plano-header strong {
        font-size: 15px;
        font-weight: 900;
        color: var(--text);
    }

    .plano-header span {
        background: var(--primary-light);
        color: #ffffff;
        padding: 4px 8px;
        border-radius: 999px;
        font-size: 9px;
        font-weight: 800;
    }

.plano-info p {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin: 6px 0;
}

.plano-valor {
    min-width: 120px;
    text-align: right;
}

    .plano-valor small {
        display: block;
        color: var(--text-secondary);
        font-size: 11px;
    }

    .plano-valor strong {
        display: block;
        color: var(--primary);
        font-size: 28px;
        font-weight: 900;
    }

    .plano-valor p {
        font-size: 11px;
        color: var(--text);
        margin: 2px 0 0;
    }

.plano-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    margin-left: auto;
    margin-bottom: 12px;
}

    .plano-radio.active {
        border: 6px solid var(--primary);
    }

/* =========================================================
   SUCESSO / PDF
   ========================================================= */

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px !important;
    height: 110px !important;
    border-radius: 50%;
    background: rgba(0,122,47,.10);
    margin: 0 auto 20px;
}

.btn-imprimir-cotacao {
    margin: 24px auto 18px auto;
    width: 100%;
    max-width: 320px;
    height: 56px;
    border: none;
    border-radius: 18px;
    background: var(--primary);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,122,47,.22);
    transition: all .2s ease;
}

    .btn-imprimir-cotacao:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(0,122,47,.30);
    }

    .btn-imprimir-cotacao:active {
        transform: scale(.98);
    }

/* =========================================================
   MODAL
   ========================================================= */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
}

    .modal-overlay.active {
        display: flex;
        align-items: flex-end;
    }

.modal-content {
    background: var(--surface);
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    padding: 24px;
    overflow-y: auto;
    animation: slideUp .3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary);
    }

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 480px) {
    #loginCard {
        transform: scale(.85);
    }

        #loginCard img {
            max-width: 120px;
        }

        #loginCard input {
            height: 54px !important;
            font-size: 18px !important;
        }

        #loginCard button {
            height: 58px !important;
            font-size: 20px !important;
        }
}

@media (min-width: 768px) {
    .content-wrapper {
        max-width: 700px !important;
        padding: 32px !important;
    }
}

@media (min-width: 1024px) {
    .content-wrapper {
        max-width: 800px !important;
        padding: 48px !important;
    }
}
.mini-card .ts-control {
    padding-left: 48px !important;
}

    .mini-card .ts-control input {
        margin-left: 6px !important;
    }

.mini-card > i {
    left: 16px !important;
    z-index: 10 !important;
}