:root {
    --bg: #f3efe7;
    --panel: #fffdf9;
    --line: #d8cfbf;
    --text: #2e241d;
    --muted: #6e6257;
    --brand: #8d4f2a;
    --brand-dark: #5c3117;
    --ok: #d9f2e3;
    --ok-text: #21593b;
    --error: #f9d8d4;
    --error-text: #7b241c;
    --pdv-blue: #0d3768;
    --pdv-blue-dark: #0a2951;
    --pdv-blue-soft: #eaf1fb;
    --pdv-line: #c7d6eb;
    --pdv-green: #4f9d38;
    --pdv-green-dark: #3f812d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: linear-gradient(180deg, #e6edf7 0%, #f3f6fb 100%);
    color: var(--text);
    overflow: hidden;
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    padding: 26px 18px;
    background: linear-gradient(180deg, var(--pdv-blue) 0%, var(--pdv-blue-dark) 100%);
    color: #e7effc;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar h1 {
    margin-top: 0;
    font-size: 24px;
    letter-spacing: 0.03em;
    padding: 0 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar a {
    color: #e7effc;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
}

.sidebar a.active,
.sidebar a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.24);
}

.content {
    padding: 24px;
    height: 100vh;
    overflow: hidden;
}

.pdv-body {
    background: linear-gradient(180deg, #dfe8f5 0%, #edf2f8 100%);
}

.layout.pdv-mode {
    display: block;
}

.layout.pdv-mode .content {
    padding: 0;
    height: calc(100vh - 34px);
    overflow: auto;
}

.app-footer {
    height: 34px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 7px 12px;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    color: #f4e7d6;
    background: rgba(36, 25, 19, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 30;
}

.layout.pdv-mode .app-footer {
    color: #d9e5f6;
    background: rgba(10, 41, 81, 0.92);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--pdv-line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(12, 42, 81, 0.08);
}

.topbar span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.cash-badge {
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
}

.cash-badge.open {
    background: var(--ok);
    color: var(--ok-text);
}

.cash-badge.closed {
    background: var(--error);
    color: var(--error-text);
}

.cards,
.grid.two {
    display: grid;
    gap: 16px;
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 16px;
}

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    height: calc(100vh - 124px);
    min-height: 0;
}

.card,
.panel {
    background: #fff;
    border: 1px solid var(--pdv-line);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(14, 48, 88, 0.08);
}

.card {
    padding: 16px 18px;
}

.card span {
    display: block;
    color: #5c7598;
    margin-bottom: 8px;
}

.card strong {
    font-size: 30px;
    color: var(--pdv-blue-dark);
}

.panel {
    padding: 16px;
    min-height: 0;
    overflow: hidden;
}

h2, h3 {
    margin-top: 0;
    color: var(--pdv-blue-dark);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid label {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.form-grid .full,
.form-grid button,
.form-grid .checkbox {
    grid-column: 1 / -1;
}

input,
select,
button {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #c8d8ef;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}

input:focus,
select:focus {
    outline: 2px solid rgba(13, 55, 104, 0.18);
    border-color: #7ea7d6;
}

button {
    background: var(--pdv-blue);
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

button.secondary,
.link-button {
    background: #eaf1fb;
    color: var(--pdv-blue-dark);
    border: 1px solid #c8d8ef;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #c8d8ef;
    padding: 11px 12px;
    background: #eaf1fb;
    color: var(--pdv-blue-dark);
    font-weight: 700;
    text-decoration: none;
}

.compact-filter {
    margin-bottom: 16px;
}

.table-scroll {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: auto;
    border: 1px solid #c8d8ef;
    border-radius: 14px;
}

.table-scroll table {
    margin: 0;
}

.table-scroll thead th {
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 1;
}

.checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.checkbox input {
    width: auto;
}

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

th,
td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e2ebf7;
    font-size: 14px;
}

th {
    color: var(--pdv-blue-dark);
    background: #f5f9ff;
    font-weight: 700;
}

.summary {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alert.success {
    background: var(--ok);
    color: var(--ok-text);
}

.alert.error {
    background: var(--error);
    color: var(--error-text);
}

.pdv-screen {
    min-height: 100%;
    height: auto;
    background: linear-gradient(180deg, #d5dce8 0%, #cfd6e2 100%);
    display: grid;
    grid-template-rows: auto 1fr;
}

.pix-wait-dialog {
    width: min(620px, 96vw);
}

.pix-wait-header h2 {
    margin: 0 0 4px;
    color: #0a2951;
    font-size: 28px;
}

.pix-wait-header p {
    margin: 0;
    color: #254a79;
    font-size: 15px;
}

.pix-wait-card {
    width: min(560px, 92vw);
    margin: 0 auto;
    background: #fff;
    border: 1px solid #c7d6eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 14px 40px rgba(10, 41, 81, 0.15);
    display: grid;
    gap: 12px;
    align-content: start;
    text-align: center;
}

.pix-wait-amount,
.pix-wait-countdown {
    font-size: 19px;
    color: #0a2951;
}

.pix-wait-countdown strong {
    color: #8d4f2a;
}

.pix-wait-qr {
    width: min(320px, 72vw);
    height: auto;
    margin: 0 auto;
    border: 1px solid #0a2951;
    border-radius: 10px;
    padding: 8px;
    background: #fff;
}

.pix-wait-copy {
    border: 1px dashed #8ba6cd;
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    text-align: left;
    word-break: break-all;
    background: #f6f9ff;
}

.pix-wait-note {
    margin: 4px 0 0;
    color: #254a79;
}

.pix-wait-actions {
    margin-top: 4px;
    display: flex;
    justify-content: center;
}

.pdv-topbar {
    display: grid;
    grid-template-columns: minmax(200px, 18vw) minmax(0, 1fr) minmax(220px, 20vw);
    align-items: center;
    gap: clamp(8px, 1vw, 16px);
    padding: clamp(8px, 1vw, 12px) clamp(10px, 1.2vw, 16px);
    background: linear-gradient(180deg, var(--pdv-blue) 0%, var(--pdv-blue-dark) 100%);
    color: #fff;
    border-bottom: 2px solid #5ca9ea;
}

.pdv-loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 23, 44, 0.42);
    z-index: 1200;
}

.pdv-loading-overlay[hidden] {
    display: none !important;
}

.pdv-loading-box {
    display: grid;
    gap: 12px;
    justify-items: center;
    width: min(420px, calc(100vw - 40px));
    padding: 28px 24px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(10, 32, 63, 0.25);
    text-align: center;
}

.pdv-loading-box strong {
    color: var(--pdv-blue-dark);
    font-size: 24px;
}

.pdv-loading-box span {
    color: #58739a;
    font-size: 15px;
}

.pdv-loading-box button {
    min-width: 180px;
}

.pdv-loading-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #d4e1f2;
    border-top-color: var(--pdv-green);
    border-radius: 50%;
    animation: pdv-spin 0.9s linear infinite;
}

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

.pdv-topbar__left,
.pdv-topbar__right {
    display: grid;
    gap: 4px;
    font-size: 14px;
}

.pdv-topbar__left strong {
    font-size: clamp(24px, 2vw, 32px);
}

.pdv-topbar__title {
    text-align: center;
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.pdv-topbar__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: clamp(18px, 1.8vw, 26px);
    font-weight: 700;
    min-width: 0;
}

.pdv-topbar-tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
    width: auto;
    max-width: 100%;
}

.pdv-topbar-logout {
    display: inline-flex;
    margin: 0;
    width: auto;
    flex: 0 0 auto;
}

.pdv-topbar-tools .pdv-back-link {
    flex: 0 0 auto;
}

.pdv-topbar-logout button {
    width: auto;
    min-height: 24px;
    height: 24px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1;
    background: #fff;
    color: #1f2a37;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
}

.pdv-topbar-clock {
    display: inline-block;
    text-align: right;
}

.pdv-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pdv-back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.55);
}

