/* ================================================================
   PDV LOJA — Design System v2
   Inspirado em interfaces modernas de PDV (Kyte, Stone, etc.)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary:       #3b82f6;
    --primary-dark:  #2563eb;
    --success:       #10b981;
    --success-dark:  #059669;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --dark:          #0f172a;
    --dark2:         #1e293b;
    --sidebar-bg:    #1e293b;
    --bg:            #f1f5f9;
    --card:          #ffffff;
    --text:          #0f172a;
    --muted:         #64748b;
    --border:        #e2e8f0;
    --radius:        .75rem;
    --radius-sm:     .5rem;
    --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 10px 40px rgba(0,0,0,.14);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: .925rem;
}

/* ── Scrollbars finas ──────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
    background: var(--dark2) !important;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: .5rem 1.25rem;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -.02em;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.navbar-brand .brand-icon {
    width: 30px; height: 30px;
    background: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
}
.navbar .nav-link {
    color: rgba(255,255,255,.7) !important;
    font-weight: 500;
    font-size: .875rem;
    padding: .4rem .75rem !important;
    border-radius: var(--radius-sm);
    transition: all .15s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,.08); }
.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    padding: .35rem;
}
.navbar .dropdown-item {
    border-radius: 6px;
    font-size: .875rem;
    padding: .45rem .75rem;
}
.navbar .dropdown-item:hover { background: var(--bg); }

.badge-caixa {
    padding: .3rem .65rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
    display: flex; align-items: center; gap: .3rem;
}
.badge-caixa.aberto  { background: rgba(16,185,129,.18); color: #10b981; }
.badge-caixa.fechado { background: rgba(239,68,68,.14);  color: #ef4444; }

/* ================================================================
   CARDS GERAIS
   ================================================================ */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card);
}
.card-header {
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: .85rem 1.1rem;
    font-weight: 600;
    font-size: .9rem;
    background: var(--card) !important;
    color: var(--text);
}
.card-header.dark {
    background: var(--dark2) !important;
    color: #fff;
    border-bottom: none;
}

/* ================================================================
   BOTÕES
   ================================================================ */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    transition: all .15s;
}
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-success:hover { background: var(--success-dark); border-color: var(--success-dark); }

/* ================================================================
   DASHBOARD — Stat cards
   ================================================================ */
.stat-card {
    border-radius: var(--radius) !important;
    border: none !important;
    overflow: hidden;
    position: relative;
}
.stat-card .card-body { padding: 1.25rem; }
.stat-card .stat-icon {
    font-size: 2.2rem;
    opacity: .25;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.stat-card .stat-value { font-size: 1.65rem; font-weight: 800; line-height: 1; }
.stat-card .stat-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .8;
    margin-bottom: .35rem;
}

/* ================================================================
   TABELAS
   ================================================================ */
.table { font-size: .875rem; }
.table thead th {
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    padding: .6rem .75rem;
}
.table td { padding: .6rem .75rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8faff; }

/* ================================================================
   FORMULÁRIOS
   ================================================================ */
.form-label { font-weight: 600; font-size: .83rem; color: var(--muted); margin-bottom: .3rem; }
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-size: .875rem;
    padding: .5rem .75rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* ================================================================
   ALERTS
   ================================================================ */
