/* 
 * RECAP.PRO - Módulo PDV (Ponto de Venda)
 * Interface de alta performance e alto contraste
 */

.pdv-container {
    display: flex;
    height: 100%;
    background-color: #fff;
    overflow: hidden;
}

/* Coluna Esquerda: Dados da Venda e Totais */
.pdv-sidebar {
    width: 380px;
    background-color: #f8f9fa;
    border-right: 2px solid #ddd;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.pdv-product-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    background: #fff;
    margin-bottom: 20px;
}

.pdv-product-preview i {
    font-size: 80px;
    color: #0078d4;
    opacity: 0.2;
}

.pdv-input-group {
    margin-bottom: 20px;
}

.pdv-input-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.pdv-input {
    width: 100%;
    height: 50px;
    font-size: 24px;
    font-weight: 600;
    padding: 0 15px;
    border: 2px solid #0078d4;
    border-radius: 4px;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,120,212,0.1);
}

.pdv-total-box {
    background-color: #0078d4;
    color: #fff;
    padding: 20px;
    border-radius: 4px;
    text-align: right;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.pdv-total-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 5px;
}

.pdv-total-value {
    font-size: 48px;
    font-weight: 800;
    font-family: 'Courier New', Courier, monospace;
}

/* Coluna Direita: Carrinho de Itens */
.pdv-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.pdv-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    border-bottom: 2px solid #0078d4;
    padding-bottom: 10px;
}

.pdv-cart-header h3 {
    margin: 0;
    font-size: 18px;
}

.pdv-cart-table-wrapper {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
}

.pdv-table {
    width: 100%;
    border-collapse: collapse;
}

.pdv-table th {
    position: sticky;
    top: 0;
    background: #f3f3f3;
    z-index: 5;
    padding: 10px;
    font-size: 12px;
}

.pdv-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.pdv-table tr.active {
    background-color: #e5f1fb;
    font-weight: 600;
}

/* Legenda de Atalhos */
.pdv-footer-shortcuts {
    height: 40px;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    font-size: 11px;
}

.pdv-shortcut {
    opacity: 0.8;
}

.pdv-shortcut b {
    color: #00d2ff;
    background: rgba(255,255,255,0.1);
    padding: 2px 5px;
    border-radius: 2px;
}

.pdv-caixa-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    font-size: 13px;
    font-weight: 600;
}

.pdv-caixa-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.pdv-caixa-indicator.aberto {
    background: #2e7d32;
    box-shadow: 0 0 6px rgba(46,125,50,0.5);
}

.pdv-caixa-indicator.fechado {
    background: #c62828;
}

.pdv-caixa-badge {
    font-size: 11px;
    font-weight: 700;
    background: #2e7d32;
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
}

.pdv-produto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.pdv-produto-item:hover {
    background: #e3f2fd;
    border-color: #90caf9;
}

.pdv-resumo-venda .form-group {
    margin-bottom: 15px;
}

.pdv-cliente-box {
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 12px;
}

.pdv-cliente-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.pdv-cliente-row i {
    font-size: 18px;
    color: #666;
}

.pdv-cliente-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.pdv-cliente-item:hover {
    background: #e3f2fd;
    border-color: #90caf9;
}

/* =============================================
   MODAL FINALIZAR VENDA - Design Premium
   ============================================= */

