:root[data-surface="pdv"] body { min-width: 760px; overflow: hidden; background: var(--canvas); }
.desktop-pdv-shell { display: flex; flex-direction: column; height: 100dvh; min-height: 480px; background: var(--canvas); font-family: "IBM Plex Sans", "Segoe UI", sans-serif; }
.desktop-pdv-header { display: flex; align-items: center; gap: 25px; flex-shrink: 0; min-height: 50px; padding: 0 22px; border-bottom: 1px solid var(--border); background: var(--surface); }
.desktop-pdv-brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; color: var(--muted); text-decoration: none; }
.desktop-pdv-brand img { width: 112px; height: 36px; object-fit: contain; }
:root[data-theme="light"] .desktop-pdv-brand img { background: #16191f; border-radius: 2px; padding: 3px 6px; }
.desktop-pdv-brand > span { padding-left: 13px; border-left: 1px solid var(--border); font-size: 11px; font-weight: 500; letter-spacing: 1px; }
.desktop-pdv-navigation { display: flex; align-self: stretch; gap: 3px; }
.desktop-pdv-navigation a { display: flex; align-items: center; padding: 0 15px; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; font-size: 13px; font-weight: 400; transition: color 120ms, border-color 120ms; }
.desktop-pdv-navigation a:hover { color: var(--text); }
.desktop-pdv-navigation a[aria-current] { color: var(--text); font-weight: 500; border-bottom-color: var(--accent-bright); }
.desktop-pdv-session { margin-left: auto; display: flex; align-items: center; gap: 13px; min-width: 0; }
.desktop-pdv-operator { color: var(--muted); font-size: 12px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 13px; border-left: 1px solid var(--border); }
.desktop-pdv-operator > span {margin-right:5px;font-size:10px;}
.desktop-pdv-header .theme-toggle { padding: 5px; width: 30px; height: 30px; min-height: 30px; border: 0; background: transparent; justify-content: center; }
.desktop-pdv-header .theme-toggle svg { width: 17px; height: 17px; }
.desktop-pdv-header .theme-label { display: none; }
.desktop-pdv-header [data-action="logout"] { padding: 6px 9px; border-color: transparent; border-radius: 3px; background: transparent; font-size: 12px; font-weight: 400; }
.desktop-pdv-header [data-action="logout"]:hover { border-color: var(--border); background: var(--surface-hover); }
.desktop-pdv-menu { position: relative; }
.desktop-pdv-menu summary { list-style: none; cursor: pointer; white-space: nowrap; font-size: 12px; color: var(--muted); padding: 8px 0; }
.desktop-pdv-menu summary::-webkit-details-marker { display: none; }
.desktop-pdv-menu summary span { margin-left: 6px; }
.desktop-pdv-menu.active summary, .desktop-pdv-menu[open] summary { color: var(--text); }
.desktop-pdv-menu nav { position: absolute; top: calc(100% + 9px); right: 0; z-index: 30; width: 220px; max-height: calc(100dvh - 95px); overflow-y: auto; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 4px; padding: 5px; box-shadow: 0 10px 30px #0004; }
.desktop-pdv-menu nav a { display: block; padding: 9px 11px; border-radius: 2px; font-size: 13px; color: var(--text); text-decoration: none; }
.desktop-pdv-menu nav a:hover, .desktop-pdv-menu nav a[aria-current] { background: var(--surface-hover); }
.desktop-pdv-main { min-height: 0; flex: 1; overflow: auto; }
.desktop-pdv-main > .content { width: 100%; max-width: none; margin: 0; padding: 24px; }
.desktop-pdv-status { display: flex; align-items: center; gap: 20px; padding: 0 22px; flex-shrink: 0; min-height: 25px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.desktop-pdv-status > span + span { margin-left: auto; }
.desktop-pdv-status > .desktop-pdv-local { margin-left: 0; display: flex; align-items: center; gap: 6px; }
.desktop-pdv-local i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-bright); }
.pdv-home {max-width:1160px;margin:0 auto;padding:8px 0 20px;}
.pdv-home-heading {display:flex;align-items:baseline;justify-content:space-between;gap:20px;margin-bottom:24px;}
.pdv-home-heading h1 {margin:0;font:500 36px/1.1 "Barlow Condensed","Arial Narrow",sans-serif;}
.pdv-home-heading > span {color:var(--muted);font-size:12px;}
.pdv-home-start {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:16px;margin-bottom:30px;}
.pdv-home-sale {display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:124px;padding:22px 26px;border:1px solid var(--accent-bright);border-radius:5px;background:var(--soft);color:var(--text);text-decoration:none;}
.pdv-home-sale:hover {background:var(--surface-hover);}
.pdv-home-sale > span:first-child {display:flex;flex-direction:column;gap:5px;}
.pdv-home-sale small {font-size:11px;color:var(--muted);}
.pdv-home-sale strong {font:500 32px/1.1 "Barlow Condensed","Arial Narrow",sans-serif;}
.pdv-home-sale-next {display:flex;align-items:center;gap:12px;font-size:12px;}
.pdv-home-cash {display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:14px;padding:20px 22px;min-height:124px;border:1px solid var(--border);border-radius:5px;background:var(--surface);}
.pdv-home-cash-state {display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;}
.pdv-home-cash-state i {width:6px;height:6px;border-radius:50%;background:var(--muted);}
.pdv-home-cash-state[data-state=open] i {background:var(--green,#55b880);}
.pdv-home-cash-owner {display:block;margin:5px 0 0 14px;color:var(--muted);font-size:12px;}
.pdv-home-cash .pdv-home-cash-action {display:inline-flex;align-items:center;min-height:34px;padding:7px 12px;border:1px solid var(--border);border-radius:3px;background:var(--surface-input);color:var(--text);text-decoration:none;font-size:12px;font-weight:500;}
.pdv-home-cash .pdv-home-cash-action:hover:not(:disabled) {background:var(--surface-hover);border-color:var(--accent-bright);}
.pdv-home-cash .pdv-home-cash-action:disabled {opacity:.45;cursor:not-allowed;}
.pdv-home-routines h2 {margin:0 0 14px;font-size:14px;font-weight:500;}
.pdv-home-routine-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.pdv-home-routine {display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:88px;padding:16px 18px;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--text);text-decoration:none;}
.pdv-home-routine:hover {background:var(--surface-hover);border-color:var(--muted);}
.pdv-home-routine > span {display:flex;flex-direction:column;gap:6px;min-width:0;}
.pdv-home-routine strong {font-size:14px;font-weight:500;}
.pdv-home-routine small {font-size:11px;color:var(--muted);line-height:1.35;}
.pdv-home-routine > svg {flex-shrink:0;color:var(--muted);}
.pdv-home :is(a,button):focus-visible {outline:2px solid var(--accent-bright);outline-offset:3px;}
@media(max-width:1000px){.pdv-home-routine-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.pdv-home-sale-next{font-size:11px;}.pdv-home-start{grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr);}}
:root[data-surface="pdv"][data-page="pdv"] .desktop-pdv-main { display: flex; flex-direction: column; overflow: hidden; }
:root[data-surface="pdv"][data-page="pdv"] .content { flex: 1; display: flex; flex-direction: column; min-height: 0; height: auto; overflow: hidden; padding: 16px 22px 18px; }
.desktop-pdv-shell .pdv-command { min-height: 34px; margin: 0 0 17px; gap: 12px; }
.desktop-pdv-shell .pdv-command h1 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 28px; font-weight: 500; letter-spacing: .15px; line-height: 1; margin: 0; }
.desktop-pdv-shell .pdv-command-actions { gap: 10px; }
.desktop-pdv-shell .pdv-command-actions button { min-height: 32px; padding: 6px 10px; border-radius: 3px; font-size: 12px; font-weight: 400; background: transparent; }
.desktop-pdv-shell .pdv-command-actions button:hover { background: var(--surface-hover); }
.desktop-pdv-shell .pdv-command-actions .test-label { font-size: 10px; }
.desktop-pdv-shell .pdv-grid { grid-template-columns: minmax(270px, .72fr) minmax(0, 1.65fr); gap: 24px; min-height: 0; }
.desktop-pdv-shell .pdv-grid > .panel { min-height: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.desktop-pdv-shell .pdv-grid > .pdv-catalog { max-height: none; border-right: 1px solid var(--border); padding-right: 24px; }
.desktop-pdv-shell .catalog-search { padding: 0 0 19px; flex-shrink: 0; }
.desktop-pdv-shell .catalog-search label { font-size: 13px; font-weight: 400; margin-bottom: 10px; }
.desktop-pdv-shell .catalog-search label kbd { font-size: 10px; }
.desktop-pdv-shell .pdv-search { width: 100%; font-size: 15px; height: 46px; padding: 10px 12px; border-radius: 3px; background: var(--surface-input); border: 1px solid var(--border); box-shadow: none; }
.desktop-pdv-shell .pdv-search:focus { border-color: var(--accent-bright); outline: 2px solid var(--accent-bright); outline-offset: 0; box-shadow: none; }
.desktop-pdv-shell .catalog-columns { padding: 8px 0; border-top: 0; background: transparent; font-size: 11px; text-transform: none; letter-spacing: 0; }
.desktop-pdv-shell .catalog-row { min-height: 70px; padding: 13px 8px 13px 0; gap: 12px; border-color: var(--border); }
.desktop-pdv-shell .catalog-row:hover { background: var(--surface-hover); }
.desktop-pdv-shell .catalog-row:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: -2px; }
.desktop-pdv-shell .catalog-product strong { font-size: 14px; font-weight: 400; line-height: 1.3; }
.desktop-pdv-shell .catalog-product small { font-size: 11px; margin-top: 5px; line-height: 1.4; }
.desktop-pdv-shell .catalog-price { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 23px; font-weight: 500; letter-spacing: .1px; }
.desktop-pdv-shell .catalog-footer { padding: 10px 0 0; font-size: 10px; border-top: 1px solid var(--border); flex-shrink: 0; }
.desktop-pdv-shell .cart > .panel-head { min-height: 34px; padding: 0 0 15px; border: 0; }
.desktop-pdv-shell .cart > .panel-head h3 { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.desktop-pdv-shell .cart > .panel-head #cart-count { font-size: 12px; }
.desktop-pdv-shell .sale-columns, .desktop-pdv-shell .sale-line { grid-template-columns: minmax(110px, 1fr) 108px 82px 96px 24px; gap: 10px; }
.desktop-pdv-shell .sale-columns { padding: 10px 12px; min-height: 35px; background: transparent; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 11px; text-transform: none; letter-spacing: 0; }
.desktop-pdv-shell .sale-columns span:nth-child(3), .desktop-pdv-shell .sale-unit { display: block; }
.desktop-pdv-shell .cart-lines { min-height: 0; background: var(--surface); }
.desktop-pdv-shell .sale-line { min-height: 67px; font-size: 14px; padding: 13px 12px; }
.desktop-pdv-shell .sale-product { font-size: 15px; font-weight: 400; line-height: 1.35; }
.desktop-pdv-shell .sale-product small { margin-top: 5px; font-size: 11px; }
.desktop-pdv-shell .sale-line .qty-controls { gap: 3px; }
.desktop-pdv-shell .sale-line .qty-controls button { width: 25px; height: 32px; font-size: 17px; font-weight: 400; border-radius: 2px; }
.desktop-pdv-shell .sale-line .qty-controls input { width: 50px; height: 32px; border-radius: 2px; font-size: 14px; padding: 3px 2px; }
.desktop-pdv-shell .sale-unit { font-size: 12px; }
.desktop-pdv-shell .sale-amount { font-size: 16px; font-weight: 500; }
.desktop-pdv-shell .remove-line { font-size: 21px; color: var(--muted); opacity: .7; }
.desktop-pdv-shell .remove-line:hover, .desktop-pdv-shell .remove-line:focus-visible { opacity: 1; color: var(--red); }
.desktop-pdv-shell .sale-empty { min-height: 0; padding: 18px; font-size: 14px; gap: 12px; }
.desktop-pdv-shell .sale-empty strong { font-weight: 400; }
.desktop-pdv-shell .sale-empty svg { width: 28px; height: 30px; opacity: .4; }
.desktop-pdv-shell .sale-bottom { display: flex; flex-direction: column; border-top: 1px solid var(--border); background: transparent; }
.desktop-pdv-shell .sale-tools { flex-direction: row; align-items: center; justify-content: flex-start; padding: 10px 0 0; gap: 15px; }
.desktop-pdv-shell .sale-tools button { padding: 4px 0; border: 0; border-radius: 0; background: transparent; font-size: 11px; font-weight: 400; min-height: 27px; color: var(--muted); }
.desktop-pdv-shell .sale-tools button:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.desktop-pdv-shell .sale-tools .danger { margin-left: auto; color: var(--red); }
.desktop-pdv-shell .sale-bottom .cart-total { display: grid; grid-template-columns: minmax(0, 1fr) minmax(225px, .95fr); gap: 12px 30px; padding: 12px 0 0; border: 0; background: transparent; }
.desktop-pdv-shell .sale-bottom .cart-total > .total-row:first-child { grid-column: 1; grid-row: 1; align-self: center; }
.desktop-pdv-shell .sale-bottom .total-row { font-size: 12px; margin: 0; gap: 12px; }
.desktop-pdv-shell .sale-bottom .total-row b { font-weight: 400; font-size: 14px; }
.desktop-pdv-shell .sale-bottom .discount-row { grid-column: 2; grid-row: 1; gap: 8px; }
.desktop-pdv-shell .discount-control { width: 132px; }
.desktop-pdv-shell .discount-control select { width: 52px; border-radius: 2px 0 0 2px; padding: 5px; height: 32px; font-size: 12px; }
.desktop-pdv-shell .discount-control input { width: 80px; border-radius: 0 2px 2px 0; padding: 5px 7px; height: 32px; font-size: 14px; }
.desktop-pdv-shell .cart-discount-status { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 12px; }
.desktop-pdv-shell .cart-discount-status[hidden] { display: none; }
.desktop-pdv-shell .sale-bottom .total-row.final { grid-column: 1; grid-row: 3; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px; margin: 0; padding: 0; border: 0; }
.desktop-pdv-shell .sale-bottom .total-row.final span:first-child { color: var(--muted); font-size: 12px; font-weight: 400; }
.desktop-pdv-shell .sale-bottom .total-row.final span:last-child { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 42px; line-height: 1; font-weight: 500; letter-spacing: .1px; font-variant-numeric: tabular-nums; }
.desktop-pdv-shell .pay-button { grid-column: 2; grid-row: 3; align-self: end; min-height: 54px; height: auto; border-radius: 3px; padding: 12px 16px; font-size: 18px; font-weight: 500; }
.desktop-pdv-shell .pay-button kbd { font-size: 11px; border-color: rgb(255 255 255 / 40%); padding: 2px 5px; }
.desktop-pdv-shell .cart-total:has(.cart-discount-status[hidden]) .total-row.final,
.desktop-pdv-shell .cart-total:has(.cart-discount-status[hidden]) .pay-button { grid-row: 2; }
.desktop-pdv-shell #cart-content > .note { flex-shrink: 0; font-size: 12px; border-radius: 3px; }
.desktop-pdv-shell .stock-alert-banner { flex-shrink: 0; margin-bottom: 12px; font-size: 12px; }
:root[data-surface="pdv"] dialog { max-height: calc(100dvh - 60px); }
:root[data-surface="pdv"] dialog:has(#payment-rows) .payment-total { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 32px; font-weight: 500; }
:root[data-surface="pdv"] dialog:has(#payment-rows) .payment-confirmation { border-radius: 0; }
:root[data-surface="pdv"] .desktop-pdv-locked .desktop-pdv-main { display: block; overflow: auto; }
:root[data-surface="pdv"] .desktop-pdv-locked .content { width: min(100%, 440px); height: auto; margin: clamp(24px, 8vh, 76px) auto; padding: 24px; overflow: visible; }
.desktop-pdv-locked .page-heading { margin-bottom: 28px; }
.desktop-pdv-locked .page-heading h1 { font-size: 28px; font-weight: 500; letter-spacing: 0; }
.desktop-pdv-locked .panel { background: transparent; border: 0; box-shadow: none; }
.desktop-pdv-locked .panel-body { padding: 0; }
.desktop-pdv-locked .form-actions { margin-top: 24px; }
.desktop-pdv-locked .form-actions .primary { width: 100%; min-height: 44px; }
@media (max-width: 1100px) {
  .desktop-pdv-header { gap: 12px; padding-inline: 16px; }
  .desktop-pdv-brand img { width: 100px; }
  .desktop-pdv-brand, .desktop-pdv-session { gap: 9px; }
  .desktop-pdv-brand > span { padding-left: 10px; }
  .desktop-pdv-navigation a { padding-inline: 11px; }
  .desktop-pdv-operator { max-width: 125px; padding-left: 9px; }
  .desktop-pdv-shell .pdv-grid { grid-template-columns: minmax(260px, .72fr) minmax(0, 1.65fr); gap: 18px; }
  .desktop-pdv-shell .pdv-grid > .pdv-catalog { padding-right: 18px; }
  :root[data-surface="pdv"][data-page="pdv"] .content { padding: 14px 16px 16px; }
  .desktop-pdv-shell .pdv-command-actions { gap: 7px; }
  .desktop-pdv-shell .sale-columns, .desktop-pdv-shell .sale-line { grid-template-columns: minmax(105px, 1fr) 108px 72px 86px 20px; gap: 8px; }
  .desktop-pdv-shell .sale-amount { font-size: 15px; }
  .desktop-pdv-shell .sale-bottom .cart-total { grid-template-columns: minmax(0, 1fr) minmax(210px, .95fr); column-gap: 20px; }
}
@media (max-width: 900px) {
  .desktop-pdv-header { gap: 7px; padding-inline: 12px; }
  .desktop-pdv-brand img { width: 89px; }
  .desktop-pdv-brand > span { display: none; }
  .desktop-pdv-navigation a { padding-inline: 9px; font-size: 12px; }
  .desktop-pdv-operator { max-width: 100px; }
  .desktop-pdv-shell .pdv-grid { grid-template-columns: 245px minmax(0, 1fr); gap: 14px; }
  .desktop-pdv-shell .pdv-grid > .pdv-catalog { padding-right: 14px; }
  .desktop-pdv-shell .sale-columns, .desktop-pdv-shell .sale-line { grid-template-columns: minmax(100px, 1fr) 108px 83px 20px; }
  .desktop-pdv-shell .sale-columns span:nth-child(3), .desktop-pdv-shell .sale-unit { display: none; }
  .desktop-pdv-shell .catalog-price { font-size: 21px; }
  .desktop-pdv-shell .sale-bottom .cart-total { grid-template-columns: minmax(0, 1fr) 200px; column-gap: 16px; }
  .desktop-pdv-shell .sale-bottom .discount-row { gap: 5px; font-size: 11px; }
  .desktop-pdv-shell .discount-control { width: 120px; }
  .desktop-pdv-shell .discount-control input { width: 72px; font-size: 13px; }
  .desktop-pdv-shell .discount-control select { width: 48px; }
  .desktop-pdv-shell .sale-bottom .total-row.final span:last-child { font-size: 36px; }
}
@media (max-height: 680px) {
  .desktop-pdv-header { min-height: 48px; }
  .desktop-pdv-shell .pdv-command { margin-bottom: 12px; }
  .desktop-pdv-shell .catalog-search { padding-bottom: 14px; }
  .desktop-pdv-shell .catalog-row { min-height: 64px; padding-block: 10px; }
  .desktop-pdv-shell .cart > .panel-head { padding-bottom: 12px; }
  .desktop-pdv-shell .sale-line { min-height: 60px; padding-block: 10px; }
  .desktop-pdv-shell .sale-tools { padding-top: 7px; }
  .desktop-pdv-shell .sale-bottom .cart-total { padding-top: 7px; row-gap: 8px; }
  .desktop-pdv-shell .sale-bottom .total-row.final span:last-child { font-size: 36px; }
  .desktop-pdv-shell .pay-button { min-height: 49px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .desktop-pdv-navigation a { transition: none; } }
@media print {
  /* A receipt must grow beyond the cashier window and keep its thermal width. */
  :root[data-surface="pdv"] body { min-width: 0; height: auto; overflow: visible; }
  :root[data-surface="pdv"] #modal[open],
  :root[data-surface="pdv"] #modal[open] > .modal-body { height: auto; max-height: none; overflow: visible; }
}