.alert { border: none; border-radius: var(--radius-sm); font-size: .875rem; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger  { background: #fef2f2; color: #991b1b; }
.alert-warning { background: #fffbeb; color: #92400e; }

/* ================================================================
   TOASTS FLUTUANTES
   ================================================================ */
#toast-container {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.toast-msg {
    padding: .7rem 1.1rem; border-radius: var(--radius-sm);
    color: #fff; font-weight: 600; font-size: .875rem;
    box-shadow: var(--shadow-lg); animation: slideUp .2s ease-out;
    min-width: 240px; display: flex; align-items: center; gap: .5rem;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--primary); }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   BADGES
   ================================================================ */
.badge { font-weight: 600; font-size: .72rem; padding: .3em .6em; border-radius: 99px; }

/* ================================================================
   PDV — Layout de tela cheia
   ================================================================ */
body.pdv-body-page {
    background: var(--dark);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar do PDV */
.pdv-topbar {
    background: var(--dark2);
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    gap: 1rem;
}
.pdv-topbar .brand {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.pdv-topbar .brand-dot {
    width: 26px; height: 26px;
    background: var(--primary);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
}
.pdv-topbar .topbar-actions {
    display: flex; align-items: center; gap: .5rem;
}
.pdv-topbar .btn-topbar {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.85);
    border-radius: var(--radius-sm);
    padding: .35rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    display: flex; align-items: center; gap: .35rem;
}
.pdv-topbar .btn-topbar:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
}
.pdv-topbar .status-caixa {
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .65rem;
    border-radius: 99px;
}
.pdv-topbar .clock {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    font-variant-numeric: tabular-nums;
}

/* Main split */
.pdv-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── Painel ESQUERDO: carrinho ────────────────────────── */
.pdv-cart-panel {
    width: 360px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.pdv-cart-top {
    padding: .75rem 1rem .5rem;
    border-bottom: 1px solid var(--border);
}
.pdv-cart-top label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    display: block;
    margin-bottom: .3rem;
}
.pdv-cart-top select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .4rem .65rem;
    font-size: .875rem;
    font-weight: 500;
    background: #fff;
    color: var(--text);
}

.pdv-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: .5rem;
}

.pdv-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted);
    gap: .5rem;
    padding: 2rem;
    text-align: center;
}
.pdv-empty-cart i { font-size: 2.5rem; opacity: .25; }
.pdv-empty-cart p { font-size: .875rem; margin: 0; }

/* Cart item */
.cart-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .5rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid #f1f5f9;
    transition: background .1s;
}
.cart-item:hover { background: #f8fafc; }
.cart-item-img {
    width: 38px; height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
}
.cart-item-img-placeholder {
    width: 38px; height: 38px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: .9rem;
    color: #fff;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-nome {
    font-weight: 600;
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.cart-item-preco-unit { font-size: .72rem; color: var(--muted); }
.cart-item-controls {
    display: flex; align-items: center; gap: .25rem;
    flex-shrink: 0;
}
.cart-qty-btn {
    width: 24px; height: 24px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: .85rem; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .1s;
    flex-shrink: 0;
}
.cart-qty-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.cart-qty-input {
    width: 38px; text-align: center;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: .82rem; font-weight: 700;
    padding: .2rem .15rem;
    height: 26px;
}
.cart-item-subtotal {
    font-weight: 700;
    font-size: .85rem;
    color: var(--success-dark);
    min-width: 58px;
    text-align: right;
    flex-shrink: 0;
}
.cart-remove {
    background: none; border: none;
    color: #cbd5e1; cursor: pointer;
    font-size: .9rem; padding: .1rem .2rem;
    line-height: 1;
    transition: color .1s;
    flex-shrink: 0;
}
.cart-remove:hover { color: var(--danger); }

/* Totais e pagamento */
.pdv-payment-panel {
    padding: .75rem;
    border-top: 2px solid var(--border);
    background: #fff;
}
.pdv-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .2rem;
    font-size: .83rem;
}
.pdv-total-row .label { color: var(--muted); font-weight: 500; }
.pdv-total-row .value { font-weight: 600; }
.pdv-total-big {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .5rem 0;
    border-top: 2px solid var(--border);
    margin-top: .35rem;
}
.pdv-total-big .total-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
}
.pdv-total-big .total-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

