/* ═══════════════════════════════════════════════════════════
   PDV — Point of Sale Styles
   Operational-first design: clarity > aesthetics
   ═══════════════════════════════════════════════════════════ */

.pdv-sale-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background: var(--surface-primary, #0f1117);
    color: var(--text-primary, #e4e4e7);
    font-family: 'Inter', system-ui, sans-serif;
    position: relative;
}

/* ── Top Bar ─────────────────────────────────────────────── */

.pdv-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--surface-secondary, #1a1d28);
    border-bottom: 1px solid var(--border-subtle, #2a2d38);
    flex-shrink: 0;
    z-index: 10;
}

.pdv-topbar-left, .pdv-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pdv-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.pdv-btn-back:hover {
    background: var(--surface-primary, #0f1117);
    color: var(--text-primary, #e4e4e7);
    border-color: var(--text-tertiary, #71717a);
}

.pdv-session-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #a1a1aa);
}

.pdv-session-badge--closed {
    color: var(--text-disabled, #52525b);
}

.pdv-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pdv-dot--open {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
    animation: pdv-pulse 2s infinite;
}
.pdv-dot--closed { background: #71717a; }

@keyframes pdv-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pdv-status-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}
.pdv-status-pill--online { background: rgba(34,197,94,0.15); color: #4ade80; }
.pdv-status-pill--offline { background: rgba(239,68,68,0.15); color: #f87171; }
.pdv-status-pill--syncing { background: rgba(59,130,246,0.15); color: #60a5fa; }

.pdv-queue-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(251,146,60,0.15);
    color: #fb923c;
    cursor: pointer;
    transition: background 0.2s;
}
.pdv-queue-badge:hover { background: rgba(251,146,60,0.25); }

/* ── No Session Guard ────────────────────────────────────── */

.pdv-no-session {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 1rem;
    text-align: center;
    padding: 2rem;
}
.pdv-no-session-icon { font-size: 3rem; }
.pdv-no-session h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pdv-no-session p { color: var(--text-tertiary, #71717a); }

/* ── Loading ─────────────────────────────────────────────── */

.pdv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 1rem;
    color: var(--text-tertiary);
}

/* ── Main Layout ─────────────────────────────────────────── */

.pdv-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pdv-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.5rem;
    overflow-y: auto;
    min-width: 0;
}

.pdv-right {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-subtle, #2a2d38);
    background: var(--surface-secondary, #1a1d28);
    position: relative;
}

/* ── Search ──────────────────────────────────────────────── */

.pdv-search-box {
    position: relative;
    flex-shrink: 0;
}

.pdv-search-input {
    width: 100%;
    padding: 0.875rem 3.5rem 0.875rem 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-default, #3f3f46);
    border-radius: 0.75rem;
    background: var(--surface-primary, #0f1117);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}
.pdv-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.pdv-search-input::placeholder { color: var(--text-disabled, #52525b); }

.pdv-search-spinner {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-default);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: pdv-spin 0.6s linear infinite;
}

.pdv-kbd {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: var(--surface-secondary, #1a1d28);
    border: 1px solid var(--border-default, #3f3f46);
    color: var(--text-disabled);
    font-family: monospace;
}

/* ── Search Results ──────────────────────────────────────── */

.pdv-results {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle, #2a2d38);
    border-radius: 0.5rem;
    background: var(--surface-secondary, #1a1d28);
}

.pdv-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    transition: background 0.1s;
}
.pdv-result-item:hover,
.pdv-result-item--selected {
    background: rgba(59, 130, 246, 0.1);
}

.pdv-result-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pdv-result-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdv-result-ean { font-size: 0.7rem; color: var(--text-disabled); font-family: monospace; }
.pdv-result-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.pdv-result-price { font-size: 0.9rem; font-weight: 700; color: #4ade80; }
.pdv-result-stock { font-size: 0.7rem; color: var(--text-tertiary); }
.pdv-result-stock--low { color: #f87171; }

.pdv-results-empty {
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-disabled);
}

/* ── Cart ────────────────────────────────────────────────── */

.pdv-cart {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pdv-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.pdv-cart-header h3 { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

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

.pdv-cart-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle, #2a2d38);
}

.pdv-cart-item-info {
    flex: 1;
    min-width: 0;
}
.pdv-cart-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdv-cart-item-unit { font-size: 0.7rem; color: var(--text-disabled); }

.pdv-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pdv-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    background: var(--surface-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.1s;
}
.pdv-qty-btn:hover { background: var(--surface-secondary); }
.pdv-qty-btn:disabled { opacity: 0.3; cursor: default; }

.pdv-qty-input {
    width: 48px;
    text-align: center;
    padding: 0.25rem;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    background: var(--surface-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    -moz-appearance: textfield;
    appearance: textfield;
}
.pdv-qty-input::-webkit-inner-spin-button,
.pdv-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pdv-cart-item-total {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
    text-align: right;
}

.pdv-cart-item-remove {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-disabled);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.pdv-cart-item-remove:hover { background: rgba(239,68,68,0.15); color: #f87171; }
.pdv-cart-item-remove:disabled { opacity: 0.3; cursor: default; }

/* ── Right Panel: Totals + Payment ───────────────────────── */

.pdv-totals {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.pdv-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pdv-total-row--grand {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--border-default);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.pdv-text-green { color: #4ade80; }

/* ── Payment Section ─────────────────────────────────────── */

.pdv-payment {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.pdv-payment-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.pdv-payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.pdv-pay-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-default, #3f3f46);
    border-radius: 0.75rem;
    background: var(--surface-primary, #0f1117);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.8rem;
    font-weight: 600;
}
.pdv-pay-btn:hover { border-color: var(--text-tertiary); }
.pdv-pay-btn--active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}
.pdv-pay-btn:disabled { opacity: 0.3; cursor: default; }
.pdv-pay-icon { font-size: 1.5rem; }

.pdv-cash-input, .pdv-fiado-input {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.pdv-cash-input label, .pdv-fiado-input label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.pdv-money-input, .pdv-text-input {
    padding: 0.625rem 0.75rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-default);
    border-radius: 0.5rem;
    background: var(--surface-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}
.pdv-money-input:focus, .pdv-text-input:focus { border-color: #3b82f6; }

.pdv-troco {
    font-size: 1rem;
    font-weight: 700;
    color: #4ade80;
    padding: 0.25rem 0;
}
.pdv-troco--error { color: #f87171; font-size: 0.85rem; }

.pdv-payment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ── Observação do Atendimento ──────────────────────────── */

.pdv-obs-field {
    padding: 0 1rem;
    margin-top: 8px;
}

.pdv-obs-input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 6px 10px;
    resize: none;
    transition: border-color 0.2s;
    font-family: inherit;
    line-height: 1.4;
    overflow: hidden;
}

.pdv-obs-input::placeholder {
    color: var(--text-secondary, rgba(255,255,255,0.35));
    font-size: 0.82rem;
}

.pdv-obs-input:focus {
    outline: none;
    border-color: var(--accent-primary, #3b82f6);
    overflow: auto;
}

.pdv-obs-filled .pdv-obs-input {
    border-left: 2px solid var(--accent-primary, #3b82f6);
    padding-left: 9px;
}

/* ── Open Payment Button ─────────────────────────────────── */

.pdv-open-payment {
    padding: 1rem;
    margin-top: auto;
}

/* ── Payment Modal ───────────────────────────────────────── */

.pdv-pay-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pdv-fade-in 0.15s ease-out;
}

@keyframes pdv-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pdv-pay-modal {
    background: var(--surface-primary, #18181b);
    border: 1px solid var(--border-subtle, #27272a);
    border-radius: 1.25rem;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: pdv-modal-slide-up 0.2s ease-out;
}

@keyframes pdv-modal-slide-up {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pdv-pay-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0;
}

.pdv-pay-modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary, #71717a);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.15s;
}
.pdv-pay-modal-close:hover {
    background: var(--surface-secondary, #27272a);
    color: var(--text-primary, #fafafa);
}

/* ── Total ── */
.pdv-pay-modal-total {
    text-align: center;
    padding: 1rem 1.25rem 0.75rem;
}
.pdv-pay-modal-total h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary, #fafafa);
    letter-spacing: -0.01em;
    margin: 0;
}
.pdv-pay-modal-discount-btn {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: color 0.15s;
}
.pdv-pay-modal-discount-btn:hover { color: #0ea5e9; }

.pdv-pay-modal-discount-active {
    font-size: 0.85rem;
    color: #4ade80;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.pdv-pay-modal-discount-remove {
    background: none;
    border: none;
    color: #f87171;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

/* ── Methods List ── */
.pdv-pay-modal-methods {
    padding: 0.5rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.pdv-pay-modal-method {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border: 2px solid transparent;
    border-bottom: 1px solid var(--border-subtle, #27272a);
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 0;
}
.pdv-pay-modal-method:first-child {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    border-top: 2px solid transparent;
}
.pdv-pay-modal-method:last-child {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    border-bottom: 2px solid transparent;
}
.pdv-pay-modal-method:hover {
    background: var(--surface-secondary, #27272a);
}
.pdv-pay-modal-method--active {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.06);
}

.pdv-pay-modal-method-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pdv-pay-modal-method-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-secondary, #27272a);
    border-radius: 0.5rem;
    flex-shrink: 0;
}
.pdv-pay-modal-method-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #fafafa);
}

.pdv-pay-modal-method-input {
    flex-shrink: 0;
}
.pdv-pay-modal-value-input {
    width: 110px;
    padding: 0.5rem 0.625rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #3b82f6;
    border-radius: 0.5rem;
    background: var(--surface-primary, #18181b);
    color: var(--text-primary, #fafafa);
    outline: none;
    text-align: right;
    transition: border-color 0.2s;
}
.pdv-pay-modal-value-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pdv-pay-modal-method-check {
    flex-shrink: 0;
}
.pdv-pay-modal-check-icon {
    font-size: 0.75rem;
    color: #3b82f6;
}

/* ── Troco ── */
/* ── Installments (parcelas) ── */
.pdv-pay-modal-parcelas {
    padding: 0.5rem 1.25rem;
    border-top: 1px solid var(--border-subtle, #27272a);
}
.pdv-pay-modal-parcelas-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary, #71717a);
    margin-bottom: 0.35rem;
}
.pdv-pay-modal-parcelas-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pdv-pay-modal-parcelas-select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-default, #3f3f46);
    background: var(--surface-secondary, #18181b);
    color: var(--text-primary, #fafafa);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}
.pdv-pay-modal-parcelas-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.pdv-pay-modal-parcelas-hint {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary, #71717a);
    white-space: nowrap;
}

.pdv-pay-modal-troco {
    padding: 0.25rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #4ade80;
    text-align: center;
}
.pdv-pay-modal-troco--error {
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Bottom Options ── */
.pdv-pay-modal-bottom-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-subtle, #27272a);
    margin-top: 0.5rem;
}

.pdv-pay-modal-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-tertiary, #a1a1aa);
    cursor: pointer;
    user-select: none;
}
.pdv-pay-modal-checkbox input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* ── Fiado ── */
.pdv-pay-modal-fiado {
    padding: 0.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pdv-pay-modal-input {
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    border: 2px solid var(--border-default, #3f3f46);
    border-radius: 0.5rem;
    background: var(--surface-primary, #18181b);
    color: var(--text-primary, #fafafa);
    outline: none;
    transition: border-color 0.2s;
}
.pdv-pay-modal-input:focus {
    border-color: #3b82f6;
}
.pdv-pay-modal-input::placeholder {
    color: var(--text-disabled, #52525b);
}

/* ── Action Button ── */
.pdv-pay-modal-action {
    margin: 0.75rem 1.25rem 1.25rem;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 0.75rem;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.pdv-pay-modal-action:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.pdv-pay-modal-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Fiado Right Section ── */
.pdv-pay-modal-fiado-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pdv-pay-modal-fiado-valor {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f87171;
}

/* ── Selected Client Display ── */
.pdv-pay-modal-cliente-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    margin: 0 1.25rem;
    border-radius: 0.75rem;
    background: var(--surface-secondary, #27272a);
    border: 1px solid var(--border-subtle, #3f3f46);
}
.pdv-pay-modal-cliente-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pdv-pay-modal-cliente-icon {
    font-size: 1.25rem;
}
.pdv-pay-modal-cliente-nome {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
}
.pdv-pay-modal-cliente-doc {
    font-size: 0.75rem;
    color: var(--text-tertiary, #71717a);
}
.pdv-pay-modal-cliente-change {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: color 0.15s;
}
.pdv-pay-modal-cliente-change:hover { color: #0ea5e9; }

/* ── Client Selector (Table-style, for Fiado) ── */
.pdv-cliente-selector {
    width: 90%;
    max-width: 720px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: var(--surface-primary, #18181b);
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    animation: pdv-pay-slide-up 0.2s ease-out;
    overflow: auto;
}
.pdv-cliente-selector-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle, #27272a);
    flex-shrink: 0;
}
.pdv-cliente-selector-search-wrap {
    flex: 1;
}
.pdv-cliente-selector-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 0.5rem;
    background: var(--surface-secondary, #27272a);
    color: var(--text-primary, #fafafa);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.pdv-cliente-selector-search:focus {
    border-color: #3b82f6;
}
.pdv-cliente-selector-search::placeholder {
    color: var(--text-disabled, #52525b);
}
.pdv-cliente-selector-btns {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.pdv-cliente-selector-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.pdv-cliente-selector-btn--ok {
    background: #3b82f6;
    color: white;
    border: none;
}
.pdv-cliente-selector-btn--ok:hover:not(:disabled) {
    background: #2563eb;
}
.pdv-cliente-selector-btn--ok:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pdv-cliente-selector-btn--cancel {
    background: var(--surface-secondary, #27272a);
    color: var(--text-secondary, #a1a1aa);
    border: 1px solid var(--border-default, #3f3f46);
}
.pdv-cliente-selector-btn--cancel:hover {
    background: var(--surface-tertiary, #3f3f46);
}
.pdv-cliente-selector-error {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #f87171;
    flex-shrink: 0;
}
.pdv-cliente-selector-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-tertiary, #71717a);
    font-size: 0.85rem;
}
.pdv-cliente-selector-table-wrap {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.pdv-cliente-selector-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.pdv-cliente-selector-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}
.pdv-cliente-selector-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary, #71717a);
    background: var(--surface-secondary, #27272a);
    border-bottom: 1px solid var(--border-subtle, #3f3f46);
    white-space: nowrap;
}
.pdv-cliente-selector-table tbody tr {
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border-subtle, #27272a);
}
.pdv-cliente-selector-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}
.pdv-cliente-selector-row--selected {
    background: rgba(59, 130, 246, 0.15) !important;
}
.pdv-cliente-selector-row--selected td {
    color: #93c5fd !important;
}
.pdv-cliente-selector-table td {
    padding: 0.6rem 0.75rem;
    color: var(--text-primary, #fafafa);
    white-space: nowrap;
}
.pdv-cliente-selector-td-nome {
    font-weight: 600;
    min-width: 160px;
}
.pdv-cliente-selector-td-debito {
    color: #f87171 !important;
    font-weight: 600;
}
.pdv-cliente-selector-td-limite {
    color: #94a3b8 !important;
    font-weight: 600;
}
.pdv-cliente-selector-empty {
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
    color: var(--text-disabled, #52525b);
}

/* ── Blocked Row ── */
.pdv-cliente-selector-row--blocked {
    opacity: 0.45;
    cursor: not-allowed !important;
}
.pdv-cliente-selector-row--blocked:hover {
    background: transparent !important;
}

/* ── Status Badges ── */
.pdv-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.pdv-badge--blocked {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.pdv-badge--inactive {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.pdv-badge--ok {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

/* ── Permitir Fiado Toggle ── */
.pdv-cliente-novo-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary, #fafafa);
}
.pdv-cliente-novo-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* ── Novo Cliente Inline Form ── */
.pdv-cliente-selector-btn--novo {
    background: var(--surface-secondary, #27272a);
    color: #38bdf8;
    border: 1px solid #38bdf8;
}
.pdv-cliente-selector-btn--novo:hover {
    background: rgba(56, 189, 248, 0.1);
}
.pdv-cliente-selector-btn--active {
    background: rgba(56, 189, 248, 0.15) !important;
}
.pdv-cliente-novo-form {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pdv-cliente-novo-row {
    display: flex;
    gap: 0.75rem;
}
.pdv-cliente-novo-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.pdv-cliente-novo-field--wide {
    flex: 2;
}
.pdv-cliente-novo-field label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary, #71717a);
}
.pdv-cliente-novo-field input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 0.5rem;
    background: var(--surface-secondary, #27272a);
    color: var(--text-primary, #fafafa);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.pdv-cliente-novo-field input:focus {
    border-color: #3b82f6;
}
.pdv-cliente-novo-field input::placeholder {
    color: var(--text-disabled, #52525b);
}
.pdv-cliente-novo-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

/* ── Buttons ─────────────────────────────────────────────── */

.pdv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    white-space: nowrap;
}
.pdv-btn--sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.pdv-btn--lg { padding: 0.875rem 1.5rem; font-size: 1rem; width: 100%; }
.pdv-btn--primary { background: #3b82f6; color: white; }
.pdv-btn--primary:hover { background: #2563eb; }
.pdv-btn--primary:disabled { opacity: 0.4; cursor: default; }
.pdv-btn--success { background: #22c55e; color: white; }
.pdv-btn--success:hover { background: #16a34a; }
.pdv-btn--success:disabled { opacity: 0.4; cursor: default; }
.pdv-btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}
.pdv-btn--ghost:hover { background: var(--surface-secondary); }
.pdv-btn--ghost:disabled { opacity: 0.4; cursor: default; }

/* ── Processing Overlay ──────────────────────────────────── */

.pdv-process-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 50;
}

.pdv-process-card {
    padding: 2rem;
    text-align: center;
}

.pdv-process-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.pdv-process-icon p { margin: 0; font-size: 1rem; font-weight: 600; }
.pdv-process-detail { font-size: 0.85rem; font-weight: 400; color: var(--text-tertiary); }

.pdv-check-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    animation: pdv-pop 0.3s ease-out;
}

.pdv-error-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.pdv-offline-icon { font-size: 2.5rem; }

@keyframes pdv-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Spinner ─────────────────────────────────────────────── */

.pdv-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-default, #3f3f46);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: pdv-spin 0.6s linear infinite;
}
.pdv-spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.pdv-spinner--lg { width: 48px; height: 48px; border-width: 4px; }

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

/* ── Keyboard Shortcuts Bar ──────────────────────────────── */

.pdv-shortcuts {
    flex-shrink: 0;
    padding: 0.35rem 1rem;
    background: var(--surface-secondary, #1a1d28);
    border-top: 1px solid var(--border-subtle);
    font-size: 0.7rem;
    color: var(--text-disabled);
    text-align: center;
}
.pdv-shortcuts kbd {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    font-family: monospace;
    font-weight: 700;
    margin-right: 0.2rem;
}

/* ── Pedido Dock ────────────────────────────────────────── */

.pdv-pedido-dock {
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle, #2a2d38);
    background: var(--surface-secondary, #1a1d28);
    max-height: 200px;
    overflow-y: auto;
}

.pdv-pedido-dock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    background: var(--surface-secondary, #1a1d28);
    z-index: 1;
}

.pdv-pedido-dock-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary, #a1a1aa);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pdv-pedido-dock-list {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 0.75rem;
    overflow-x: auto;
}

.pdv-pedido-card {
    flex-shrink: 0;
    width: 200px;
    padding: 0.625rem;
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 0.625rem;
    background: var(--surface-primary, #0f1117);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: border-color 0.15s;
}
.pdv-pedido-card:hover {
    border-color: var(--text-tertiary, #71717a);
}
.pdv-pedido-card--active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.pdv-pedido-card-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pdv-pedido-card-num {
    font-size: 0.75rem;
    font-weight: 800;
    color: #60a5fa;
}
.pdv-pedido-card-id {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary, #e4e4e7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.pdv-pedido-card-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.pdv-badge--estacionado { background: rgba(251,146,60,0.15); color: #fb923c; }
.pdv-badge--aberto { background: rgba(34,197,94,0.15); color: #4ade80; }
.pdv-badge--em_pagamento { background: rgba(59,130,246,0.15); color: #60a5fa; }

.pdv-pedido-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-tertiary, #71717a);
}

.pdv-pedido-card-obs {
    font-size: 0.65rem;
    color: var(--text-disabled, #52525b);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdv-pedido-card-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

/* ── Active Pedido Bar ───────────────────────────────────── */

.pdv-active-pedido-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
}
.pdv-active-pedido-bar span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #60a5fa;
}

/* ── Responsive ──────────────────────────────────────────── */

/* Novo Pedido Modal label */
.pdv-pedido-modal-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary, #a1a1aa);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

/* Pedido card client name */
.pdv-pedido-card-client {
    font-size: 0.75rem;
    color: var(--text-secondary, #a1a1aa);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}
/* ── Autocomplete dropdown ────────────────────────────────── */

.pdv-autocomplete-dropdown {
    margin-top: 2px;
    z-index: 300;
    background: var(--surface-primary, #18181b);
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Result item — card-style, taller for readability */
.pdv-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid var(--border-subtle, #27272a);
}
.pdv-autocomplete-item:last-child { border-bottom: none; }
.pdv-autocomplete-item:hover,
.pdv-autocomplete-item--active {
    background: rgba(59,130,246,0.14);
}

/* Name — prominent, never truncated */
.pdv-autocomplete-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
/* Details line — phone, doc, code */
.pdv-autocomplete-details {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pdv-autocomplete-code {
    background: rgba(59,130,246,0.1);
    color: #60a5fa;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Loading state */
.pdv-autocomplete-item--loading {
    justify-content: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    cursor: default;
}

/* Empty state — bigger block with centered message + CTA */
.pdv-autocomplete-empty-block {
    padding: 16px 14px;
    text-align: center;
}
.pdv-autocomplete-empty-msg {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

/* Prominent CTA button — blue, full-width, impossible to miss */
.pdv-autocomplete-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s;
}
.pdv-autocomplete-cta-btn:hover { background: #1d4ed8; }
.pdv-autocomplete-cta-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* CTA row in dropdown when results exist */
.pdv-autocomplete-item--cta {
    color: #3b82f6;
    font-size: 0.82rem;
    border-top: 1px solid var(--border-default, #3f3f46);
    gap: 6px;
}
.pdv-autocomplete-item--cta:hover { background: rgba(59,130,246,0.08); }

/* Persistent "+ Novo cliente" link next to label */
.pdv-autocomplete-novo-link {
    background: none;
    border: 1px solid rgba(59,130,246,0.3);
    color: #60a5fa;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.pdv-autocomplete-novo-link:hover {
    background: rgba(59,130,246,0.1);
    border-color: #3b82f6;
}

/* Cancel button (secondary) */
.pdv-autocomplete-cancel-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
}
.pdv-autocomplete-cancel-btn:hover {
    background: var(--surface-secondary, #27272a);
    color: var(--text-primary);
}

/* Selected client chip */
.pdv-autocomplete-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface-secondary, #27272a);
    border: 1px solid var(--border-default, #3f3f46);
    border-radius: 8px;
}
.pdv-autocomplete-chip-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.pdv-autocomplete-chip-remove:hover { color: var(--danger, #ef4444); }

/* Inline quick registration */
.pdv-autocomplete-cadastro {
    margin-top: 10px;
    padding: 16px;
    background: var(--surface-secondary, #27272a);
    border: 1px solid var(--accent-primary, #3b82f6);
    border-radius: 8px;
}
.pdv-autocomplete-cadastro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
@media (max-width: 600px) {
    .pdv-autocomplete-cadastro-grid { grid-template-columns: 1fr; }
}


@media (max-width: 768px) {
    .pdv-main { flex-direction: column; }
    .pdv-right { width: 100%; border-left: none; border-top: 1px solid var(--border-subtle); }
    .pdv-total-row--grand { font-size: 1.25rem; }
    .pdv-pedido-dock-list { flex-wrap: nowrap; }
    .pdv-pedido-card { width: 160px; }
}

/* ═══════════════════════════════════════════════════════════
   RECENTES BUTTON + BADGE
   ═══════════════════════════════════════════════════════════ */

.pdv-btn-recentes {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #a1a1aa);
    background: var(--surface-secondary, #1a1d28);
    border: 1px solid var(--border-default, #3a3d48);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pdv-btn-recentes:hover {
    background: var(--surface-primary, #0f1117);
    color: var(--text-primary, #e4e4e7);
    border-color: var(--border-active, #5a5d68);
}
.pdv-recentes-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #fff;
    background: #3b82f6;
    border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════════
   DRAWER OVERLAY + PANEL
   ═══════════════════════════════════════════════════════════ */

.pdv-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    animation: pdv-fadeIn 0.15s ease;
}
.pdv-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--surface-primary, #0f1117);
    border-left: 1px solid var(--border-subtle, #2a2d38);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    animation: pdv-slideInRight 0.2s ease;
}
.pdv-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle, #2a2d38);
}
.pdv-drawer__header h3 {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0;
}
.pdv-drawer__close {
    background: none;
    border: none;
    color: var(--text-tertiary, #71717a);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.15s;
}
.pdv-drawer__close:hover {
    color: var(--text-primary, #e4e4e7);
}
.pdv-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}
.pdv-drawer__loading,
.pdv-drawer__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: var(--text-disabled, #52525b);
    font-size: 0.8rem;
}
.pdv-drawer__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pdv-drawer__item {
    background: var(--surface-secondary, #1a1d28);
    border: 1px solid var(--border-subtle, #2a2d38);
    border-radius: 0.5rem;
    padding: 0.7rem 0.8rem;
}
.pdv-drawer__item--cancelled {
    opacity: 0.65;
    border-color: rgba(239, 68, 68, 0.25);
}
.pdv-drawer__item-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}
.pdv-drawer__item-id {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-primary);
}
.pdv-drawer__item-time {
    font-size: 0.7rem;
    color: var(--text-disabled, #52525b);
    font-family: 'Fira Mono', monospace;
}
.pdv-drawer__item-mid {
    display: flex;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}
.pdv-drawer__item-client {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-bottom: 0.3rem;
}
.pdv-drawer__item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.3rem;
}
.pdv-drawer__item-reason {
    font-size: 0.65rem;
    color: var(--text-disabled);
    font-style: italic;
}
.pdv-drawer__item-motivo {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
    font-style: italic;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════
   STATUS BADGES (shared)
   ═══════════════════════════════════════════════════════════ */

.pdv-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.pdv-badge--success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.pdv-badge--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.pdv-badge--warning {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

/* ═══════════════════════════════════════════════════════════
   SHARED BUTTONS
   ═══════════════════════════════════════════════════════════ */

.pdv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pdv-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pdv-btn--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.pdv-btn--danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
}
.pdv-btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}
.pdv-btn--ghost:hover:not(:disabled) {
    background: var(--surface-secondary);
}
.pdv-btn--sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.675rem;
}

/* ═══════════════════════════════════════════════════════════
   CANCEL MODAL
   ═══════════════════════════════════════════════════════════ */

.pdv-cancel-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pdv-fadeIn 0.15s ease;
}
.pdv-cancel-modal {
    background: var(--surface-primary, #0f1117);
    border: 1px solid var(--border-subtle, #2a2d38);
    border-radius: 0.75rem;
    width: 440px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    animation: pdv-slideUp 0.2s ease;
}
.pdv-cancel-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}
.pdv-cancel-modal__header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
}
.pdv-cancel-modal__close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
}
.pdv-cancel-modal__body {
    padding: 1.25rem;
}
.pdv-cancel-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

/* Cancel summary */
.pdv-cancel-summary {
    background: var(--surface-secondary, #1a1d28);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}
.pdv-cancel-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.75rem;
}
.pdv-cancel-summary__row span:first-child {
    color: var(--text-tertiary);
}
.pdv-cancel-summary__row strong {
    color: var(--text-primary);
}

/* Cancel impact */
.pdv-cancel-impact {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}
.pdv-cancel-impact__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #facc15;
    margin-bottom: 0.4rem;
}
.pdv-cancel-impact ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Cancel motivo */
.pdv-cancel-motivo {
    margin-bottom: 0.5rem;
}
.pdv-cancel-motivo label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.pdv-cancel-motivo .required {
    color: #f87171;
}
.pdv-cancel-motivo textarea {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.8rem;
    background: var(--surface-secondary, #1a1d28);
    border: 1px solid var(--border-default, #3a3d48);
    border-radius: 0.375rem;
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
}
.pdv-cancel-motivo textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   SESSION SALES (Collapsible — CashierView)
   ═══════════════════════════════════════════════════════════ */

.pdv-session-sales {
    background: var(--surface-primary, #0f1117);
    border: 1px solid var(--border-subtle, #2a2d38);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 0.5rem;
}
.pdv-session-sales__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.pdv-session-sales__header:hover {
    background: var(--surface-secondary, #1a1d28);
}
.pdv-session-sales__chevron {
    font-size: 0.7rem;
    color: var(--text-disabled);
}
.pdv-session-sales__body {
    border-top: 1px solid var(--border-subtle);
    max-height: 360px;
    overflow-y: auto;
}
.pdv-session-sales__loading,
.pdv-session-sales__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-size: 0.8rem;
    color: var(--text-disabled);
}
.pdv-session-sales__table {
    width: 100%;
    font-size: 0.75rem;
    border-collapse: collapse;
}
.pdv-session-sales__table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-disabled);
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--border-subtle);
}
.pdv-session-sales__table td {
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
.pdv-row--cancelled td {
    opacity: 0.55;
}
.pdv-text-muted {
    color: var(--text-disabled);
    font-size: 0.7rem;
}

/* Inline spinner */
.pdv-spinner-inline {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pdv-spin 0.6s linear infinite;
}

/* ── Animations ──────────────────────────────────────────── */

@keyframes pdv-fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes pdv-slideInRight {
    from { transform: translateX(100%); } to { transform: translateX(0); }
}
@keyframes pdv-slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes pdv-spin {
    to { transform: rotate(360deg); }
}
