/* =========================================================
   E3R's GESTÃO CLOUD
   MÓDULO: PDV
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0789ed;
    --primary-hover: #0578d2;
    --dark: #07101d;
    --text: #172033;
    --muted: #64748b;
    --background: #f3f6fa;
    --border: #dce3ed;
    --success: #22c55e;
    --danger: #dc2626;
    --white: #ffffff;
}

body {
    min-height: 100vh;
    overflow: hidden;

    background: var(--background);
    color: var(--text);

    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   TOPO
   ========================================================= */

.topbar {
    position: relative;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 70px;
    padding: 0 28px;

    background: var(--dark);
    color: var(--white);

    box-shadow: 0 3px 15px rgba(2, 8, 23, 0.2);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-text strong {
    color: #1598ff;
    font-size: 28px;
}

.brand-text span {
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 2px;
}

.back-dashboard-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;

    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;

    font-size: 20px;

    transition: 0.15s;
}

.back-dashboard-button:hover {
    border-color: #1598ff;
    background: rgba(21, 152, 255, 0.15);
}

.cashier-status {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #cbd5e1;
    font-size: 13px;
}

.status-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--success);

    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}


/* =========================================================
   LAYOUT
   ========================================================= */

.pdv-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 470px;

    height: calc(100vh - 70px);
}

.products-panel {
    overflow-y: auto;

    padding: 30px;
}

.sale-panel {
    display: flex;
    flex-direction: column;

    min-width: 0;
    height: 100%;

    background: #ffffff;

    border-left: 1px solid #dde5ef;

    box-shadow: -5px 0 20px rgba(15, 23, 42, 0.04);
}


/* =========================================================
   CABEÇALHO DOS PAINÉIS
   ========================================================= */

.panel-header,
.sale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.panel-header {
    margin-bottom: 22px;
}

.sale-header {
    padding: 24px 22px;

    border-bottom: 1px solid #edf1f5;
}

.eyebrow {
    color: #168cf5;

    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

h1 {
    margin-top: 5px;

    font-size: 30px;
}

h2 {
    margin-top: 5px;

    font-size: 19px;
}

.sale-header>span {
    padding: 6px 10px;

    border-radius: 20px;

    background: #eef5fc;
    color: #53708e;

    font-size: 12px;
    font-weight: bold;
}


/* =========================================================
   BOTÕES
   ========================================================= */

.primary-button,
.secondary-button {
    padding: 12px 18px;

    border: 0;
    border-radius: 8px;

    font-weight: bold;

    transition: 0.15s;
}

.primary-button {
    background: var(--primary);
    color: #ffffff;
}

.primary-button:hover {
    background: var(--primary-hover);
}

.secondary-button {
    border: 1px solid var(--border);

    background: #ffffff;
    color: #334155;
}

.secondary-button:hover {
    background: #f8fafc;
}


/* =========================================================
   PESQUISA DE PRODUTOS
   ========================================================= */

.search-area {
    display: flex;
    align-items: center;

    height: 60px;
    padding: 0 18px;

    border: 2px solid #d9e2ec;
    border-radius: 10px;

    background: #ffffff;

    transition: 0.15s;
}

.search-area:focus-within {
    border-color: #168cf5;

    box-shadow: 0 0 0 4px rgba(22, 140, 245, 0.08);
}

.search-area>span {
    font-size: 20px;
}

.search-area input {
    width: 100%;
    height: 100%;
    padding: 0 14px;

    border: 0;
    outline: none;

    background: transparent;
    color: var(--text);

    font-size: 15px;
}

.search-area input::placeholder {
    color: #94a3b8;
}


/* =========================================================
   RESULTADOS DOS PRODUTOS
   ========================================================= */

.product-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;

    margin-top: 20px;
}

.product-result,
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 150px;
    padding: 17px;

    border: 1px solid #dce3ed;
    border-radius: 10px;

    background: #ffffff;

    transition: 0.15s;
}

.product-result:hover,
.product-card:hover {
    border-color: #168cf5;

    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.08);

    transform: translateY(-2px);
}

