@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');*{box-sizing:border-box}body{margin:0;background:#f3f5f8;color:#182536;font:14px 'Be Vietnam Pro',sans-serif}header{height:68px;background:#101c2b;color:#fff;display:flex;align-items:center;gap:16px;padding:0 24px;position:sticky;top:0;z-index:5;box-shadow:0 5px 22px #07152522}header button{display:none;background:none;border:0;color:white;font-size:25px}header .brand-logo{display:flex;align-items:center;height:58px;width:150px;flex:0 0 150px;overflow:hidden}header .brand-logo img{display:block;width:100%;height:100%;object-fit:contain;border-radius:5px}header span{margin-left:auto;color:#a9c4bb;font-size:11px}aside{width:245px;background:#101c2b;color:#c6d0dc;position:fixed;top:68px;bottom:0;padding:20px 14px;display:flex;flex-direction:column;z-index:7}.sidehead{font-size:10px;letter-spacing:2px;padding:5px 12px 14px;color:#8294a8}.sidehead button{display:none}nav{display:grid;gap:4px}nav button{background:none;border:0;text-align:left;color:#adbdce;padding:13px;border-radius:10px;font:500 12px inherit}nav button.active,nav button:hover{background:#20364d;color:white}footer{margin-top:auto;padding:16px 8px;color:#73869a;font-size:9px;border-top:1px solid #26384a}main{margin-left:245px;padding:28px;max-width:1600px}.page{display:none}.page.active{display:block}.heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.heading small{color:#b18445;font-size:9px;letter-spacing:2px;font-weight:700}.heading h1{font-size:27px;margin:7px 0 4px;letter-spacing:-1px}.heading p{margin:0;color:#84909d;font-size:11px}.gold,.soft{border:0;border-radius:9px;padding:12px 16px;font:700 11px inherit;cursor:pointer}.gold{background:linear-gradient(135deg,#e4c17f,#bd8b45);color:#17212d}.soft{background:#edf1f5;color:#41536a}.wide{width:100%;margin-top:10px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-bottom:16px}.stats article,.card{background:white;border:1px solid #e9edf1;border-radius:15px;padding:19px;box-shadow:0 10px 28px #1a30400a}.stats small{color:#84909d;font-size:10px}.stats strong{display:block;font-size:25px;margin-top:10px}.columns{display:grid;grid-template-columns:1.15fr .85fr;gap:15px}.card h2{font-size:14px;margin:0 0 16px}.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.quick button{background:#f7f9fb;border:1px solid #edf0f3;border-radius:11px;padding:14px 9px;text-align:left;color:#b18445;font-size:21px}.quick b,.quick small{display:block;color:#1b2938;font-size:10px;margin-top:9px}.quick small{color:#8a95a2;font-size:9px}.minitables{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.minitables span{background:#eaf6f1;color:#278365;border-radius:8px;padding:12px 4px;text-align:center;font-size:10px;font-weight:700}.sales{display:grid;grid-template-columns:1fr 330px;gap:15px}.sales .card:last-child{align-self:start;position:sticky;top:85px}input,select{width:100%;border:1px solid #e2e8ee;background:#fbfcfd;border-radius:8px;padding:11px;font:inherit;font-size:11px;margin:5px 0 12px}label{display:block;font-size:10px;color:#647386;margin:10px 0 4px}.cats,.choices{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}.cats button,.choices button{border:1px solid #e3e8ee;background:white;padding:8px 12px;border-radius:20px;font-size:10px}.cats button.active,.choices button.selected{background:#14263a;color:white;border-color:#14263a}.products{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.product{border:1px solid #e9edf1;border-radius:11px;background:white;padding:13px;text-align:left;min-height:95px}.product b{display:block;font-size:11px}.product small{display:block;color:#a77b3f;margin-top:9px;font-weight:700}.cart{min-height:130px;color:#8995a2;font-size:11px}.cartline{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #eef1f4;font-size:10px}.sum{border-top:1px dashed #ddd;padding-top:14px;display:flex;justify-content:space-between}.tablegrid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.tablegrid button{border:1px solid #dcefe7;background:#f0faf6;border-radius:12px;padding:22px;color:#267b60;font-weight:700}.tablegrid button.busy{background:#fff5e9;border-color:#f0d9bd;color:#bd7e3a}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;min-width:520px}th{text-align:left;font-size:9px;color:#8995a2;letter-spacing:1px;padding:12px;border-bottom:1px solid #edf0f3}td{padding:12px;border-bottom:1px solid #f0f2f5;font-size:11px}.note{background:#fff8eb;color:#8b7049;border:1px solid #f1e4cb;border-radius:9px;padding:12px;font-size:10px;line-height:1.6}.previews{display:flex;gap:7px;flex-wrap:wrap}.previews img{width:65px;height:65px;object-fit:cover;border-radius:8px}.receipt{max-width:300px;margin:auto;border:1px dashed #ccd2d8;padding:20px;font:11px monospace;line-height:2;text-align:left}.receipt b,.receipt small{display:block;text-align:center}.receipt small{font-size:9px;color:#777}.modal{display:none;position:fixed;inset:0;background:#07111caa;z-index:20;align-items:flex-start;justify-content:center;padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.modal.show{display:flex}.modalbox{background:white;border-radius:16px;padding:22px;width:min(430px,100%);position:relative;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:0 0 auto;margin:auto 0}.x{position:absolute;right:15px;top:12px;border:0;background:none;font-size:24px}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#14263a;color:white;border-radius:9px;padding:12px 18px;display:none;font-size:11px;z-index:30}.shade{display:none}
@media(max-width:850px){.stats{grid-template-columns:repeat(2,1fr)}.columns{grid-template-columns:1fr}.sales{grid-template-columns:1fr}.sales .card:last-child{position:static}.quick{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){header{height:60px;padding:0 14px}header button{display:block}header .brand-logo{width:126px;height:54px;flex-basis:126px}aside{top:0;left:0;bottom:0;width:min(82vw,300px);transform:translateX(-105%);transition:.22s;padding-top:24px;z-index:12}aside.open{transform:translateX(0)}.sidehead{display:flex;justify-content:space-between;align-items:center}.sidehead button{display:block;border:0;background:none;color:white;font-size:24px}main{margin:0;padding:19px 13px 35px}.heading{align-items:flex-start}.heading h1{font-size:23px}.heading .gold{font-size:10px;padding:10px}.stats{gap:8px}.stats article{padding:14px}.stats strong{font-size:21px}.products{grid-template-columns:repeat(2,1fr)}.tablegrid{grid-template-columns:repeat(3,1fr)}.quick{grid-template-columns:repeat(2,1fr)}.shade.show{display:block;position:fixed;inset:0;background:#07111c88;z-index:10}}

.heading-actions{display:flex;gap:8px;align-items:center}.bulk-help{font-size:11px;color:#7b8795;line-height:1.7;background:#f6f8fa;border-radius:9px;padding:10px;margin:10px 0}.bulk-preview{max-height:38vh;max-height:38dvh;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border:1px solid #edf0f3;border-radius:9px;margin-top:10px}.bulk-preview table{min-width:460px}.bulk-preview input,.bulk-preview select{margin:0;padding:7px;font-size:10px}
@media(max-width:650px){.heading-actions{flex-direction:column;align-items:stretch}.heading-actions button{white-space:nowrap}}

/* AI menu import */
.heading-actions{display:flex;gap:8px;flex-wrap:wrap}.ai-import-layout{display:grid;grid-template-columns:minmax(270px,.78fr) minmax(0,1.22fr);gap:16px;align-items:start}.ai-step{display:flex;gap:12px;align-items:center;margin-bottom:18px}.ai-step>span{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#f5ead8;color:#a77836;font-weight:800;font-size:12px}.ai-step h2{margin:0;font-size:14px}.ai-step p{margin:4px 0 0;color:#8793a1;font-size:10px}.ai-dropzone{border:1.5px dashed #d6bf9a;border-radius:14px;background:#fffcf6;min-height:178px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-align:center;padding:18px}.ai-dropzone:hover,.ai-dropzone.dragover{border-color:#bd8b45;background:#fff8eb}.ai-cloud{width:46px;height:46px;border-radius:14px;background:#f5ead8;color:#a77836;display:grid;place-items:center;font-size:28px;font-weight:700}.ai-dropzone strong{font-size:12px}.ai-dropzone span{font-size:10px;color:#7e8a98}.ai-dropzone small{font-size:8px;color:#9aa4af;letter-spacing:.04em}.ai-file-list{display:grid;gap:7px;margin-top:12px}.ai-empty-files{color:#9aa4af;font-size:10px;text-align:center;padding:12px}.ai-file{display:flex;align-items:center;gap:9px;background:#f7f9fb;padding:9px;border:1px solid #edf0f3;border-radius:9px}.ai-file-icon{width:32px;height:32px;border-radius:8px;background:#eaf0f6;display:grid;place-items:center;color:#52677e;font-size:10px;font-weight:800}.ai-file-info{min-width:0;flex:1}.ai-file-info b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-file-info small{display:block;color:#8d98a5;font-size:9px;margin-top:3px}.ai-file button{border:0;background:transparent;color:#a4adb7;font-size:18px;cursor:pointer}.ai-upload-actions{display:flex;gap:8px;margin-top:12px}.ai-upload-actions button:first-child{flex:0 0 auto}.ai-upload-actions button:last-child{flex:1}.ai-status{margin-top:12px;border-radius:9px;padding:11px;background:#f3f6f9;color:#6f7e8f;font-size:10px;line-height:1.6}.ai-status.loading{background:#fff8eb;color:#986f36}.ai-status.error{background:#fff0ef;color:#b84d48}.ai-status.success{background:#edf8f3;color:#258262}.ai-review-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.ai-count{font-size:9px;font-weight:700;color:#a77c40;background:#f7f0e5;padding:7px 9px;border-radius:20px;white-space:nowrap}.ai-review-empty{min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#93a0ad;text-align:center;gap:8px}.ai-review-empty div{font-size:32px;color:#c79a58}.ai-review-empty b{font-size:12px;color:#647386}.ai-review-empty span{font-size:10px}.ai-category-block{border:1px solid #e9edf1;border-radius:12px;margin:12px 0;overflow:hidden}.ai-category-head{display:flex;align-items:center;gap:10px;background:#f7f9fb;padding:11px}.ai-category-head input{margin:0;flex:1;font-weight:800;min-width:80px}.ai-category-head small{color:#8a96a3;font-size:9px;white-space:nowrap}.ai-items-table{width:100%;min-width:610px;border-collapse:collapse}.ai-items-table th{font-size:8px;padding:9px}.ai-items-table td{padding:8px 7px;vertical-align:middle}.ai-items-table input[type=text],.ai-items-table input[type=number],.ai-items-table select{margin:0;padding:8px;font-size:10px;min-width:70px}.ai-items-table .ai-name{min-width:145px}.ai-confidence{font-size:8px;border-radius:5px;padding:4px 5px;background:#eaf6f0;color:#278160;white-space:nowrap}.ai-confidence.medium{background:#fff6e7;color:#b17b32}.ai-confidence.low{background:#fff0ef;color:#ba5750}.ai-row-remove{border:0;background:transparent;color:#b45a52;cursor:pointer}.ai-review-footer{border-top:1px solid #edf0f3;margin-top:14px;padding-top:13px;display:flex;align-items:center;justify-content:space-between;gap:10px}.ai-select-all{display:flex;align-items:center;gap:6px;font-size:10px;color:#69788a;white-space:nowrap}.ai-review-footer button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:900px){.ai-import-layout{grid-template-columns:1fr}.ai-review-empty{min-height:150px}}
@media(max-width:650px){.heading-actions{width:100%}.heading-actions button{flex:1}.ai-review-footer{align-items:stretch;flex-direction:column}.ai-review-footer button{width:100%}.ai-upload-actions{flex-direction:column}.ai-upload-actions button{width:100%}}

/* Kitchen display */
.kitchen-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:0 0 15px}.kitchen-stats>div{background:#fff;border:1px solid #e9edf1;border-radius:12px;padding:14px 16px}.kitchen-stats b{display:block;font-size:23px;color:#192b3e}.kitchen-stats span{display:block;font-size:10px;color:#8793a1;margin-top:4px}.kitchen-board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.kitchen-ticket{background:#fff;border:1px solid #e6ebef;border-radius:14px;padding:15px;box-shadow:0 8px 24px #1a30400a}.ticket-head,.ticket-foot{display:flex;justify-content:space-between;align-items:center;gap:10px}.ticket-head>div b{display:block;font-size:15px}.ticket-head small{display:block;color:#8a96a3;font-size:9px;margin-top:4px}.kitchen-status{font-size:9px;font-weight:800;padding:6px 9px;border-radius:20px;white-space:nowrap}.kitchen-status.fresh{background:#fff4df;color:#a86e1f}.kitchen-status.doing{background:#eaf2ff;color:#3d6da9}.kitchen-status.ready{background:#e8f7ef;color:#27815e}.ticket-items{border-top:1px solid #edf0f3;border-bottom:1px solid #edf0f3;margin:13px 0;padding:8px 0}.ticket-items>div{display:flex;gap:9px;padding:7px 0;font-size:12px}.ticket-items>div>b{color:#a77939;min-width:32px}.ticket-items>div>span{font-weight:650}.ticket-foot small{color:#8995a2;font-size:9px}.ticket-foot button{font-size:10px;padding:10px 12px}.kitchen-empty{grid-column:1/-1;display:flex;flex-direction:column;gap:7px}.kitchen-empty span{font-size:11px;color:#8995a2}
@media(max-width:650px){.kitchen-board{grid-template-columns:1fr}.kitchen-stats{gap:7px}.kitchen-stats>div{padding:11px}.kitchen-stats b{font-size:20px}.ticket-head>div b{font-size:14px}}

/* Business reports */
.report-filter{display:flex;align-items:end;gap:12px;margin-bottom:14px;flex-wrap:wrap}.report-filter>div{min-width:155px}.report-filter label{display:block;margin-bottom:6px}.report-filter input{margin:0}.report-filter button{min-width:92px}.report-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.report-stats article{padding:17px 18px}.report-stats small{display:block;color:#8995a2;font-size:9px;font-weight:800;letter-spacing:.8px}.report-stats strong{display:block;color:#172b40;font-size:clamp(20px,2.3vw,28px);margin:10px 0 5px}.report-stats span{display:block;color:#8995a2;font-size:10px}.report-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}.report-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.report-card-head h2{margin:0}.report-card-head small{color:#8b97a4;font-size:10px}.top-dishes{display:grid;gap:12px}.top-dish{display:flex;align-items:flex-start;gap:10px}.top-rank{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#f4eee4;color:#9c7136;font-size:11px;font-weight:800;flex:none}.top-info{flex:1;min-width:0}.top-info>b{display:block;font-size:12px;color:#203348}.top-info>small{display:block;color:#8995a2;font-size:10px;margin:4px 0 7px}.top-bar,.daily-track{height:7px;background:#eef1f4;border-radius:10px;overflow:hidden}.top-bar i,.daily-track i{display:block;height:100%;border-radius:10px;background:#c99a55}.daily-revenue{display:grid;gap:14px}.daily-row{display:grid;grid-template-columns:68px minmax(50px,1fr) auto;gap:9px;align-items:center}.daily-row>span{font-size:10px;color:#718093}.daily-row>b{font-size:10px;color:#26394d;white-space:nowrap}.report-transactions .tablewrap{margin-top:6px}.report-empty{font-size:11px;color:#8a96a3;padding:12px 0}.report-transactions td{white-space:nowrap}
@media(max-width:850px){.report-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.report-grid{grid-template-columns:1fr}}
@media(max-width:650px){.report-filter{align-items:stretch}.report-filter>div{flex:1;min-width:calc(50% - 8px)}.report-filter button{flex:1}.report-stats{gap:8px}.report-stats article{padding:13px}.report-stats strong{font-size:20px}.report-card-head{align-items:flex-start}.report-card-head h2{font-size:14px}.report-transactions .report-card-head{flex-direction:column}.report-transactions .report-card-head button{width:100%}.heading #exportReport{width:100%}}

.bank-preview{margin-top:14px;padding:14px;border:1px dashed #cbd5e1;border-radius:12px;text-align:center;background:#f8fafc}.bank-preview img{width:190px;max-width:100%;height:auto;display:block;margin:10px auto}.bank-preview small{display:block;color:#64748b}
/* Quantity-first ordering and order adjustments */
.product{display:flex;flex-direction:column;gap:7px;cursor:default}
.product-actions{display:flex;align-items:center;gap:7px;margin-top:auto}
.product-actions .product-qty{width:68px;min-width:0;margin:0;padding:9px 6px;text-align:center;font-size:14px;font-weight:700}
.product-actions .add-qty{flex:1;border:0;border-radius:8px;background:#14263a;color:#fff;padding:10px 8px;font:700 12px inherit;cursor:pointer}
.cartline{gap:10px;align-items:center}
.cartline>span{flex:1;min-width:0}
.cartline>span small{display:block;color:#8a95a2;margin-top:3px}
.cartline-actions{display:flex;align-items:center;gap:6px}
.cartline-actions input{width:64px;margin:0;padding:7px 5px;text-align:center;font-size:13px;font-weight:700}
.cartline-actions b{white-space:nowrap}
.cartline-actions button{border:0;border-radius:7px;background:#fff0ee;color:#b94b40;padding:6px 9px;font-size:16px}
#modalContent td button{margin:2px;padding:7px 9px;font-size:10px}
@media(max-width:650px){.product-actions .product-qty{width:62px}.cartline{align-items:flex-start}.cartline-actions{flex-wrap:wrap;justify-content:flex-end}.cartline-actions input{width:58px}}

/* Active table session UI */
.tablegrid button{display:flex;flex-direction:column;align-items:center;gap:5px;min-height:105px;cursor:pointer}.tablegrid button small{font-size:10px;font-weight:600}.table-live-meta{color:#7b5a2d!important;font-weight:800!important}.table-session-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:9px;margin-top:12px}.table-session-actions button{min-height:44px}.tablegrid button.busy{background:#fff3e3;border-color:#e9c99f;color:#9b642b}
@media(max-width:650px){.tablegrid{grid-template-columns:repeat(2,minmax(0,1fr))}.table-session-actions{grid-template-columns:1fr}.tablegrid button{min-height:94px}}


/* ===== Mobile-first refinement: Ốc Phương POS ===== */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
button,input,select,textarea{font:inherit}
button{touch-action:manipulation}
img{max-width:100%}
@media(max-width:650px){
  body{font-size:14px;overflow-x:hidden}
  header{height:58px;padding:0 12px;gap:10px}
  header button{display:grid;place-items:center;width:40px;height:40px;border-radius:10px}
  header .brand-logo{width:118px;height:48px;flex:0 0 118px}
  header span{font-size:10px;white-space:nowrap}
  aside{top:0;left:0;bottom:0;width:min(84vw,310px);padding:14px 12px;transform:translateX(-105%);transition:transform .22s ease;box-shadow:none;z-index:20;overflow-y:auto}
  aside.open{transform:translateX(0);box-shadow:15px 0 40px #07152544}
  .shade{position:fixed;inset:0;background:#07152580;z-index:19;display:none}
  .shade.show{display:block}
  .sidehead{display:flex;align-items:center;justify-content:space-between;padding:8px 10px 14px}
  .sidehead button{display:block;background:transparent;border:0;color:#fff;font-size:25px;padding:4px 10px}
  nav{gap:5px}
  nav button{min-height:45px;padding:12px 13px;font-size:13px}
  main{margin:0;padding:15px 12px 90px;width:100%;max-width:none}
  .heading{align-items:flex-start;flex-direction:column;gap:12px;margin-bottom:15px}
  .heading h1{font-size:23px;line-height:1.2}
  .heading p{font-size:12px;line-height:1.5}
  .heading>.gold,.heading-actions{width:100%}
  .heading-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .heading-actions button,.heading>.gold{min-height:44px;width:100%;white-space:normal}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
  .stats article,.card{padding:14px;border-radius:13px}
  .stats small{font-size:10px;line-height:1.4}
  .stats strong{font-size:21px;margin-top:7px;overflow-wrap:anywhere}
  .columns{grid-template-columns:1fr;gap:10px}
  .quick{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .quick button{min-height:104px;padding:12px}
  .minitables{grid-template-columns:repeat(3,minmax(0,1fr))}
  .sales{grid-template-columns:minmax(0,1fr);gap:10px}
  .sales .card{min-width:0}
  .sales .card:last-child{position:static;top:auto}
  .products{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .product{min-width:0;padding:11px;min-height:116px}
  .product b{font-size:12px;line-height:1.4;overflow-wrap:anywhere}
  .product small{font-size:11px}
  .product-actions{gap:5px}
  .product-actions .product-qty{width:58px;min-height:40px;font-size:14px}
  .product-actions .add-qty{min-height:40px;font-size:11px}
  #search,#menuSearch,input,select,textarea{font-size:16px;min-height:42px}
  .cats{flex-wrap:nowrap;overflow-x:auto;padding:2px 0 8px;scrollbar-width:thin}
  .cats button{flex:0 0 auto;min-height:38px}
  .cart{min-height:70px}
  .cartline{font-size:12px;gap:7px}
  .cartline-actions input{min-height:38px;font-size:16px}
  .cartline-actions button{min-height:36px}
  .sum{font-size:14px}
  .wide,.gold,.soft{min-height:44px;font-size:13px}
  .tablegrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tablegrid button{min-height:90px;padding:13px 8px}
  .tablewrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  table{min-width:560px}
  th,td{padding:10px 8px}
  .report-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .report-stats article{padding:12px}
  .report-stats strong{font-size:18px}
  .report-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .report-filter>div{min-width:0}
  .report-filter button{min-height:42px}
  .report-grid{grid-template-columns:1fr;gap:10px}
  .kitchen-board{grid-template-columns:1fr}
  .kitchen-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .kitchen-stats>div{padding:9px 7px}
  .kitchen-stats b{font-size:17px}
  .kitchen-stats span{font-size:9px}
  .ai-upload-actions{display:grid;grid-template-columns:1fr}
  .ai-upload-actions button{width:100%;min-height:44px}
  .ai-dropzone{padding:20px 12px}
  .ai-file-list{max-width:100%;overflow-wrap:anywhere}
  .bank-preview img{width:210px}
  #modalContent{max-width:calc(100vw - 24px);max-height:85dvh;overflow:auto}
  #modalContent table{min-width:480px}
}
@media(min-width:390px) and (max-width:650px){
  .products{grid-template-columns:repeat(2,minmax(0,1fr))}
  .heading-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:360px){
  main{padding-left:9px;padding-right:9px}
  .stats article,.card{padding:11px}
  .stats strong{font-size:18px}
  .products{grid-template-columns:1fr}
  .heading h1{font-size:21px}
}

/* Authentication and role controls */
[hidden]{display:none!important}.auth-overlay{position:fixed;inset:0;z-index:100;background:#0b1725ee;display:grid;place-items:center;padding:18px}.auth-card{width:min(420px,100%);background:#fff;border-radius:18px;padding:28px;box-shadow:0 25px 80px #0005}.auth-mark{font-weight:800;letter-spacing:3px;color:#b18445;font-size:12px}.auth-card h1{font-size:24px;margin:12px 0 6px}.auth-card p{color:#778493;font-size:12px;line-height:1.6}.auth-card label{display:block;margin:15px 0 5px}.auth-card input{font-size:15px;min-height:44px}.auth-error{color:#b33!important;min-height:18px}.header-logout{display:block!important;border:1px solid #64758a;border-radius:8px;background:transparent;color:#fff;padding:8px 12px;font-size:11px;cursor:pointer}.staff-create{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px;align-items:end}.staff-create label{margin:0}.staff-create input{margin-bottom:0}.employee-hidden{display:none!important}
@media(max-width:850px){.staff-create{grid-template-columns:1fr 1fr}.staff-create button{min-height:44px}}
@media(max-width:550px){.staff-create{grid-template-columns:1fr}.header-logout{padding:7px 8px;font-size:10px}}

/* POS detail modal: desktop full-width table, mobile horizontal scroll */
@media (min-width: 851px) {
  .modal { align-items:center; justify-content:center; padding:24px; }
  .modalbox { width:min(1080px, calc(100vw - 48px)); max-width:1080px; max-height:88vh; padding:28px 32px 24px; overflow:auto; }
  #modalContent { width:100%; max-width:100%; min-width:0; }
  #modalContent .tablewrap { width:100%; max-width:100%; overflow:visible; }
  #modalContent .order-items-wrap { overflow-x:visible; }
  #modalContent .order-items-table { width:100%; min-width:0; table-layout:fixed; }
  #modalContent .order-items-table th:nth-child(1), #modalContent .order-items-table td:nth-child(1) { width:30%; }
  #modalContent .order-items-table th:nth-child(2), #modalContent .order-items-table td:nth-child(2) { width:8%; text-align:center; }
  #modalContent .order-items-table th:nth-child(3), #modalContent .order-items-table td:nth-child(3) { width:15%; white-space:nowrap; }
  #modalContent .order-items-table th:nth-child(4), #modalContent .order-items-table td:nth-child(4) { width:17%; white-space:nowrap; }
  #modalContent .order-items-table th:nth-child(5), #modalContent .order-items-table td:nth-child(5) { width:30%; }
  #modalContent .order-items-table td:nth-child(5) { white-space:normal; }
  #modalContent .order-items-table td button { margin:3px 5px 3px 0; min-height:38px; white-space:nowrap; }
  .table-session-actions { grid-template-columns:minmax(200px,.8fr) minmax(260px,1.2fr); gap:12px; }
}
@media (max-width: 850px) {
  .modalbox { width:min(96vw, 620px); max-width:96vw; }
  .order-items-wrap { width:100%; max-width:100%; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; }
  .order-items-table { width:760px; min-width:760px; table-layout:fixed; }
  .order-items-table th, .order-items-table td { white-space:nowrap; }
  .order-items-table th:nth-child(1), .order-items-table td:nth-child(1) { width:190px; white-space:normal; }
  .order-items-table th:nth-child(2), .order-items-table td:nth-child(2) { width:55px; }
  .order-items-table th:nth-child(3), .order-items-table td:nth-child(3) { width:115px; }
  .order-items-table th:nth-child(4), .order-items-table td:nth-child(4) { width:125px; }
  .order-items-table th:nth-child(5), .order-items-table td:nth-child(5) { width:275px; }
  .order-items-table td:nth-child(5) button { white-space:nowrap; display:inline-block; margin:2px 4px 2px 0; }
}
.staff-create { grid-template-columns:repeat(4,minmax(0,1fr)) auto; }
@media(max-width:850px){.staff-create{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-create button{min-height:44px}}
@media(max-width:550px){.staff-create{grid-template-columns:1fr}}