.pdv-shell {
    display: grid;
    grid-template-columns: minmax(400px, 32vw) minmax(0, 1fr);
    gap: clamp(6px, 0.6vw, 10px);
    padding: clamp(6px, 0.7vw, 10px);
    min-height: 0;
}

.pdv-sidebar,
.pdv-main {
    min-width: 0;
}

.pdv-sidebar {
    display: grid;
    gap: clamp(6px, 0.6vw, 10px);
    grid-template-rows: auto auto auto 1fr auto;
}

.pdv-sidecard,
.pdv-table-panel,
.pdv-payment-panel,
.pdv-totals article,
.pdv-metrics article {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--pdv-line);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(13, 55, 104, 0.08);
}

.pdv-sidecard {
    padding: clamp(8px, 0.6vw, 10px);
}

.pdv-inline-link {
    display: inline-block;
    margin-top: 8px;
    color: #1b4f91;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.pdv-inline-link:hover {
    text-decoration: underline;
}

.pdv-sale-code {
    background: linear-gradient(180deg, #121212 0%, #000 100%);
    color: #fff;
}

.pdv-sale-code span,
.pdv-customer-box span,
.pdv-brand-box span,
.pdv-sidecard h3 {
    display: block;
    margin-bottom: 6px;
    color: inherit;
}

.pdv-sale-code strong,
.pdv-customer-box strong {
    font-size: 18px;
}

.pdv-customer-box {
    min-height: 92px;
    align-content: start;
}

.pdv-customer-box strong {
    font-size: 16px;
    line-height: 1.2;
}

.pdv-customer-box small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.pdv-brand-box {
    min-height: clamp(120px, 16vh, 160px);
    display: grid;
    place-content: center;
    text-align: center;
    gap: 8px;
    background: radial-gradient(circle at top, #ffffff 0%, #eef4fc 100%);
    color: var(--pdv-blue);
}

.pdv-brand-icon {
    font-size: clamp(56px, 4.2vw, 72px);
}

.pdv-brand-box strong {
    font-size: clamp(30px, 2.2vw, 36px);
    line-height: 1;
    color: #d92f1f;
}

.pdv-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pdv-shortcuts a,
.pdv-shortcuts button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--pdv-line);
    background: #fff;
    color: var(--pdv-blue);
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}