.product-result.disabled,
.product-card.disabled,
.product-result.out-of-stock {
    cursor: not-allowed;
    opacity: 0.55;

    transform: none;
}

.product-result-header,
.product-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 10px;
}

.product-result strong,
.product-card strong {
    color: #172033;

    font-size: 15px;
    line-height: 1.35;
}

.product-code,
.product-result small,
.product-card small {
    color: #64748b;

    font-size: 11px;
}

.product-price {
    margin-top: 15px;

    color: #0789ed;

    font-size: 19px;
    font-weight: bold;
}

.product-stock {
    margin-top: 7px;

    color: #64748b;

    font-size: 11px;
}

.product-stock.low {
    color: #d97706;
}

.product-stock.zero {
    color: #dc2626;
}

.no-results {
    grid-column: 1 / -1;

    padding: 45px 20px;

    border: 1px dashed #cbd5e1;
    border-radius: 10px;

    color: #64748b;

    text-align: center;
}

.quick-info {
    margin-top: 18px;
    padding: 14px 16px;

    border-radius: 8px;

    background: #eaf4fe;
    color: #4c6b89;

    font-size: 12px;
}


/* =========================================================
   CLIENTE
   ========================================================= */

.customer-box {
    margin: 18px 20px 0;
    padding: 15px;

    border: 1px solid #e2e8f0;
    border-radius: 9px;

    background: #f8fafc;
}

.customer-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.customer-title strong {
    font-size: 13px;
}

.customer-title button {
    border: 0;

    background: transparent;
    color: #0789ed;

    font-size: 12px;
    font-weight: bold;
}

.customer-title button:hover {
    text-decoration: underline;
}

.selected-customer {
    margin-top: 8px;

    color: #64748b;

    font-size: 12px;
}


/* =========================================================
   CARRINHO
   ========================================================= */

.cart {
    flex: 1;
    overflow-y: auto;

    min-height: 160px;
    padding: 17px 20px;
}

.empty-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    height: 100%;
    min-height: 190px;

    color: #94a3b8;

    text-align: center;
}

.empty-cart div {
    margin-bottom: 12px;

    font-size: 38px;
}

.empty-cart strong {
    margin-bottom: 6px;

    color: #475569;
}

.empty-cart span {
    font-size: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;

    padding: 14px 0;

    border-bottom: 1px solid #edf1f5;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-info strong {
    display: block;
    overflow: hidden;

    color: #172033;

    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-info span {
    display: block;

    margin-top: 5px;

    color: #64748b;

    font-size: 11px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-top: 10px;
}

.cart-item-controls button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    border: 1px solid #dce3ed;
    border-radius: 6px;

    background: #ffffff;
    color: #334155;

    font-size: 16px;
}

.cart-item-controls button:hover {
    border-color: #0789ed;
    color: #0789ed;
}

.cart-item-controls strong {
    min-width: 25px;

    font-size: 12px;
    text-align: center;
}

.cart-item-total {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    justify-content: space-between;

    gap: 10px;
}

.cart-item-total>strong {
    color: #172033;

    font-size: 13px;
    white-space: nowrap;
}

.remove-item {
    border: 0;

    background: transparent;
    color: #94a3b8;

    font-size: 16px;
}

.remove-item:hover {
    color: #dc2626;
}


/* =========================================================
   TOTAIS
   ========================================================= */

.totals {
    padding: 18px 20px;

    border-top: 1px solid #e2e8f0;

    background: #fbfdff;
}

.totals>div {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 12px;
}

.totals>div:last-child {
    margin-bottom: 0;
}

.totals span {
    color: #64748b;

    font-size: 13px;
}

.totals strong {
    font-size: 14px;
}

.discount-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.discount-input input {
    width: 90px;
    padding: 7px;

    border: 1px solid #dbe3ec;
    border-radius: 5px;

    outline: none;

    text-align: right;
}

.discount-input input:focus {
    border-color: #168cf5;
}

.discount-input span {
    color: #64748b;

    font-size: 12px;
}

.total-line {
    margin-top: 15px;
    padding-top: 15px;

    border-top: 1px solid #e2e8f0;
}