/* Desconto inline */
.pdv-discount-row {
    display: flex; align-items: center; gap: .4rem;
    margin-bottom: .5rem;
}
.pdv-discount-row label { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pdv-discount-row input {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .3rem .5rem;
    font-size: .85rem;
    text-align: right;
}

/* Pagamentos */
.pagamento-row {
    display: flex; gap: .35rem; align-items: center; margin-bottom: .35rem;
}
.pagamento-row select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .32rem .5rem;
    font-size: .8rem;
    font-weight: 600;
    min-width: 0;
    flex: 1;
    background: #fff;
}
.pagamento-row input {
    width: 90px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .32rem .5rem;
    font-size: .85rem;
    text-align: right;
    font-weight: 700;
}
.pagamento-row .btn-rm {
    background: none; border: none;
    color: #cbd5e1; cursor: pointer;
    font-size: .9rem; padding: 0 .2rem;
}
.pagamento-row .btn-rm:hover { color: var(--danger); }
.btn-add-pgto {
    background: none;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem;
    width: 100%;
    cursor: pointer;
    transition: all .15s;
    margin-bottom: .5rem;
}
.btn-add-pgto:hover { border-color: var(--primary); color: var(--primary); background: rgba(59,130,246,.04); }

/* Troco */
.pdv-troco-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .83rem; margin-bottom: .5rem;
}
.pdv-troco-row .label { color: var(--muted); }
.pdv-troco-row .value { font-weight: 700; color: var(--success); }

/* Botão finalizar */
.btn-pdv-finalizar {
    width: 100%;
    padding: .85rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--success);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-pdv-finalizar:hover:not(:disabled) { background: var(--success-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.35); }
.btn-pdv-finalizar:disabled { background: #94a3b8; cursor: not-allowed; }

/* ── Painel DIREITO: produtos ─────────────────────────── */
.pdv-products-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.pdv-search-bar {
    background: var(--dark2);
    padding: .75rem 1rem;
    flex-shrink: 0;
    display: flex;
    gap: .5rem;
    align-items: center;
}
.pdv-search-bar .search-wrap {
    flex: 1;
    position: relative;
}
.pdv-search-bar .search-icon {
    position: absolute; left: .75rem; top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.4);
    font-size: .95rem;
    pointer-events: none;
}
.pdv-search-bar input {
    width: 100%;
    background: rgba(255,255,255,.09);
    border: 1.5px solid rgba(255,255,255,.12);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: .55rem .75rem .55rem 2.2rem;
    font-size: .95rem;
    font-weight: 500;
    transition: all .15s;
}
.pdv-search-bar input::placeholder { color: rgba(255,255,255,.35); }
.pdv-search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,.12);
    box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}
.pdv-search-bar .btn-clear {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.6);
    border-radius: var(--radius-sm);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .15s; font-size: .85rem;
}
.pdv-search-bar .btn-clear:hover { background: rgba(255,255,255,.14); color: #fff; }

/* Label acima do grid */
.pdv-grid-label {
    padding: .4rem 1rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.45);
    background: var(--dark2);
    border-top: 1px solid rgba(255,255,255,.05);
    display: flex; align-items: center; gap: .35rem;
    flex-shrink: 0;
}

/* Seção de Produtos Frequentes ⚡ */
.pdv-frequentes-section {
    background: var(--dark2);
    border-top: 1px solid rgba(255,255,255,.05);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: 140px;
}

.pdv-frequentes-label {
    padding: .4rem 1rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.45);
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
}

.pdv-frequentes-scroll {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .75rem;
    flex: 1;
    align-items: center;
}

.pdv-frequentes-scroll::-webkit-scrollbar {
    height: 4px;
}

.pdv-frequentes-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 99px;
}

.btn-frequente {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .5rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: .5rem;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    transition: all .2s ease;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.btn-frequente img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: .25rem;
}

.btn-frequente:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.2);
    color: #fff;
    transform: translateY(-2px);
}

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

.btn-frequente-nome {
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.btn-frequente-preco {
    font-size: .65rem;
    opacity: .7;
}

/* Grid de produtos */
.pdv-grid {
    flex: 1;
    overflow-y: auto;
    padding: .75rem;
    background: var(--bg);
    align-content: start;
}
.pdv-grid .empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--muted);
    gap: .75rem;
    text-align: center;
}
.pdv-grid .empty-state i { font-size: 3rem; opacity: .2; }
.pdv-grid .empty-state p { margin: 0; font-size: .9rem; }

