/* Family Food V23 — caisse express et scanner continu. Font Awesome 6.7 est chargé dans header.php. */
.ff23-pos-dialog{width:min(96vw,1060px);max-width:1060px;max-height:min(94dvh,900px);padding:0;border:none;overflow:visible;background:transparent;color:#261c15}
.ff23-pos-dialog::backdrop{background:rgba(14,17,22,.78);backdrop-filter:blur(9px)}
.ff23-pos-dialog .ff23-pos-shell{max-height:94dvh;min-height:0;border-radius:25px;background:#fffdfb;border:1px solid rgba(249,202,167,.65);box-shadow:0 30px 110px #0007;overflow:hidden}
.ff23-pos-dialog [hidden]{display:none!important}
.ff23-pos-dialog .ff23-scan-head{background:#fff;padding:15px 20px;border-bottom:1px solid #f2e5dd;flex:none}
.ff23-head-main,.ff23-head-right{display:flex;align-items:center;gap:12px;min-width:0}
.ff23-head-icon{display:grid;place-items:center;width:45px;height:45px;flex:0 0 45px;color:#fff;background:#f36a21;border-radius:14px;box-shadow:0 7px 16px #f36a2133;font-size:20px}
.ff23-head-main strong{font-size:20px;line-height:1.1;letter-spacing:-.035em;color:#271810}
.ff23-head-main small{font-size:12px;color:#806f65;font-weight:600}
.ff23-online-status{display:inline-flex;align-items:center;gap:7px;font-size:10px;font-weight:900;letter-spacing:.04em;color:#277e55;border-radius:40px;border:1px solid #c6efdb;background:#edfdf5;padding:9px 12px;white-space:nowrap}
.ff23-online-status i{font-size:9px;color:#16a36b;animation:ff23-live 1.6s ease-in-out infinite}
@keyframes ff23-live{50%{opacity:.4}}
.ff23-pos-dialog .ff23-scan-head #ff22-scanner-close{width:40px;height:40px;flex:0 0 40px;border-radius:13px;background:#f8f2ed;color:#5f4430;transition:.15s}
.ff23-pos-dialog .ff23-scan-head #ff22-scanner-close:hover{background:#ffe2d1;color:#ce4b0b}
.ff23-pos-dialog .ff23-scan-body{grid-template-columns:minmax(0,1.45fr) minmax(290px,.9fr);gap:0;padding:0;overflow:auto;min-height:0}
.ff23-pos-dialog .ff23-camera-area{padding:19px 19px 21px;min-width:0;min-height:0}
.ff23-scan-toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.ff23-scan-toolbar>div{display:grid;grid-template-columns:auto auto;align-items:center;column-gap:7px;row-gap:3px}
.ff23-scan-toolbar>div>i{grid-row:1;color:#f36a21;font-size:15px}
.ff23-scan-toolbar strong{font-size:14px;color:#261a13;line-height:1.3}
.ff23-scan-toolbar small{grid-column:1 / -1;color:#877362;font-size:11px}
.ff23-express-toggle{display:inline-flex;align-items:center;gap:9px;color:#654632;user-select:none;cursor:pointer;font-size:12px;font-weight:800;background:#fff3e9;border:1px solid #ffdfc7;padding:8px 10px;border-radius:50px}
.ff23-express-toggle input{position:absolute;width:1px;height:1px;opacity:0}
.ff23-switch{width:32px;height:19px;border-radius:20px;background:#bcaca3;position:relative;transition:.2s;flex:0 0 auto}
.ff23-switch:before{content:'';position:absolute;left:3px;top:3px;width:13px;height:13px;border-radius:50%;background:#fff;transition:.2s}
.ff23-express-toggle input:checked+.ff23-switch{background:#f36a21}
.ff23-express-toggle input:checked+.ff23-switch:before{transform:translateX(13px)}
.ff23-express-toggle input:focus-visible+.ff23-switch{outline:3px solid #2330ff;outline-offset:3px}
.ff23-pos-dialog .ff23-camera-window{aspect-ratio:1.42/1;max-height:400px;background:#0f1720;border-radius:21px;box-shadow:inset 0 0 0 1px #ffffff18}
.ff23-pos-dialog .ff22-scanner-reader video{height:100%!important;max-height:none!important;object-fit:cover!important}
.ff23-pos-dialog .ff22-camera-outline{width:52%;max-width:250px;border:1px solid #ffffff55;border-radius:18px;box-shadow:0 0 0 200px rgba(9,13,17,.3)}
.ff23-frame-hint{position:absolute;bottom:12%;left:0;right:0;text-align:center;color:#fff;font-size:10px;font-weight:900;letter-spacing:.12em;text-shadow:0 1px 6px #000}
.ff23-camera-corner{position:absolute;left:12px;top:12px;z-index:3;pointer-events:none;background:#171f29ae;border:1px solid #ffffff33;border-radius:9px;color:#fff;padding:7px 9px;font-size:10px;font-weight:800;letter-spacing:.035em;display:flex;gap:5px;align-items:center}
.ff23-pos-dialog .ff22-scan-line{background:#f7b25d;box-shadow:0 0 13px 2px #ef611e}
.ff23-pos-dialog .ff23-camera-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:13px 0 0}
.ff23-pos-dialog .ff23-camera-actions button,.ff23-pos-dialog .ff23-camera-actions label{display:flex;flex-direction:column;gap:4px;min-width:0;min-height:53px;font-size:11px;font-weight:800;padding:8px 3px;color:#513b2e;border-radius:12px;background:#fff;border:1px solid #eddccf}
.ff23-pos-dialog .ff23-camera-actions button i,.ff23-pos-dialog .ff23-camera-actions label i{font-size:17px;color:#e65c19}
.ff23-pos-dialog .ff23-camera-actions button:hover,.ff23-pos-dialog .ff23-camera-actions label:hover{background:#fff0e5;border-color:#f6b584}
.ff23-pos-dialog .ff23-manual{margin-top:12px;gap:8px}
.ff23-pos-dialog .ff23-manual input{font-size:13px;min-height:45px;background:#fff}
.ff23-pos-dialog .ff23-manual button{white-space:nowrap;display:flex;align-items:center;gap:7px}
.ff23-pos-dialog .ff23-scan-side{padding:20px 18px;display:flex;flex-direction:column;gap:13px;background:#fff8f1;border-radius:0;min-height:0;border-left:1px solid #f0e1d5}
.ff23-ticket-head{display:flex;gap:8px;align-items:start;justify-content:space-between}
.ff23-kicker{color:#ed6720;letter-spacing:.1em;font-size:10px;font-weight:950}
.ff23-ticket-head h3{margin:3px 0 0;font-size:21px;letter-spacing:-.04em;color:#201813}
.ff23-count{background:#fff;border:1px solid #f1decc;border-radius:40px;padding:8px 10px;color:#8d5836;font-size:11px;font-weight:900;white-space:nowrap}
.ff23-last-card{padding:12px;border-radius:15px;display:flex;align-items:center;gap:10px;background:#e8f8ed;border:1px solid #b5e5c5;color:#175334}
.ff23-last-icon{font-size:22px;flex:0 0 auto;color:#198f54}
.ff23-last-card div{flex:1;min-width:0}.ff23-last-card small{display:block;font-size:10px;opacity:.72}.ff23-last-card strong{display:block;font-size:13px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ff23-last-card>b{color:#137c43;background:#fff;border-radius:9px;padding:8px;font-size:17px}
.ff23-pop{animation:ff23-enter .22s ease-out}@keyframes ff23-enter{from{transform:translateY(-5px);opacity:.6}to{transform:translateY(0);opacity:1}}
.ff23-ticket-lines{display:grid;gap:1px;max-height:165px;overflow:auto;align-content:start}
.ff23-ticket-line{padding:9px 0;border-bottom:1px solid #f1e1d4;display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:12px}
.ff23-ticket-line span{max-width:62%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:#554239}
.ff23-ticket-line strong{white-space:nowrap;font-size:11px;color:#272019}
.ff23-ticket-empty{display:grid;place-items:center;gap:10px;min-height:82px;color:#9f8a7b;font-size:12px;text-align:center;line-height:1.5}
.ff23-ticket-empty i{font-size:26px;color:#d6b99c}
.ff23-ticket-footer{margin-top:auto;display:grid;gap:11px;border-top:1px solid #e8d7c7;padding-top:15px}
.ff23-ticket-footer>div:first-child{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.ff23-ticket-footer>div:first-child span{font-size:11px;font-weight:900;color:#827064}
.ff23-ticket-footer>div:first-child strong{font-size:26px;letter-spacing:-.06em;color:#e65c19;white-space:nowrap}
.ff23-ticket-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ff23-aux-btn{border:1px solid #efdbcb;background:#fff;color:#6d4025;border-radius:12px;padding:11px 6px;min-height:43px;cursor:pointer;font-weight:850;font-size:12px;display:flex;align-items:center;justify-content:center;gap:5px}
.ff23-aux-btn:hover:not(:disabled){border-color:#f36a21;background:#fff1e8}
.ff23-aux-btn:disabled{opacity:.5;cursor:not-allowed}
.ff23-pay-btn{background:#f36a21;border:0;color:white;font-weight:900;font-size:14px;min-height:49px;border-radius:13px;display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer;box-shadow:0 7px 20px #f36a2130}
.ff23-pay-btn:disabled{background:#d1b8a8;box-shadow:none;cursor:not-allowed}
.ff23-pos-dialog .ff23-scan-status{flex:none;display:flex;gap:8px;align-items:center;margin:0!important;border-radius:0;padding:12px 20px;border-top:1px solid #eaddd2;background:#fff;color:#6a503e;font-size:12px;min-height:45px}
.ff23-scan-status:before{content:'●';font-size:13px;color:#f36a21}
.ff23-scan-status[data-state='success']{color:#12693f;background:#eefaf2}.ff23-scan-status[data-state='success']:before{color:#18884f}
.ff23-scan-status[data-state='error']{color:#a02e20;background:#fff0eb}.ff23-scan-status[data-state='error']:before{color:#dd462f}
.ff23-scan-confirm{display:grid;gap:10px;background:#fff;border:1px solid #f0dfce;padding:12px;border-radius:14px}
.ff23-scan-confirm .ff22-scan-preview{padding:0;border:0;background:none}
.ff23-scan-confirm .ff22-scan-qty{font-size:12px;font-weight:800}
.ff23-row{display:flex;gap:8px}.ff23-row>button{flex:1;white-space:nowrap}
@media(max-width:830px){
 .ff23-pos-dialog{width:min(98vw,640px);max-height:calc(100dvh - 10px)}
 .ff23-pos-dialog .ff23-pos-shell{max-height:calc(100dvh - 10px);border-radius:19px}
 .ff23-pos-dialog .ff23-scan-body{grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;align-content:start;overflow-y:auto}
 .ff23-pos-dialog .ff23-camera-area{padding:13px}
 .ff23-pos-dialog .ff23-camera-window{aspect-ratio:1.5;max-height:290px}
 .ff23-pos-dialog .ff23-scan-side{border-left:0;border-top:1px solid #eed8c6;padding:13px;gap:10px}
 .ff23-ticket-footer{margin-top:0}
 .ff23-pos-dialog .ff23-scan-status{padding:10px 13px}
}
@media(max-width:480px){
 .ff23-pos-dialog{width:100%;max-width:none;max-height:100dvh;margin:auto 0 0}
 .ff23-pos-dialog .ff23-pos-shell{max-height:100dvh;height:min(100dvh,900px);border-radius:19px 19px 0 0}
 .ff23-pos-dialog .ff23-scan-head{padding:11px 13px;gap:6px}
 .ff23-head-main{gap:8px}.ff23-head-icon{width:37px;height:37px;flex-basis:37px;font-size:16px;border-radius:11px}
 .ff23-head-main strong{font-size:16px}.ff23-head-main small{font-size:10px}
 .ff23-online-status{padding:7px;font-size:0}.ff23-online-status span{display:none!important}.ff23-online-status i{font-size:11px}
 .ff23-pos-dialog .ff23-camera-window{aspect-ratio:2.05;max-height:175px}
 .ff23-pos-dialog .ff23-camera-area{padding:10px 12px}
 .ff23-scan-toolbar{margin-bottom:8px}.ff23-scan-toolbar small{display:none}
 .ff23-pos-dialog .ff23-camera-actions{gap:5px;margin-top:8px}.ff23-pos-dialog .ff23-camera-actions button,.ff23-pos-dialog .ff23-camera-actions label{min-height:44px;font-size:10px;padding:7px 2px}
 .ff23-pos-dialog .ff23-manual{margin-top:8px}.ff23-pos-dialog .ff23-manual input{min-height:39px}.ff23-pos-dialog .ff23-manual button{font-size:12px;padding:8px}
 .ff23-pos-dialog .ff23-scan-side{padding:10px 12px;gap:6px}
 .ff23-ticket-head h3{font-size:17px}.ff23-last-card{padding:7px 9px}
 .ff23-ticket-lines{max-height:62px}.ff23-ticket-empty{min-height:35px;display:flex;font-size:11px}.ff23-ticket-empty i{font-size:16px}
 .ff23-ticket-footer{gap:7px;padding-top:9px}.ff23-ticket-footer>div:first-child strong{font-size:22px}
 .ff23-aux-btn{min-height:36px;padding:7px 3px;font-size:11px}.ff23-pay-btn{min-height:43px}
 .ff23-pos-dialog .ff23-scan-status{padding:8px 12px;min-height:36px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){.ff23-pop,.ff23-online-status i{animation:none}}
:root[data-theme='dark'] .ff23-pos-dialog{color:#f7eee8}
:root[data-theme='dark'] .ff23-pos-dialog .ff23-pos-shell,:root[data-theme='dark'] .ff23-pos-dialog .ff23-scan-head{background:#101010;border-color:#303030}
:root[data-theme='dark'] .ff23-head-main strong,:root[data-theme='dark'] .ff23-scan-toolbar strong,:root[data-theme='dark'] .ff23-ticket-head h3{color:#fff}
:root[data-theme='dark'] .ff23-pos-dialog .ff23-scan-side{background:#1b1510;border-color:#3d3027}
:root[data-theme='dark'] .ff23-pos-dialog .ff23-scan-status{background:#141414;color:#eedbcc;border-color:#303030}
:root[data-theme='dark'] .ff23-express-toggle{background:#35251d;border-color:#66452f;color:#f7d7ba}
:root[data-theme='dark'] .ff23-aux-btn,:root[data-theme='dark'] .ff23-count,:root[data-theme='dark'] .ff23-pos-dialog .ff23-camera-actions button,:root[data-theme='dark'] .ff23-pos-dialog .ff23-camera-actions label{background:#29211c;border-color:#4c3a2e;color:#f2ded0}
:root[data-theme='dark'] .ff23-scan-confirm{background:#241c16;border-color:#4c3a2e}
:root[data-theme='dark'] .ff23-ticket-line{border-color:#4c3a2e}
:root[data-theme='dark'] .ff23-ticket-line span,:root[data-theme='dark'] .ff23-ticket-line strong{color:#f9f1e7}
:root[data-theme='dark'] .ff23-ticket-footer{border-color:#4c3a2e}