.total-line span {
    color: #172033;

    font-weight: bold;
}

.total-line strong {
    color: #0789ed;

    font-size: 25px;
}


/* =========================================================
   FINALIZAR VENDA
   ========================================================= */

.finish-button {
    margin: 0 20px 20px;
    padding: 17px;

    border: 0;
    border-radius: 9px;

    background: #0789ed;
    color: #ffffff;

    font-size: 15px;
    font-weight: bold;

    transition: 0.15s;
}

.finish-button:hover:not(:disabled) {
    background: #0578d2;

    transform: translateY(-1px);
}

.finish-button:disabled {
    cursor: not-allowed;

    background: #cbd5e1;

    transform: none;
}


/* =========================================================
   MODAIS
   ========================================================= */

.modal {
    position: fixed;
    z-index: 1000;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(2, 8, 23, 0.67);
}

.modal.show {
    display: flex;
}

.modal-content {
    overflow-y: auto;

    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    padding: 28px;

    border-radius: 14px;

    background: #ffffff;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.modal-header h2 {
    margin-top: 5px;
}

.close-button {
    border: 0;

    background: transparent;
    color: #475569;

    font-size: 30px;
    line-height: 1;
}

.close-button:hover {
    color: #dc2626;
}


/* =========================================================
   PAGAMENTO
   ========================================================= */

.payment-total {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 18px;

    border-radius: 10px;

    background: #f5f8fc;
}

.payment-total span {
    color: #64748b;
}

.payment-total strong {
    color: #172033;

    font-size: 25px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

    margin: 20px 0;
}

.payment-method {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;

    min-width: 0;
    padding: 15px 7px;

    border: 1px solid #dce3ed;
    border-radius: 8px;

    background: #ffffff;
    color: #475569;

    transition: 0.15s;
}

.payment-method:hover {
    border-color: #0789ed;
}

.payment-method.active {
    border-color: #0789ed;

    background: #eef7ff;
    color: #0789ed;

    box-shadow: 0 0 0 2px rgba(7, 137, 237, 0.08);
}

.payment-method span:first-child {
    font-size: 20px;
}

.payment-method span:last-child {
    font-size: 12px;
    font-weight: bold;
}


/* =========================================================
   DINHEIRO
   ========================================================= */

.cash-area {
    display: block;
}

.cash-area label,
.installment-area label {
    display: block;

    margin-bottom: 7px;

    color: #172033;

    font-size: 13px;
    font-weight: bold;
}

.cash-area input {
    width: 100%;
    padding: 13px;

    border: 1px solid #dce3ed;
    border-radius: 7px;

    outline: none;

    font-size: 16px;
}

.cash-area input:focus {
    border-color: #0789ed;

    box-shadow: 0 0 0 3px rgba(7, 137, 237, 0.08);
}

.change {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 15px;
}

.change span {
    color: #64748b;

    font-size: 13px;
}

.change strong {
    color: #16a34a;

    font-size: 17px;
}


/* =========================================================
   PARCELAMENTO
   ========================================================= */

.installment-area {
    display: none;

    margin-top: 18px;
    padding: 18px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #f8fafc;
}

.installment-area.show {
    display: block;
}

.installment-area select {
    width: 100%;
    height: 45px;
    padding: 0 12px;

    border: 1px solid #dce3ed;
    border-radius: 7px;

    background: #ffffff;
    color: #172033;

    font-size: 14px;
    outline: none;
}

.installment-area select:focus {
    border-color: #0789ed;

    box-shadow: 0 0 0 3px rgba(7, 137, 237, 0.08);
}

.installment-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 15px;
}

.installment-summary span {
    color: #64748b;

    font-size: 13px;
}

.installment-summary strong {
    color: #0789ed;

    font-size: 16px;
}

.installment-area small {
    display: block;

    margin-top: 10px;

    color: #94a3b8;

    font-size: 11px;
}


/* =========================================================
   AÇÕES DO MODAL
   ========================================================= */

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 25px;
}