.pdv-pay-header {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pdv-pay-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdv-pay-header-title i {
    font-size: 22px;
    opacity: 0.9;
}

.pdv-pay-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

.pdv-pay-header .modal-close {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pdv-pay-header .modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.pdv-pay-body {
    padding: 20px 22px;
}

/* Totalizador */
.pdv-pay-totalizador {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pdv-pay-itens-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #1565c0;
    font-weight: 600;
}

.pdv-pay-itens-badge i {
    font-size: 18px;
}

.pdv-pay-total-value {
    font-size: 26px;
    font-weight: 800;
    color: #0d47a1;
    letter-spacing: -0.5px;
}

/* Cards resumo */
.pdv-pay-resumo {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.pdv-pay-resumo-card {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
    transition: transform 0.15s;
}

.pdv-pay-resumo-card.desconto {
    background: #fff8f0;
    border-color: #ffe0b2;
}

.pdv-pay-resumo-card.liquido {
    background: #f0faf2;
    border-color: #c8e6c9;
}

.pdv-pay-resumo-label {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pdv-pay-resumo-value {
    font-weight: 700;
    font-size: 15px;
    color: #333;
}

.pdv-pay-resumo-card.desconto .pdv-pay-resumo-value { color: #e65100; }
.pdv-pay-resumo-card.liquido .pdv-pay-resumo-value { color: #2e7d32; }

/* Campos (field + label + input) */
.pdv-pay-field {
    margin-bottom: 12px;
}

/* Grid 2 colunas (Desconto | Forma de Pagamento) */
.pdv-pay-grid-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    margin-bottom: 0;
}

.pdv-pay-grid-2 .pdv-pay-field {
    margin-bottom: 12px;
}

/* Linha inferior: Troco + NF-e lado a lado */
.pdv-pay-bottom-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 4px;
}

.pdv-pay-bottom-row .pdv-pay-troco {
    flex: 0 0 auto;
    min-width: 160px;
    margin: 0;
}

.pdv-pay-bottom-row .pdv-pay-nfe-check {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0;
}

.pdv-pay-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 7px;
}

.pdv-pay-label i {
    font-size: 14px;
    color: #1565c0;
}

.pdv-pay-input {
    width: 100%;
    height: 48px;
    font-size: 17px;
    font-weight: 600;
    padding: 0 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    background: #fafafa;
    color: #222;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.pdv-pay-input:focus {
    border-color: #1565c0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.pdv-pay-input.destaque {
    border-color: #1976d2;
    background: #f0f6ff;
    font-size: 20px;
    height: 54px;
}

.pdv-pay-input.destaque:focus {
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.15);
}

/* Select customizado */
.pdv-pay-select-wrapper {
    position: relative;
}

.pdv-pay-select {
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 500;
    padding: 0 40px 0 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    background: #fafafa;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.pdv-pay-select:focus {
    border-color: #1565c0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.pdv-pay-select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
    pointer-events: none;
}

/* Botões rápidos de valor */
.pdv-pay-quick-btns {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pdv-pay-quick-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: #e8f0fe;
    border: 1.5px solid #c5d8f8;
    border-radius: 20px;
    color: #1565c0;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    white-space: nowrap;
}

.pdv-pay-quick-btn:hover {
    background: #1565c0;
    border-color: #1565c0;
    color: #fff;
}

.pdv-pay-quick-btn:active {
    transform: scale(0.95);
}

/* Card de troco */
.pdv-pay-troco {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    border-radius: 10px;
    padding: 14px 18px;
    text-align: center;
    margin-top: 4px;
    margin-bottom: 16px;
    animation: pdvTrocoAppear 0.25s ease;
}

@keyframes pdvTrocoAppear {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pdv-pay-troco-label {
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 4px;
}

.pdv-pay-troco-value {
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Toggle NF-e */
.pdv-pay-nfe-check {
    margin-top: 4px;
    padding: 12px 16px;
    background: #f0faf2;
    border: 1.5px solid #c8e6c9;
    border-radius: 8px;
}

.pdv-pay-nfe-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.pdv-pay-nfe-label input[type="checkbox"] {
    display: none;
}

.pdv-pay-nfe-toggle {
    width: 40px;
    height: 22px;
    min-width: 40px;
    background: #ccc;
    border-radius: 11px;
    position: relative;
    transition: background 0.25s;
}

.pdv-pay-nfe-toggle::after {
    content: '';
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: left 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pdv-pay-nfe-label input:checked + .pdv-pay-nfe-toggle {
    background: #2e7d32;
}

.pdv-pay-nfe-label input:checked + .pdv-pay-nfe-toggle::after {
    left: 21px;
}

.pdv-pay-nfe-text {
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdv-pay-nfe-text i {
    font-size: 16px;
}

/* Footer do modal */
.pdv-pay-footer {
    display: flex;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 10px 10px;
}

.pdv-pay-btn-cancelar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 22px;
    height: 48px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.pdv-pay-btn-cancelar:hover {
    border-color: #bbb;
    color: #222;
}

.pdv-pay-btn-confirmar {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.35);
}

.pdv-pay-btn-confirmar:hover {
    opacity: 0.92;
    box-shadow: 0 6px 18px rgba(21, 101, 192, 0.45);
}

.pdv-pay-btn-confirmar:active {
    transform: scale(0.98);
}