.pdv-shortcuts form {
    margin: 0;
}

.pdv-main {
    display: grid;
    gap: 8px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
}

.pdv-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 23vw, 360px);
    gap: clamp(6px, 0.6vw, 10px);
    align-items: stretch;
}

.pdv-scan-form {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--pdv-line);
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pdv-field-label {
    display: block;
    margin-bottom: 4px;
    color: #50688c;
    font-weight: 700;
    font-size: 10px;
}

.pdv-scan-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px 110px;
    gap: 6px;
}

.pdv-scan-controls select,
.pdv-scan-controls input {
    height: 40px;
    border-radius: 6px;
    border: 1px solid var(--pdv-line);
    padding: 0 10px;
    box-sizing: border-box;
    font-size: 14px;
}

.pdv-scan-controls button,
.pdv-finish-button {
    background: linear-gradient(180deg, var(--pdv-green) 0%, var(--pdv-green-dark) 100%);
}

.pdv-scan-controls button {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    box-sizing: border-box;
}

.pdv-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
}

.pdv-metrics article,
.pdv-totals article {
    padding: 6px 8px;
}

.pdv-metrics span,
.pdv-totals span {
    display: block;
    color: #6a7f9d;
    font-size: 9px;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.pdv-metrics strong {
    display: block;
    color: var(--pdv-blue-dark);
    font-size: 14px;
    text-align: center;
}

.pdv-table-panel {
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.pdv-table th,
.pdv-table td {
    border-color: #d8e4f4;
    padding: 8px 10px;
    font-size: 14px;
}

.pdv-table th {
    background: linear-gradient(180deg, #f3f7fd 0%, #e7eef8 100%);
    color: #243d63;
}

.pdv-table tbody tr:nth-child(even) {
    background: #fff8df;
}

.pdv-remove-cell form {
    margin: 0;
    display: flex;
    justify-content: center;
}

.pdv-remove-cell {
    width: 150px;
}

.pdv-remove-cell .link-button {
    width: auto;
    min-width: 120px;
    padding: 6px 14px;
    white-space: nowrap;
}

.pdv-empty {
    text-align: center;
    color: #6a7f9d;
    padding: clamp(120px, 16vh, 180px) 12px;
}

.pdv-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 23vw, 360px);
    gap: clamp(6px, 0.6vw, 10px);
    align-items: stretch;
}

.pdv-input-row .pdv-metrics article {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pdv-table tbody {
    display: table-row-group;
}

.pdv-table-panel .pdv-table {
    height: auto;
    table-layout: fixed;
}

.pdv-table tbody tr {
    height: auto;
}

.pdv-payment-panel {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pdv-open-payment {
    min-height: 100%;
    font-size: clamp(26px, 2.2vw, 34px);
}

.pdv-payment-panel label {
    display: grid;
    gap: 6px;
    color: #355076;
    font-size: 14px;
    font-weight: 700;
}

.pdv-payment-panel button {
    grid-column: 1 / -1;
    min-height: 62px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pdv-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
}

.pdv-payment-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 23, 45, 0.5);
}

.pdv-payment-dialog {
    position: relative;
    z-index: 1;
    width: min(1420px, calc(100vw - 28px));
    margin: 2vh auto 0;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--pdv-line);
    box-shadow: 0 24px 70px rgba(6, 22, 43, 0.28);
    overflow: hidden;
}