/* =========================================================
   MODAL DE CLIENTES
   ========================================================= */

.customer-modal {
    max-width: 620px;
}

.customer-search {
    width: 100%;
    padding: 13px 15px;

    border: 1px solid #dce3ed;
    border-radius: 8px;

    outline: none;

    font-size: 14px;
}

.customer-search:focus {
    border-color: #0789ed;

    box-shadow: 0 0 0 3px rgba(7, 137, 237, 0.08);
}

.customer-list {
    display: flex;
    flex-direction: column;
    gap: 9px;

    max-height: 390px;
    margin-top: 15px;
    overflow-y: auto;
}

.customer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 14px;

    border: 1px solid #e2e8f0;
    border-radius: 8px;

    background: #ffffff;

    transition: 0.15s;
}

.customer-item:hover {
    border-color: #0789ed;

    background: #f5faff;
}

.customer-item-info {
    min-width: 0;
}

.customer-item strong {
    display: block;

    color: #172033;

    font-size: 13px;
}

.customer-item span,
.customer-item small {
    display: block;

    margin-top: 4px;

    color: #64748b;

    font-size: 11px;
}

.customer-item button {
    padding: 8px 12px;

    border: 0;
    border-radius: 6px;

    background: #0789ed;
    color: #ffffff;

    font-size: 11px;
    font-weight: bold;
}

.customer-empty {
    padding: 40px 20px;

    color: #64748b;

    text-align: center;
}


/* =========================================================
   BARRAS DE ROLAGEM
   ========================================================= */

.products-panel::-webkit-scrollbar,
.cart::-webkit-scrollbar,
.customer-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.products-panel::-webkit-scrollbar-thumb,
.cart::-webkit-scrollbar-thumb,
.customer-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background: #cbd5e1;
}

.products-panel::-webkit-scrollbar-track,
.cart::-webkit-scrollbar-track,
.customer-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 1200px) {

    .pdv-container {
        grid-template-columns: minmax(0, 1fr) 410px;
    }

    .product-results {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }
}


@media (max-width: 1000px) {

    body {
        overflow: auto;
    }

    .pdv-container {
        display: block;

        height: auto;
    }

    .products-panel {
        min-height: 500px;
    }

    .sale-panel {
        min-height: 650px;

        border-top: 1px solid #dde5ef;
        border-left: 0;
    }

    .cart {
        min-height: 260px;
    }
}


