:root{color-scheme:light;--bg:#f3f6f8;--surface:#fff;--ink:#162723;--muted:#50635e;--line:#dce6e3;--accent:#08735e;--dark:#132f2a;--soft:#e4f4ed;font:16px/1.5 system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}a{color:var(--accent)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.85rem,4vw,2.65rem);letter-spacing:-.055em;line-height:1.1;margin-bottom:0}h2{font-size:1.2rem;letter-spacing:-.025em}h3{font-size:1rem}small,.muted{color:var(--muted)}.signed{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--dark);color:#f5fffb;padding:26px 16px;display:flex;flex-direction:column;gap:30px}.brand{color:inherit;display:flex;gap:12px;align-items:center;text-decoration:none;font-weight:750;overflow-wrap:anywhere}.brand small,.identity small{display:block;font-size:.78rem;font-weight:500}.sidebar small{color:#bdcec8}.mark{height:38px;width:38px;flex:0 0 38px;background:#b8f3d7;color:#15483a;border-radius:12px;display:grid;place-items:center;font-size:1.25rem;font-weight:850}.sidebar nav{display:grid;gap:4px}.sidebar nav a{color:#e1f2ec;text-decoration:none;border-radius:8px;padding:8px 12px}.sidebar nav a:hover,.sidebar nav a.selected{background:#295249;color:white}.identity{margin-top:auto;border-top:1px solid #41635a;padding:14px 8px 0;overflow-wrap:anywhere}.identity form{margin-top:12px}.identity .secondary{width:100%}
main{width:100%;max-width:1500px;margin:0 auto;padding:38px clamp(16px,4vw,54px)}.guest main{max-width:520px;margin:7vh auto 0}.guest .brand{margin-bottom:28px}.page-title{margin-bottom:23px}.panel,.metrics article,.table-wrap{background:var(--surface);border:1px solid var(--line);border-radius:14px}.panel{padding:clamp(14px,2vw,24px);margin-bottom:20px;min-width:0}.panel .table-wrap{margin:10px 0;border-radius:8px}.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin-bottom:20px}.metrics article{padding:18px;color:var(--muted)}.metrics strong,.total{display:block;margin-top:4px;color:var(--ink);font-size:clamp(1.4rem,3vw,2.1rem);font-weight:800;letter-spacing:-.045em}.panel+.table-wrap{margin-top:8px}.table-wrap{overflow:auto;margin-bottom:20px}table{width:100%;border-collapse:collapse;font-size:.89rem;text-align:left}th,td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:top}th{background:#eef5f3;color:#314c44;font-weight:700}tr:last-child td{border-bottom:0}td a{font-weight:650}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.checkout .split{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}.fields,.stack{display:grid;gap:12px}.stack{align-content:start}.fields{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));align-items:end}.actions,.receipt-heading{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}.receipt-heading{justify-content:space-between;align-items:start}label{display:grid;gap:5px;font-size:.88rem;font-weight:660}input,select,button,.button{font:inherit;border-radius:8px;min-height:42px}input,select{min-width:0;width:100%;border:1px solid #b7cac3;background:white;color:var(--ink);padding:8px 10px}td input{min-width:74px}button,.button{display:inline-flex;align-items:center;justify-content:center;text-align:center;background:var(--accent);border:1px solid transparent;padding:8px 14px;color:white;font-weight:700;cursor:pointer;text-decoration:none}.secondary{background:var(--soft);color:#125846;border-color:#c8e7da}.danger{background:#a62e30}button:disabled{opacity:.55;cursor:default}:focus-visible{outline:3px solid #3bb899;outline-offset:2px}.alert{padding:12px 15px;border-radius:8px;border:1px solid #bfe2d3;background:var(--soft);color:#13563d}.alert.error{background:#fff0ef;color:#8c2528;border-color:#f0d0cf}
@media(max-width:920px){.checkout .split,.split{grid-template-columns:1fr}}
@media(max-width:650px){.signed{display:block}.sidebar{gap:12px;padding:14px}.sidebar nav{display:flex;flex-wrap:wrap;gap:4px}.sidebar nav a{padding:5px 8px;font-size:.85rem}.identity{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:6px 0 0}.identity form{margin:0 0 0 auto}.identity button{min-height:32px;padding:2px 12px}main{padding-top:24px}.guest main{margin-top:3vh}}
@media print{.sidebar,.no-print,.page-title,.alert.ok{display:none!important}body.signed{display:block;background:white}main{padding:0}.receipt{border:0}.table-wrap{overflow:visible}th,td{padding:6px}}
.check{display:flex;align-items:center;gap:8px}.check input{width:18px;min-height:18px}.line-picker .fields{max-width:640px;margin-bottom:12px}.line-picker .table-wrap{margin-bottom:0}
.cash-action{margin-top:16px}.cash-close details summary{cursor:pointer}.cash-close button{justify-self:start}@media print{body.signed main .panel{break-inside:avoid}}
textarea{width:100%;font:inherit;border:1px solid #cbd7d3;padding:.65rem;border-radius:.5rem;resize:vertical}
.receipt-brand{text-align:center;margin-bottom:1.2rem;padding:0 0 1rem;border-bottom:1px solid #cad5d0;overflow-wrap:anywhere}
.receipt-brand strong{display:block;font-size:1.3rem}.receipt-brand h2{margin:.75rem 0 .25rem}
.receipt-logo{display:block;max-width:170px;max-height:80px;object-fit:contain;margin:0 auto .55rem}
.receipt-bordered{border:1px solid #cad5d0;border-radius:.5rem;padding:1rem}
.receipt-text{white-space:pre-wrap}.receipt-thermal{max-width:80mm;font-size:.78rem;padding:4mm;overflow-wrap:anywhere}
.receipt-thermal .table-wrap{overflow:visible}.receipt-thermal table{font-size:.72rem;table-layout:fixed}.receipt-thermal td,.receipt-thermal th{padding:3px}
.device-photos{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0}.device-photos img{width:140px;height:110px;object-fit:cover;border-radius:6px}
@media print{body:has(.receipt-preview) main>section:not(.receipt-preview){display:none} .receipt-thermal{width:76mm;margin:0;padding:2mm}.receipt-thermal .receipt-logo{max-width:36mm;max-height:20mm}.receipt-brand{break-inside:avoid}}

.pdv-version{display:block;margin-top:.45rem;letter-spacing:.03em;color:inherit}
.finance-tabs{display:flex;flex-wrap:wrap;gap:8px}
.return-receipt{max-width:900px;margin:0 auto}
.return-document,.return-details,.return-totals{display:flex;gap:16px;flex-wrap:wrap}
.return-document{align-items:flex-start;justify-content:space-between}
.return-document h3,.return-document p{margin:0}
.return-details{margin:16px 0;padding:12px 0;border-block:1px solid #c7d6d1}
.return-details p{min-width:110px;margin:0;overflow-wrap:anywhere}
.return-totals{margin:18px 0;padding:12px;border:1px solid #abc6bc;border-radius:8px}
.return-totals div{flex:1 1 125px}.return-totals dt{font-size:.86em}.return-totals dd{margin:2px 0 0;font-weight:700}
.return-net{color:#075842;font-size:1.15em}.return-footer{border-top:1px solid #c7d6d1;padding-top:10px;font-size:.86em}
.return-receipt.receipt-thermal{max-width:80mm}.receipt-thermal .return-totals{display:grid;gap:4px}
.receipt-thermal .return-totals div{display:flex;justify-content:space-between;gap:6px}.receipt-thermal .return-totals dd{margin:0}
@media print {
    main:has(>.return-receipt)>:not(.return-receipt){display:none!important}
    body.signed main>.return-receipt{break-inside:auto;color:#151b19;margin:0 auto}
    .return-receipt .receipt-brand,.return-receipt .return-details,.return-receipt .return-totals{break-inside:avoid}
    .return-receipt tr{break-inside:avoid}
    .return-receipt thead{display:table-header-group}
    .return-receipt.receipt-thermal{margin:0}
}

.dashboard-metrics article span{display:block;margin-top:6px;font-size:.85rem}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:16px}
.dashboard-grid>.panel{min-width:0}
.dashboard-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.dashboard-heading h2,.dashboard-heading p{margin:0 0 6px}
.dashboard-value{font-size:1.8rem;font-weight:800;letter-spacing:-.04em;color:var(--ink)}
.dashboard-period{display:flex;gap:6px}
.dashboard-period .button{font-size:.82rem;min-height:34px}
.dashboard-chart{list-style:none;margin:12px 0 16px;padding:0;display:grid;gap:clamp(2px,1.1vw,12px)}
.dashboard-chart-7{grid-template-columns:repeat(7,minmax(0,1fr))}
.dashboard-chart-30{grid-template-columns:repeat(30,minmax(0,1fr));gap:3px}
.dashboard-bar-slot{height:150px;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid #c9dad4;
    background:repeating-linear-gradient(to top,transparent 0,transparent 36px,#e6efec 36px,#e6efec 37px)}
.dashboard-bar{display:block;width:70%;max-width:42px;background:#088168;border-radius:4px 4px 0 0}
.dashboard-chart-30 .dashboard-bar{width:88%;border-radius:2px 2px 0 0}
.dashboard-chart-date{display:block;text-align:center;font-size:.74rem;height:18px;margin-top:4px;white-space:nowrap}
.dashboard-chart-30 .dashboard-chart-date{text-align:left;font-size:.67rem}
.dashboard-alerts{display:grid;grid-template-columns:repeat(auto-fit,minmax(172px,1fr));gap:10px}
.dashboard-alerts a{display:flex;flex-direction:column;gap:4px;padding:11px;border:1px solid #d2e4dd;border-radius:7px;color:var(--ink);text-decoration:none}
.dashboard-alerts a:hover{background:#eaf5f1}.dashboard-alerts strong{font-size:1.22rem;color:#075842}
@media(max-width:900px){.dashboard-grid{grid-template-columns:1fr}}
@media(max-width:500px){.dashboard-chart-30 .dashboard-chart-date{font-size:.58rem}.dashboard-bar-slot{height:115px}}
.dashboard-bar.bar-0{height:0%}
.dashboard-bar.bar-1{height:5%}
.dashboard-bar.bar-2{height:10%}
.dashboard-bar.bar-3{height:15%}
.dashboard-bar.bar-4{height:20%}
.dashboard-bar.bar-5{height:25%}
.dashboard-bar.bar-6{height:30%}
.dashboard-bar.bar-7{height:35%}
.dashboard-bar.bar-8{height:40%}
.dashboard-bar.bar-9{height:45%}
.dashboard-bar.bar-10{height:50%}
.dashboard-bar.bar-11{height:55%}
.dashboard-bar.bar-12{height:60%}
.dashboard-bar.bar-13{height:65%}
.dashboard-bar.bar-14{height:70%}
.dashboard-bar.bar-15{height:75%}
.dashboard-bar.bar-16{height:80%}
.dashboard-bar.bar-17{height:85%}
.dashboard-bar.bar-18{height:90%}
.dashboard-bar.bar-19{height:95%}
.dashboard-bar.bar-20{height:100%}

.client-fieldset{min-width:0;margin:0;padding:14px;border:1px solid #d3e1dc;border-radius:8px}
.client-fieldset legend{padding:0 8px;font-weight:700}

.checkout-page{background:#edf3f1}
.checkout-page main{max-width:1650px;padding:24px clamp(14px,3vw,44px)}
.checkout-page .page-title{margin-bottom:14px}
.checkout-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
    padding:10px 14px;margin-bottom:10px;border:1px solid #d1e2da;border-radius:12px;background:#f9fcfb}
.checkout-shift,.checkout-bar-actions,.checkout-hold-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.checkout-shift{font-weight:750;color:#174d40}
.checkout-live{width:8px;height:8px;border-radius:50%;background:#188f68;box-shadow:0 0 0 4px #d9f0e6}
.checkout-bar-actions button{min-height:32px;font-size:.86rem}
.checkout kbd{font:700 .68rem/1.2 system-ui,sans-serif;letter-spacing:.02em;white-space:nowrap;border-radius:4px;
    padding:2px 5px;color:#264c42;background:#eaf4f0;border:1px solid #c4d9d0}
.checkout button kbd{margin-left:7px}
.checkout-help{margin:0 0 13px;color:#3c5b52;font-size:.86rem}
.checkout-help summary,.checkout-options summary{cursor:pointer;font-weight:700}
#checkout-shortcuts{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:6px;padding:9px 0}
#checkout-shortcuts span{display:flex;gap:6px;align-items:center}
.checkout .checkout-layout{grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);align-items:start;gap:16px}
.checkout-cart,.checkout-payment{box-shadow:0 8px 24px #153e2e0a}
.checkout-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.checkout-section-head h2{margin:0}.checkout-section-head span{color:#50635e;font-size:.82rem}
.checkout-entry{padding:13px;background:#f1f7f4;border-radius:10px}
.checkout-item-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}
.checkout-status{min-height:1.25em;margin:9px 0 4px;font-size:.85rem}
.checkout-empty{margin:0;padding:24px 12px;text-align:center;color:#50635e;background:#fff}
.checkout-payment.panel{padding:0;overflow:hidden}
.checkout-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
    padding:15px 17px;background:#143b32;color:#fff}
.checkout-summary h2,.checkout-summary p{margin:0}.checkout-summary p{font-size:.82rem;color:#c3e6dc}
.checkout-summary strong{font-size:clamp(1.35rem,2.65vw,2.4rem);line-height:1.1;font-variant-numeric:tabular-nums}
.checkout-payment-body,.checkout-finish{padding:14px 16px}
.checkout-pay-methods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
.checkout-payment input,.checkout-payment select,.checkout-entry input,.checkout-entry select{min-height:37px}
.checkout-options{border-top:1px solid #dde9e3;padding-top:7px}.checkout-options>div{margin-top:8px}
.checkout-options summary{color:#245e4d;font-size:.9rem}
.checkout-payment label kbd,.checkout-entry label kbd{justify-self:start}
.checkout-finish{border-top:1px solid #d9e7df;background:#f5faf7}.checkout-finish p{margin:0 0 8px;font-size:.9rem}
.checkout-finish button{width:100%;min-height:45px}
.checkout-price-edit{margin-top:4px;font-size:.8rem}.checkout-price-edit input{max-width:150px}
@media(max-width:920px){.checkout .checkout-layout{grid-template-columns:1fr}}
@media(max-width:520px){.checkout-item-picker,.checkout-pay-methods{grid-template-columns:1fr}}
.checkout-help button{display:flex;justify-content:space-between;text-align:left;min-height:32px;padding:5px 7px;font-size:.82rem}
.checkout-help summary kbd{margin-left:4px}

.checkout-customer-search summary{cursor:pointer;font-weight:700;color:#245e4d;font-size:.89rem}
.checkout-customer-search>div{margin-top:8px;gap:6px}
#customer-search-status{margin:0;font-size:.83rem}
#customer-matches{list-style:none;padding:0;margin:0;display:grid;gap:4px}
#customer-matches button{width:100%;justify-content:flex-start;text-align:left;overflow-wrap:anywhere}

/* Desktop checkout workspace, scoped to the sale screen. */
body.checkout-page{display:flex;flex-direction:column;min-height:100dvh;background:#e8eeed}
.checkout-page main{flex:1;display:flex;flex-direction:column;width:100%;max-width:none;min-height:0;padding:0}
.checkout-page main>.alert{margin:8px 12px}
.desktop-titlebar{position:relative;z-index:8;display:flex;align-items:center;gap:12px;padding:8px 15px;
    min-height:47px;background:#183b34;color:#f0faf6}
.desktop-titlebar h1{font-size:1rem;letter-spacing:0;font-weight:650;line-height:1.3;margin:0}
.desktop-brand{display:inline-flex;align-items:center;gap:8px;color:inherit;text-decoration:none;font-weight:750;
    font-size:.87rem;min-width:0;overflow-wrap:anywhere}
.desktop-mark{display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px;background:#c3edda;
    color:#174137;border-radius:4px;font-size:.85rem}
.desktop-divider{width:1px;height:20px;background:#5a7b71}
.desktop-account{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:.82rem}
.desktop-menu{position:relative}
.desktop-menu summary{cursor:pointer;padding:4px 8px;border:1px solid #709087;border-radius:5px;white-space:nowrap}
.desktop-menu nav{position:absolute;z-index:9;right:0;top:calc(100% + 7px);width:min(82vw,245px);
    max-height:min(70vh,460px);overflow:auto;display:grid;gap:2px;padding:7px;background:#fff;
    border:1px solid #bed1c8;box-shadow:0 8px 20px #112c2540;border-radius:7px}
.desktop-menu nav a{padding:5px 8px;border-radius:4px;color:#1e4539;text-decoration:none}
.desktop-menu nav a:hover,.desktop-menu nav a[aria-current="page"]{background:#e2f1eb}
.desktop-menu nav form{padding:5px}.desktop-menu nav button{min-height:30px;width:100%}
.checkout-page .checkout{display:flex;flex-direction:column;flex:1;min-height:0}
.desktop-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 12px;
    background:#f7faf8;border-bottom:1px solid #cad9d3}
.desktop-toolbar button,.desktop-toolbar .button{min-height:33px;padding:5px 9px;font-size:.8rem;border-radius:5px}
.desktop-cash-link{margin-left:auto}.checkout-page .checkout-help{padding:4px 12px;margin:0;background:#ecf3ef;
    border-bottom:1px solid #cbdcd4}
.checkout-page #checkout-shortcuts{max-height:min(27vh,155px);overflow:auto}
.checkout-page .checkout-layout{flex:1;min-height:0;padding:10px 12px;gap:10px;align-items:start}
.checkout-page .checkout-layout>.panel{margin:0;box-shadow:none;border-radius:7px;border-color:#bfcec8}
.checkout-page .checkout-cart{padding:10px}.checkout-page .checkout-section-head{margin-bottom:8px}
.checkout-page .checkout-entry{border-radius:5px;padding:9px;background:#f0f5f2;gap:7px}
.checkout-page .checkout-cart .table-wrap{margin-bottom:0;border-radius:4px}
.checkout-page .checkout-cart th{background:#dce9e3}
.checkout-page .checkout-summary{background:#244c43;padding:11px 12px}
.checkout-page .checkout-payment-body{padding:11px 12px}
.desktop-statusbar{position:relative;display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:8px 12px;
    background:#f7faf8;border-top:1px solid #c3d3cc}
.desktop-cash-status{display:flex;align-items:center;gap:8px;font-weight:750;color:#194b3c;font-size:.83rem}
.desktop-status-text{flex:1;min-width:140px;font-size:.85rem;color:#395a50}.desktop-status-text p{margin:0}
.desktop-sale-total{display:flex;align-items:baseline;gap:8px;white-space:nowrap;color:#19483a;font-size:.82rem}
.desktop-sale-total strong{font-size:1.32rem;font-variant-numeric:tabular-nums}
.desktop-statusbar button{min-height:37px;font-size:.86rem}
@media(min-width:1000px) and (min-height:600px){
    body.checkout-page{height:100dvh;overflow:hidden}
    .checkout-page .checkout-layout{align-items:stretch;overflow:auto}
    .checkout-page .checkout-layout>.panel{min-height:0;overflow:auto;overscroll-behavior:contain}
    .checkout-page .checkout-cart thead{position:sticky;top:0}
}
@media(max-width:650px){
    .desktop-titlebar{padding:8px 10px;gap:8px}.desktop-account>span{display:none}
    .desktop-toolbar{padding:6px 8px}.desktop-cash-link{margin-left:0}
    .checkout-page .checkout-layout{padding:8px}.desktop-statusbar{gap:8px}
    .desktop-status-text{order:3;width:100%;flex-basis:100%}.desktop-sale-total{margin-left:auto}
}

.sale-confirmation{box-sizing:border-box;width:min(460px,calc(100% - 32px));max-height:calc(100% - 32px);overflow:auto;padding:24px;border:1px solid #b8cdc5;border-radius:12px;background:#fff;color:#142c27;box-shadow:0 16px 55px #102f2b40}
.sale-confirmation::backdrop{background:#102f2b9c}
.sale-confirmation h2{margin:0 0 12px}
.sale-confirmation ul{padding-inline-start:20px}
.sale-confirmation-total{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:#edf5f2;border-radius:8px;margin-bottom:16px}
.sale-confirmation-total strong{font-size:1.4rem}
.sale-confirmation .actions{justify-content:flex-end}

.pdv-nav-group{display:grid;gap:2px}
.pdv-nav-heading{font-size:.76rem;font-weight:700;padding:4px 8px}
.sidebar nav .pdv-nav-group+.pdv-nav-group{border-top:1px solid #41635a;padding-top:7px;margin-top:4px}
.sidebar .pdv-nav-heading{color:#b8d6ca;padding-inline:12px}
.sidebar nav .pdv-nav-group a{padding-block:6px}
.sidebar nav a[aria-current="page"]{background:#295249;color:white}
.desktop-menu .pdv-nav-heading{color:#516e64}
.desktop-menu .pdv-nav-group+.pdv-nav-group{border-top:1px solid #d6e3de;padding-top:5px}
@media(max-width:650px){
    .sidebar nav{display:grid;gap:6px}
    .sidebar .pdv-nav-group{display:flex;flex-wrap:wrap;align-items:center}
    .sidebar .pdv-nav-heading{flex-basis:100%;padding-inline:8px}
}
