/* Ajustes isolados da tela Realizar Venda. */
.prevenda-client-field {
    position: relative;
    margin-bottom: 12px;
}

.prevenda-client-autocomplete {
    position: relative;
}

.prevenda-client-autocomplete input[type="search"] {
    width: 100%;
    padding-right: 38px;
    text-transform: uppercase;
}

.prevenda-client-autocomplete::after {
    content: "⌕";
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: .55;
    font-size: 18px;
}

.prevenda-client-results {
    position: fixed;
    z-index: 100000;
    max-height: 310px;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 12px;
    background: #fff;
    color: #111827;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}

.prevenda-client-option {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.prevenda-client-option:hover,
.prevenda-client-option:focus-visible {
    background: rgba(59, 130, 246, .10);
    outline: none;
}

.prevenda-client-option strong {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-right: 12px;
    font-size: 13px;
}

.prevenda-client-option[data-status] strong::before {
    content: "";
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9ca3af;
    box-shadow: 0 0 0 1px rgba(255,255,255,.34);
}

.prevenda-client-option[data-status="ATIVO"] strong::before { background: #22c55e; }
.prevenda-client-option[data-status="BLOQUEADO"] strong::before { background: #ef4444; }
.prevenda-client-option[data-status="NEGATIVADO"] strong::before {
    background: #000;
    box-shadow: 0 0 0 1px rgba(255,255,255,.68);
}
.prevenda-client-option[data-status="EM_NEGOCIACAO"] strong::before { background: #eab308; }
.prevenda-client-option[data-status="CANCELADO"] strong::before { background: #9ca3af; }

.prevenda-client-option small {
    color: inherit;
    opacity: .68;
    font-size: 11px;
}

.prevenda-client-option-status {
    position: absolute;
    top: 9px;
    right: 10px;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 6px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
}

.prevenda-client-empty {
    padding: 10px 12px;
    color: var(--muted, #6b7280);
    font-size: 12px;
}


body.prevenda-crediario-open {
    overflow: hidden;
}
.prevenda-crediario-fields {
    position: fixed;
    inset: 0;
    z-index: 120000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .48);
    backdrop-filter: blur(2px);
}

.prevenda-crediario-fields[hidden] {
    display: none !important;
}

.prevenda-crediario-modal {
    width: min(430px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .30);
    border-radius: 18px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.prevenda-crediario-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.prevenda-crediario-head small {
    display: block;
    margin-bottom: 2px;
    color: inherit;
    opacity: .62;
    font-size: 11px;
}

.prevenda-crediario-head h3 {
    margin: 0;
    font-size: 20px;
}

.prevenda-crediario-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(148, 163, 184, .14);
    color: inherit;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.prevenda-crediario-parcelas-field {
    margin: 0;
}

.prevenda-crediario-parcelas-field select {
    width: 100%;
}

.prevenda-crediario-parcelas-field small {
    display: block;
    margin-top: 7px;
    color: inherit;
    opacity: .62;
    font-size: 12px;
}

.prevenda-crediario-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

/* O modal acompanha o tema escuro já aplicado pelo sistema. */
body.dark .prevenda-crediario-modal,
body.dark-mode .prevenda-crediario-modal,
body.theme-dark .prevenda-crediario-modal,
html.dark .prevenda-crediario-modal,
html.dark-mode .prevenda-crediario-modal,
html.theme-dark .prevenda-crediario-modal,
[data-theme="dark"] .prevenda-crediario-modal {
    background: #172334;
    color: #eef4ff;
}

.desktop-payment-btn.crediario .payment-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 760px) {
    .prevenda-client-results {
        max-height: 245px;
    }
}


@media (min-width: 981px) {
    body.logged-app.desktop-prevenda-open #screen-vendedor > .prevenda-client-field {
        grid-column: 1;
        margin: 0;
    }


    body.logged-app.desktop-prevenda-open .desktop-payment-btn.crediario {
        grid-column: 1 / -1;
        min-height: 72px;
        aspect-ratio: auto;
        flex-direction: row;
        background: var(--primary, #2563eb);
    }

}