@media (max-width: 650px) {

    .topbar {
        height: 62px;
        padding: 0 16px;
    }

    .brand-text {
        gap: 7px;
    }

    .brand-text strong {
        font-size: 22px;
    }

    .brand-text span {
        font-size: 9px;
    }

    .cashier-status {
        font-size: 10px;
    }

    .pdv-container {
        min-height: calc(100vh - 62px);
    }

    .products-panel {
        padding: 20px 15px;
    }

    .panel-header {
        align-items: flex-start;
    }

    h1 {
        font-size: 25px;
    }

    .search-area {
        height: 54px;
    }

    .product-results {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal {
        align-items: flex-end;

        padding: 0;
    }

    .modal-content {
        max-height: 92vh;
        padding: 22px 18px;

        border-radius: 16px 16px 0 0;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button {
        width: 100%;
    }

    .installment-summary {
        align-items: flex-start;
        flex-direction: column;

        gap: 5px;
    }
}


@media (max-width: 420px) {

    .cashier-status {
        max-width: 100px;

        text-align: right;
    }

    .panel-header {
        flex-direction: column;
    }

    .panel-header .secondary-button {
        width: 100%;
    }

    .cart-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .cart-item-total {
        align-items: center;
        flex-direction: row;
    }

    .payment-total strong {
        font-size: 21px;
    }
}

/* =========================================================
   ATALHOS DO TECLADO E AUTORIZAÇÃO GERENCIAL
========================================================= */

kbd {
    display: inline-flex;
    min-width: 29px;
    height: 23px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.search-area {
    position: relative;
}

.search-area input {
    padding-right: 66px;
}

.field-shortcut {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

.keyboard-shortcuts {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    color: #64748b;
    font-size: 10px;
}

.keyboard-shortcuts kbd {
    margin-left: 5px;
}

.inline-shortcut {
    min-width: 25px;
    height: 20px;
    margin-left: 5px;
    padding: 0 5px;
    font-size: 9px;
    vertical-align: middle;
}

#selectCustomerButton,
.finish-button,
#confirmPayment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

#selectCustomerButton kbd {
    min-width: 25px;
    height: 20px;
    padding: 0 5px;
    border-color: rgba(37, 99, 235, .25);
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 9px;
}

.finish-button kbd,
#confirmPayment kbd,
#nfceComNotaButton kbd {
    border-color: rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
    box-shadow: none;
}

.manager-modal {
    max-width: 520px;
}

.manager-message {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 24px 0;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
}

.manager-lock {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #dbeafe;
    font-size: 20px;
}

.manager-message strong,
.manager-message p {
    display: block;
}

.manager-message strong {
    color: #0f172a;
    font-size: 13px;
}

.manager-message p {
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

#managerForm {
    padding: 22px 24px 24px;
}

.manager-field {
    margin-bottom: 16px;
}

.manager-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.manager-field input,
.manager-field textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-size: 12px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.manager-field textarea {
    min-height: 88px;
    resize: vertical;
}

.manager-field input:focus,
.manager-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.manager-field input.invalid,
.manager-field textarea.invalid {
    border-color: #dc2626;
    background: #fffafa;
}

.manager-error {
    margin-bottom: 15px;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 11px;
    line-height: 1.45;
}

#managerForm .modal-actions {
    padding: 4px 0 0;
}

.pdv-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 3000;
    max-width: min(390px, calc(100vw - 32px));
    padding: 13px 16px;
    border-radius: 9px;
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .22);
}

.pdv-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pdv-toast.success {
    background: #166534;
}

.pdv-toast.error {
    background: #991b1b;
}

.pdv-toast.warning {
    background: #9a3412;
}

@media (max-width: 760px) {
    .quick-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .keyboard-shortcuts {
        justify-content: flex-start;
    }

    .manager-message {
        margin: 16px 16px 0;
    }

    #managerForm {
        padding: 18px 16px 20px;
    }
}

@media (max-width: 520px) {
    .keyboard-shortcuts {
        display: none;
    }

    .field-shortcut {
        right: 12px;
    }

    .finish-button kbd,
    #confirmPayment kbd {
        height: 20px;
    }
}

/* =========================================================
   TAXA DA MAQUINETA
========================================================= */

.card-fee-area {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #dbe4ef;
    border-radius: 11px;
    background: #f8fafc;
}

.payment-method {
    position: relative;
}

.payment-method kbd {
    position: absolute;
    top: 7px;
    right: 7px;
    min-width: 23px;
    height: 20px;
    padding: 0 5px;
    border-color: #dbe4ef;
    background: #f8fafc;
    color: #475569;
    font-size: 9px;
    box-shadow: none;
}

.payment-method.active kbd {
    border-color: rgba(37, 99, 235, .25);
    background: #dbeafe;
    color: #1d4ed8;
}

.card-fee-area[hidden] {
    display: none !important;
}

.card-fee-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}

.card-fee-heading strong,
.card-fee-heading span {
    display: block;
}

.card-fee-heading strong {
    color: #0f172a;
    font-size: 13px;
}

.card-fee-heading div>span {
    margin-top: 4px;
    color: #64748b;
    font-size: 10px;
}

.card-fee-badge {
    padding: 5px 9px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.card-fee-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(120px, .7fr);
    gap: 13px;
}

.card-fee-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 10px;
    font-weight: 700;
}

.card-fee-field select,
.card-fee-field input {
    width: 100%;
    height: 42px;
    padding: 0 11px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-size: 11px;
}

.card-fee-field select:focus,
.card-fee-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.card-fee-field input:disabled,
.card-fee-field select:disabled {
    cursor: not-allowed;
    background: #eef2f7;
    color: #94a3b8;
}

.percentage-input {
    position: relative;
}