[data-sales-history-modal] .pdv-payment-dialog {
    width: min(1320px, calc(100vw - 16px));
}

[data-client-search-modal] .pdv-payment-dialog {
    width: min(1220px, calc(100vw - 16px));
}

.pdv-payment-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: linear-gradient(180deg, var(--pdv-blue) 0%, var(--pdv-blue-dark) 100%);
    color: #fff;
}

.pdv-payment-dialog__header h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.05;
}
.pdv-receipt-header-title p {
    margin: 8px 0 0;
    font-size: 14px;
    color: rgba(255,255,255,.85);
}

.pdv-close-button {
    width: auto;
    min-width: 42px;
    min-height: 42px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 22px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.pdv-payment-lines {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
}

.pdv-payment-head {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 190px minmax(170px, 220px) 96px;
    gap: 10px;
    background: #f4f8fd;
    border: 1px solid #d7e3f2;
    border-radius: 10px;
    padding: 10px 12px;
    color: #38577f;
    font-size: 14px;
    font-weight: 700;
}

.pdv-payment-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 120px;
    gap: 10px;
    align-items: end;
}

.pdv-remove-payment {
    min-height: 44px;
}

.pdv-payment-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
}

.pdv-payment-actions button {
    min-height: 52px;
    font-size: 16px;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 10px;
    padding: 0 22px;
}

.pdv-receipt-right .pdv-finish-button {
    margin-top: 10px;
    min-height: 96px;
    font-size: 20px;
    border-radius: 12px;
}

.pdv-receipt-panel {
    gap: 14px;
    grid-template-columns: 1fr;
}

.pdv-receipt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(420px, 0.8fr);
    gap: 18px;
}

.pdv-receipt-left,
.pdv-receipt-right {
    border: 1px solid #d8e5f5;
    border-radius: 14px;
    background: #fbfdff;
    padding: 16px;
}

.pdv-receipt-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 10px;
    margin-bottom: 8px;
}

.pdv-section-title {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    font-size: 36px;
    color: #123b70;
}

.pdv-sale-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.pdv-sale-summary article {
    background: #f7faff;
    border: 1px solid #d8e5f5;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(9, 32, 64, 0.08);
}

.pdv-sale-summary span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: #53719a;
    margin-bottom: 6px;
}

.pdv-sale-summary strong {
    font-size: 42px;
    color: #0f3768;
}

.pdv-sale-summary .is-total {
    background: #edf4ff;
}

.pdv-sale-summary .is-change strong {
    color: #1f7f35;
}

.pdv-sale-summary .is-missing strong {
    color: #b24320;
}

.pdv-payment-line {
    grid-template-columns: minmax(0, 1.2fr) 190px minmax(170px, 220px) 96px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #d9e6f5;
    background: #fff;
}

.pdv-remove-payment {
    min-height: 44px;
    font-size: 0;
    border: 2px solid #ff5a55;
    background: #fff;
    color: #ff5a55;
}

.pdv-change-highlight {
    grid-column: 1 / -1;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d5e9d9;
    background: #ecf9ef;
    color: #195e2f;
}
.pdv-receipt-ok {
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid #cfe6d5;
    border-radius: 10px;
    background: #eaf7ee;
    color: #1f7f35;
    display: grid;
    gap: 4px;
}
.pdv-receipt-breakdown {
    margin-top: 10px;
    border: 1px solid #d8e5f5;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
}
.pdv-receipt-breakdown div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f9;
}
.pdv-receipt-breakdown div:last-child {
    border-bottom: 0;
}
.pdv-receipt-breakdown span {
    color: #26456f;
    font-size: 15px;
}
.pdv-receipt-breakdown strong {
    color: #123b70;
    font-size: 15px;
}
.pdv-receipt-footer {
    margin-top: 12px;
    text-align: center;
    color: #6580a5;
    font-size: 14px;
}