/* Container interno do grid */
.pdv-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: .75rem;
}

/* Card de produto */
.produto-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
    transition: all .15s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.produto-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.produto-card:active { transform: translateY(0); }
.produto-card .card-foto {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}
.produto-card .card-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255,255,255,.9);
    font-family: 'Inter', sans-serif;
}
.produto-card .card-body-produto {
    padding: .5rem .6rem .6rem;
    flex: 1;
}
.produto-card .card-nome {
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: .25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}
.produto-card .card-preco {
    font-size: .9rem;
    font-weight: 800;
    color: var(--success-dark);
}
.produto-card .card-estoque {
    font-size: .68rem;
    color: var(--muted);
    margin-top: .1rem;
}
.produto-card .badge-estoque-baixo {
    position: absolute; top: .4rem; right: .4rem;
    background: rgba(239,68,68,.9);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    padding: .15rem .4rem;
    border-radius: 99px;
}

/* Produto sem estoque */
.produto-card.sem-estoque { opacity: .5; cursor: not-allowed; }
.produto-card.sem-estoque:hover { transform: none; border-color: transparent; }

/* ================================================================
   CLIENTE PESQUISÁVEL
   ================================================================ */
.client-search-wrap {
    position: relative;
}
.client-input-row {
    position: relative;
    display: flex; align-items: center;
}
.client-input-row input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .4rem 2rem .4rem .65rem;
    font-size: .875rem;
    font-weight: 500;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}
.client-input-row input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.12); cursor: text; }
.client-arrow { position: absolute; right: .6rem; color: var(--muted); font-size: .75rem; pointer-events: none; }

.client-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: 220px;
    overflow-y: auto;
}
.client-dropdown.open { display: block; }
.client-dd-item {
    padding: .5rem .75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background .1s;
}
.client-dd-item:last-child { border-bottom: none; }
.client-dd-item:hover { background: #f0f7ff; }
.client-dd-nome  { font-weight: 600; font-size: .875rem; }
.client-dd-info  { font-size: .72rem; color: var(--muted); }
.client-dd-empty { padding: .75rem; text-align: center; color: var(--muted); font-size: .875rem; }

/* ================================================================
   MODAL DE PAGAMENTO
   ================================================================ */
.modal-pgto { border: none; border-radius: 1rem; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.25); }