.percentage-input input {
    padding-right: 36px;
}

.percentage-input>span {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}

.card-fee-help {
    margin: 10px 0 15px;
    color: #64748b;
    font-size: 9px;
    line-height: 1.45;
}

.card-fee-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #ffffff;
}

.card-fee-summary>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 12px 13px;
    border-bottom: 1px solid #edf2f7;
}

.card-fee-summary>div:nth-child(odd) {
    border-right: 1px solid #edf2f7;
}

.card-fee-summary>div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.card-fee-summary span {
    color: #64748b;
    font-size: 9px;
}

.card-fee-summary strong {
    color: #0f172a;
    font-size: 11px;
    white-space: nowrap;
}

.card-fee-summary .customer-charge-line strong {
    color: #2563eb;
}

.card-fee-summary .net-payment-line strong {
    color: #15803d;
}

@media (max-width: 650px) {

    .card-fee-grid,
    .card-fee-summary {
        grid-template-columns: 1fr;
    }

    .card-fee-summary>div,
    .card-fee-summary>div:nth-child(odd),
    .card-fee-summary>div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid #edf2f7;
    }

    .card-fee-summary>div:last-child {
        border-bottom: 0;
    }
}

/* Busca rápida de cliente no envio do comprovante */

.receipt-customer-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.receipt-customer-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 137, 237, .12);
}

.receipt-customer-search input {
    width: 100%;
    padding: 12px 0;
    border: 0;
    outline: none;
    font: inherit;
}

.receipt-customer-results {
    max-height: 230px;
    margin-bottom: 14px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.receipt-customer-results[hidden] {
    display: none;
}

.receipt-customer-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    background: #fff;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.receipt-customer-option:last-child {
    border-bottom: 0;
}

.receipt-customer-option:hover,
.receipt-customer-option:focus {
    background: #eff6ff;
    outline: none;
}

.receipt-customer-option strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.receipt-customer-option span {
    color: var(--muted);
    font-size: 12px;
}

.receipt-customer-option small {
    grid-column: 1 / -1;
    color: var(--muted);
}

.receipt-customer-empty {
    padding: 14px;
    color: var(--muted);
    text-align: center;
}

.receipt-customer-results+label {
    margin-top: 12px;
}

/* =========================================================
   COMPROVANTE NÃO FISCAL
   ========================================================= */

.receipt-modal {
    width: min(680px, 96vw);
    max-height: 94vh;
    overflow-y: auto;
}

.receipt-modal-header p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.receipt-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 26px 18px;
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
}

.receipt-alert>span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    font-weight: 800;
}

.receipt-alert p {
    margin-top: 2px;
    font-size: 12px;
}

.receipt-paper {
    width: min(360px, calc(100% - 52px));
    margin: 0 auto 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    color: #111827;
    font-family: "Courier New", monospace;
    font-size: 12px;
}

.receipt-content header {
    padding-bottom: 12px;
    text-align: center;
    border-bottom: 1px dashed #94a3b8;
}

.receipt-content header h3 {
    margin-bottom: 4px;
    font: 800 16px Arial, sans-serif;
}

.receipt-content header p {
    margin-bottom: 6px;
}

.receipt-meta {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px dashed #94a3b8;
}

.receipt-items {
    padding: 4px 0;
}

.receipt-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 9px 0;
    border-bottom: 1px dotted #cbd5e1;
}

.receipt-item div {
    grid-column: 1 / -1;
}

.receipt-item small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
}

.receipt-item>strong {
    text-align: right;
}

.receipt-totals {
    padding: 10px 0;
}

.receipt-totals p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 5px 0;
}

.receipt-grand-total {
    margin: 9px 0 !important;
    padding: 8px 0;
    border-top: 1px dashed #64748b;
    border-bottom: 1px dashed #64748b;
    font-size: 15px;
}

.receipt-offline {
    margin: 8px 0;
    padding: 8px;
    border-radius: 6px;
    background: #fff7ed;
    color: #9a3412;
    text-align: center;
    font-weight: 700;
}

.receipt-content footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #94a3b8;
    text-align: center;
}