.pdv-change-highlight span {
    font-size: 40px;
    font-weight: 800;
}

.pdv-change-highlight small {
    color: #3f6f48;
    font-size: 12px;
}

.pdv-payment-line label {
    font-size: 12px;
}
.pdv-payment-line input,
.pdv-payment-line select {
    min-height: 44px;
    font-size: 16px;
}
.pdv-receipt-meta label {
    font-size: 12px;
}
.pdv-receipt-meta input,
.pdv-receipt-meta select {
    min-height: 44px;
    font-size: 14px;
}

[data-payment-modal] .pdv-payment-dialog {
    width: min(1500px, calc(100vw - 40px));
    margin: 26px auto 0;
    border-radius: 8px;
    border: 1px solid #75a7d9;
    box-shadow: 0 24px 70px rgba(10, 22, 36, .42);
}

[data-payment-modal] [hidden] {
    display: none !important;
}

[data-payment-modal] .pdv-payment-dialog__header {
    min-height: 92px;
    padding: 22px 30px;
    background: linear-gradient(180deg, #0d3f78 0%, #073268 100%);
    box-sizing: border-box;
}

[data-payment-modal] .pdv-payment-dialog__header::before {
    content: "$";
    width: 34px;
    height: 34px;
    margin-right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

[data-payment-modal] .pdv-receipt-header-title {
    flex: 1;
}

[data-payment-modal] .pdv-payment-dialog__header h3 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

[data-payment-modal] .pdv-receipt-header-title p {
    margin-top: 6px;
    font-size: 15px;
}

[data-payment-modal] .pdv-close-button {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .35);
    font-size: 24px;
    line-height: 1;
}

[data-payment-modal] .pdv-receipt-panel {
    padding: 28px 20px 16px;
    background: #fff;
    gap: 0;
}

[data-payment-modal] .pdv-receipt-grid {
    grid-template-columns: minmax(0, 1.52fr) minmax(420px, .98fr);
    gap: 22px;
}

[data-payment-modal] .pdv-receipt-left,
[data-payment-modal] .pdv-receipt-right,
[data-payment-modal] .pdv-breakdown-card {
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    padding: 24px 26px;
}

[data-payment-modal] .pdv-section-title,
[data-payment-modal] .pdv-breakdown-card h4 {
    margin: 0 0 20px;
    color: #113a66;
    font-size: 18px;
    font-weight: 800;
}

[data-payment-modal] .pdv-payment-head,
[data-payment-modal] .pdv-payment-line {
    grid-template-columns: minmax(0, 1.45fr) minmax(110px, .45fr) minmax(120px, .5fr) 52px;
    gap: 10px;
}

[data-payment-modal] .pdv-payment-head {
    padding: 14px 18px;
    background: #f6f8fb;
    border-color: transparent;
    color: #415c7d;
    font-size: 13px;
    border-radius: 8px;
}

[data-payment-modal] .pdv-payment-lines {
    gap: 10px;
}

[data-payment-modal] .pdv-payment-line {
    min-height: 88px;
    padding: 18px 12px;
    align-items: start;
    border-radius: 9px;
    border: 1px solid #e0e7ef;
    background: #fff;
    box-shadow: 0 1px 3px rgba(18, 44, 72, .04);
    overflow: hidden;
}

[data-payment-modal] .pdv-method-cell {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
}

[data-payment-modal] .pdv-method-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #b8e2be;
    background: #e9f8ec;
    color: #329440;
    font-weight: 900;
    margin-top: 20px;
}

[data-payment-modal] .pdv-payment-line[data-payment-tone="debit"] .pdv-method-icon {
    border-color: #bdd9ff;
    background: #eaf4ff;
    color: #1d70d6;
}

[data-payment-modal] .pdv-payment-line[data-payment-tone="credit"] .pdv-method-icon {
    border-color: #d4c4ff;
    background: #f0eaff;
    color: #6a33c9;
}