.modal-pgto-header {
    background: linear-gradient(135deg, var(--dark2), #0f172a);
    color: #fff;
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
    position: relative;
}
.modal-pgto-close {
    position: absolute; top: .75rem; right: .75rem;
    background: rgba(255,255,255,.1); border: none;
    color: rgba(255,255,255,.7); border-radius: 8px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: .85rem;
    transition: all .15s;
}
.modal-pgto-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.modal-pgto-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .6; margin-bottom: .25rem; }
.modal-pgto-total { font-size: 2.5rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.modal-pgto-cliente { font-size: .8rem; opacity: .55; margin-top: .35rem; }

.modal-pgto-body { padding: 1.25rem; }

/* Grid de formas */
.pgto-methods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    margin-bottom: 1rem;
}
.pgto-method-btn {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .6rem .25rem;
    cursor: pointer;
    transition: all .15s;
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    font-size: .7rem; font-weight: 700; color: var(--muted);
}
.pgto-method-btn i { font-size: 1.25rem; }
.pgto-method-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(59,130,246,.05); }
.pgto-method-btn.active { border-color: var(--primary); background: rgba(59,130,246,.1); color: var(--primary); }
.pgto-method-btn[data-forma="pix"].active     { border-color: #10b981; background: rgba(16,185,129,.1); color: #10b981; }
.pgto-method-btn[data-forma="dinheiro"].active { border-color: #f59e0b; background: rgba(245,158,11,.1); color: #f59e0b; }

/* Lista de pagamentos adicionados */
.mp-pgto-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .4rem .5rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    margin-bottom: .35rem;
    font-size: .875rem;
}
.mp-pgto-item span:first-child { flex: 1; }
.mp-rm-btn { background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: .85rem; padding: 0; transition: color .1s; }
.mp-rm-btn:hover { color: var(--danger); }

/* Linha de input */
.mp-input-row {
    display: flex; gap: .4rem; align-items: center; margin-bottom: .6rem;
}
.mp-select {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .45rem .5rem;
    font-size: .82rem; font-weight: 600;
    background: #fff; min-width: 0;
}
.mp-valor-input {
    width: 120px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: .45rem .6rem;
    font-size: 1rem; font-weight: 700;
    text-align: right;
    background: rgba(59,130,246,.04);
}
.mp-add-btn {
    width: 38px; height: 38px;
    background: var(--primary); border: none; color: #fff;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; flex-shrink: 0;
    transition: background .15s;
}
.mp-add-btn:hover { background: var(--primary-dark); }

/* Valores rápidos */
.mp-quick-row {
    display: flex; align-items: center; gap: .35rem;
    margin-bottom: .75rem; flex-wrap: wrap;
}
.mp-quick-label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.mp-quick-btn {
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: .2rem .55rem;
    font-size: .78rem; font-weight: 700; cursor: pointer;
    transition: all .12s; color: var(--text);
}
.mp-quick-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(59,130,246,.06); }

/* Resumo */
.mp-resumo { border-top: 1px solid var(--border); padding-top: .75rem; }
.mp-resumo-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .85rem; padding: .2rem 0;
}
.mp-resumo-row span:first-child { color: var(--muted); }
.mp-resumo-total { font-weight: 800; font-size: 1rem; border-bottom: 1px solid var(--border); margin-bottom: .2rem; padding-bottom: .4rem; }
.mp-troco-row span:last-child { font-size: 1.15rem; }

/* Footer */
.modal-pgto-footer {
    display: flex; gap: .5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #fff;
}
.btn-pgto-cancelar {
    flex: 0 0 auto;
    background: var(--bg); border: 1.5px solid var(--border); color: var(--muted);
    border-radius: var(--radius-sm); padding: .65rem 1rem;
    font-weight: 600; font-size: .875rem; cursor: pointer;
    transition: all .15s;
}
.btn-pgto-cancelar:hover { background: #e2e8f0; }
.btn-pgto-confirmar {
    flex: 1;
    background: var(--success); border: none; color: #fff;
    border-radius: var(--radius-sm); padding: .7rem;
    font-size: 1rem; font-weight: 800; cursor: pointer;
    transition: all .15s; display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn-pgto-confirmar:hover:not(:disabled) { background: var(--success-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-pgto-confirmar:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }

/* Modal de quantidade */
.modal-content { border: none; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--border); }
.modal-footer { border-top: 1px solid var(--border); }

/* ================================================================
   PRODUTOS — upload de imagem
   ================================================================ */
.img-preview-wrap {
    position: relative;
    display: inline-block;
}
.img-preview {
    width: 100px; height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid var(--border);
    display: block;
}
.img-preview-placeholder {
    width: 100px; height: 100px;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    background: var(--bg);
    gap: .25rem;
}
.img-preview-placeholder:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59,130,246,.04);
}
.img-preview-placeholder i { font-size: 1.5rem; }

/* ================================================================
   PÁGINAS INTERNAS — container
   ================================================================ */
.page-container { padding: 1.25rem; flex: 1; }

/* ================================================================
   RESPONSIVO
   ================================================================ */
@media (max-width: 992px) {
    .pdv-main { flex-direction: column-reverse; }
    .pdv-cart-panel { width: 100%; height: 50vh; border-right: none; border-top: 2px solid var(--border); }
    .pdv-products-panel { flex: 1; }
    .pdv-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