.receipt-email-area {
    margin: 0 26px;
}

.receipt-email-area label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.receipt-email-area input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font: inherit;
}

.receipt-email-area input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 137, 237, .12);
}

.receipt-email-area small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.receipt-actions {
    flex-wrap: wrap;
}

.receipt-actions button {
    min-height: 44px;
}

@media (max-width: 600px) {

    .receipt-alert,
    .receipt-email-area {
        margin-left: 16px;
        margin-right: 16px;
    }

    .receipt-paper {
        width: calc(100% - 32px);
    }

    .receipt-actions button {
        width: 100%;
    }
}

/* =========================================================
   OPERAÇÕES DO CAIXA
   ========================================================= */

.cash-operations-modal {
    max-width: 700px;
}

.cash-form-modal {
    max-width: 580px;
}

.cash-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cash-summary-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
}

.cash-summary-card span {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.cash-summary-card strong {
    color: #172033;
    font-size: 20px;
}

.cash-summary-card.sales strong,
.cash-summary-card.supply strong {
    color: #15803d;
}

.cash-summary-card.withdrawal strong {
    color: #dc2626;
}

.cash-expected-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 14px;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
}

.cash-expected-card span,
.cash-expected-card small {
    display: block;
}

.cash-expected-card span {
    color: #1e3a8a;
    font-weight: 800;
}

.cash-expected-card small {
    margin-top: 4px;
    color: #64748b;
}

.cash-expected-card strong {
    white-space: nowrap;
    color: #0789ed;
    font-size: 25px;
}

.cash-operation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.cash-operation-action {
    display: grid;
    grid-template-columns: 38px 1fr;
    grid-template-rows: auto auto;
    column-gap: 11px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #ffffff;
    color: #172033;
    text-align: left;
    cursor: pointer;
}

.cash-operation-action>span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: 800;
}

.cash-operation-action.supply>span {
    background: #dcfce7;
    color: #15803d;
}

.cash-operation-action.withdrawal>span {
    background: #fee2e2;
    color: #dc2626;
}

.cash-operation-action strong {
    align-self: end;
}

.cash-operation-action small {
    color: #64748b;
}

.cash-operation-action:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.cash-main-actions {
    justify-content: space-between;
}

.danger-outline-button,
.danger-button {
    min-height: 43px;
    padding: 0 17px;
    border-radius: 8px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.danger-outline-button {
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
}

.danger-button {
    border: 0;
    background: #dc2626;
    color: #fff;
}

.cash-form-grid {
    display: grid;
    gap: 14px;
}

.cash-form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cash-field {
    margin-bottom: 15px;
}

.cash-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.cash-field input,
.cash-field textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    outline: none;
    color: #172033;
    font: inherit;
}

.cash-field input:focus,
.cash-field textarea:focus {
    border-color: #0789ed;
    box-shadow: 0 0 0 3px rgba(7, 137, 237, 0.09);
}

.cash-close-preview {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 20px;
    margin-bottom: 18px;
    padding: 15px;
    border-radius: 10px;
    background: #f1f5f9;
}

.cash-close-preview span {
    color: #64748b;
}

.cash-close-preview strong {
    color: #172033;
}

#cashDifferencePreview.positive {
    color: #15803d;
}

#cashDifferencePreview.negative {
    color: #dc2626;
}

@media (max-width: 680px) {
    .cashier-status {
        display: none;
    }

    .cash-operations-button {
        font-size: 0;
    }

    .cash-operations-button kbd {
        font-size: 11px;
    }

    .cash-summary-grid,
    .cash-operation-grid,
    .cash-form-grid.two {
        grid-template-columns: 1fr;
    }

    .cash-expected-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

.cashier-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cash-operations-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    color: #f8fafc;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.cash-operations-button:hover {
    border-color: #1598ff;
    background: rgba(21, 152, 255, 0.16);
}

.cash-operations-button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.cash-operations-button kbd {
    padding: 3px 6px;
    border-radius: 5px;
    background: #ffffff;
    color: #0f172a;
    font-size: 11px;
}