[data-payment-modal] .pdv-method-cell label,
[data-payment-modal] .pdv-payment-line > label {
    display: grid;
    gap: 6px;
    color: #123a66;
    font-size: 12px;
    font-weight: 700;
    min-width: 0;
}

[data-payment-modal] .pdv-method-cell small {
    color: #647894;
    font-size: 14px;
    font-weight: 500;
}

[data-payment-modal] .pdv-payment-line input,
[data-payment-modal] .pdv-payment-line select {
    width: 100%;
    box-sizing: border-box;
    height: 46px;
    min-height: 46px;
    border-radius: 7px;
    border: 1px solid #d4dde8;
    background: #fff;
    color: #162d4a;
    font-size: 14px;
    font-weight: 700;
    padding: 0 12px;
}

[data-payment-modal] .pdv-remove-payment {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    grid-column: auto;
    justify-self: center;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid #ff5353;
    border-radius: 8px;
    background: #fff;
    color: #ff2424;
    font-size: 19px;
    line-height: 1;
}

[data-payment-modal] .pdv-payment-line > label {
    margin: 0;
}

[data-payment-modal] .pdv-payment-actions button {
    width: 100%;
    height: 60px;
    margin-top: 8px;
    border: 1px dashed #b8d5f4;
    border-radius: 8px;
    background: #fff;
    color: #0f66cc;
    font-size: 16px;
    font-weight: 800;
    text-transform: none;
}

[data-payment-modal] .pdv-payment-actions button::before {
    content: "+";
    margin-right: 22px;
    font-size: 28px;
    font-weight: 400;
}

[data-payment-modal] .pdv-receipt-attention {
    margin-top: 24px;
    display: grid;
    gap: 5px;
    padding: 18px 22px 18px 64px;
    border: 1px solid #b9d9fb;
    border-radius: 8px;
    background: #eff7ff;
    color: #174b82;
    position: relative;
}

[data-payment-modal] .pdv-receipt-attention::before {
    content: "i";
    position: absolute;
    left: 24px;
    top: 20px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1f75d6;
    border-radius: 50%;
    color: #1f75d6;
    font-weight: 800;
}

[data-payment-modal] .pdv-change-highlight {
    margin-top: 30px;
    min-height: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 20px 34px 20px 80px;
    border-color: #d4ead8;
    border-radius: 8px;
    background: #ecf9ef;
    position: relative;
}

[data-payment-modal] .pdv-change-highlight::before {
    content: "$";
    position: absolute;
    left: 34px;
    top: 30px;
    color: #2b8d35;
    font-weight: 900;
}

[data-payment-modal] .pdv-change-highlight strong {
    color: #2b8d35;
    font-size: 18px;
}

[data-payment-modal] .pdv-change-highlight span {
    color: #2b8d35;
    font-size: 30px;
    font-weight: 900;
}

[data-payment-modal] .pdv-change-highlight small {
    grid-column: 1 / 2;
    color: #3f7a49;
    font-size: 14px;
}

[data-payment-modal] .pdv-sale-summary {
    gap: 0;
}

[data-payment-modal] .pdv-sale-summary article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 22px;
}

[data-payment-modal] .pdv-sale-summary article + article {
    padding-top: 0;
}

[data-payment-modal] .pdv-sale-summary .is-change {
    margin-top: 8px;
    padding-top: 28px;
    border-top: 1px solid #dce5ef;
}

[data-payment-modal] .pdv-sale-summary .is-missing {
    display: none;
}

[data-payment-modal] .pdv-sale-summary span {
    color: #233a57;
    font-size: 18px;
    font-weight: 500;
    text-transform: none;
}

[data-payment-modal] .pdv-sale-summary strong {
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

[data-payment-modal] .pdv-sale-summary .is-received span,
[data-payment-modal] .pdv-sale-summary .is-received strong,
[data-payment-modal] .pdv-sale-summary .is-change span,
[data-payment-modal] .pdv-sale-summary .is-change strong {
    color: #2b8d35;
    font-weight: 900;
}

[data-payment-modal] .pdv-receipt-ok {
    min-height: 84px;
    margin-top: 10px;
    padding: 18px 24px 18px 74px;
    border-radius: 8px;
    background: #e8f6eb;
    color: #2b8d35;
    position: relative;
}

[data-payment-modal] .pdv-receipt-ok::before {
    content: "✓";
    position: absolute;
    left: 26px;
    top: 22px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #3f9b3d;
    color: #fff;
    font-size: 26px;
}

[data-payment-modal] .pdv-receipt-ok strong {
    font-size: 18px;
}

[data-payment-modal] .pdv-receipt-ok span {
    font-size: 16px;
}

[data-payment-modal] .pdv-breakdown-card {
    margin-top: 20px;
}

[data-payment-modal] .pdv-receipt-breakdown {
    padding: 0 0 12px;
    border: 0;
}

[data-payment-modal] .pdv-receipt-breakdown div,
[data-payment-modal] .pdv-breakdown-total {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    color: #233a57;
    font-size: 18px;
}

[data-payment-modal] .pdv-receipt-breakdown div span::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-right: 18px;
    display: inline-block;
    border-radius: 50%;
    background: #36a344;
}

[data-payment-modal] .pdv-breakdown-total {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid #dce5ef;
    color: #2b8d35;
    font-weight: 900;
}

[data-payment-modal] .pdv-receipt-right .pdv-finish-button {
    width: 100%;
    min-height: 100px;
    margin-top: 30px;
    display: grid;
    align-content: center;
    gap: 6px;
    border-radius: 8px;
    background: linear-gradient(180deg, #45ad3c 0%, #2d8a2c 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}

[data-payment-modal] .pdv-receipt-right .pdv-finish-button small {
    font-size: 17px;
    font-weight: 500;
    text-transform: none;
}

[data-payment-modal] .pdv-receipt-footer {
    margin: 26px -20px -16px;
    padding: 18px;
    border-top: 1px solid #e1e8f0;
    color: #637a99;
    font-size: 16px;
    text-align: center;
}

.pdv-item-search-results {
    grid-column: 1 / -1;
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--pdv-line);
    border-radius: 8px;
    background: #fff;
}

.pdv-cash-summary-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pdv-cash-summary-grid article {
    border: 1px solid var(--pdv-line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.pdv-cash-summary-grid span {
    display: block;
    color: #58739a;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.pdv-cash-summary-grid strong {
    color: #123b70;
    font-size: 24px;
}

.pdv-sales-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.pdv-sales-actions form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 0;
}

.pdv-inline-form {
    display: grid;
    gap: 6px;
    margin: 0;
}

.pdv-remove-cell {
    white-space: nowrap;
}

.pdv-remove-cell form {
    display: inline-flex;
    width: auto;
    margin: 0 4px 0 0;
    vertical-align: middle;
}

.pdv-remove-cell .link-button {
    width: auto;
    min-width: 88px;
}

.pdv-sales-actions input[type="password"] {
    min-width: 120px;
    padding: 6px 8px;
    border-radius: 6px;
}

.pdv-modal-open {
    overflow: hidden;
}

.pdv-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pdv-totals strong {
    display: block;
    color: var(--pdv-blue-dark);
    font-size: clamp(36px, 2.8vw, 54px);
    text-align: center;
}

.pdv-totals .grand-total {
    background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
}

.pdv-totals .grand-total strong {
    font-size: clamp(44px, 3.3vw, 68px);
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding-bottom: 12px;
    }

    .topbar {
        gap: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .pdv-topbar,
    .pdv-shell,
    .pdv-input-row,
    .pdv-bottom,
    .pdv-scan-controls,
    .pdv-totals,
    .pdv-payment-line,
    .pdv-shortcuts,
    .pdv-payment-panel,
    .pdv-metrics {
        grid-template-columns: 1fr;
    }

    .pdv-topbar__title,
    .pdv-topbar__right {
        text-align: left;
        justify-items: start;
    }

    .pdv-topbar__right {
        align-items: flex-start;
    }

    .pdv-payment-panel button {
        font-size: 20px;
    }

    .pdv-sale-summary {
        grid-template-columns: 1fr;
    }

    .pdv-payment-actions {
        flex-direction: column;
    }

    .pdv-receipt-grid,
    .pdv-receipt-meta {
        grid-template-columns: 1fr;
    }

    .pdv-totals .grand-total strong {
        font-size: 40px;
    }
}
