/* Shared application foundations. Marketing keeps its authored composition. */
#app.owner-app .ui-page-body[data-page="shift"],#app.owner-app .ui-page-body[data-page="reviews"]{grid-template-columns:minmax(0,1fr)!important}
#app [data-live-cash]{display:grid;gap:18px;min-width:0}#app [data-live-cash]>.panel{margin:0;min-width:0}
#app .handover-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:0;background:transparent;border:0}#app .handover-filters label{min-width:0}#app .handover-filters>button{margin:0;width:auto;justify-self:start}
#app dialog.handover-dialog{width:min(760px,calc(100vw - 32px));scrollbar-width:none}#app dialog.handover-dialog::-webkit-scrollbar{display:none}#app .handover-photos{display:flex;gap:10px;flex-wrap:wrap}#app .handover-photos img{width:110px;height:90px;object-fit:cover;border-radius:8px;border:1px solid var(--ui-border)}#app .handover-table table{min-width:780px}
@media(max-width:700px){#app .handover-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){#app .handover-filters{grid-template-columns:minmax(0,1fr)}}
#app.owner-app .ui-page-body[data-page="requests"]{grid-template-columns:minmax(0,1fr)!important}#app .ui-page-body[data-page="requests"]{gap:18px}#app .ui-page-body[data-page="requests"]>.panel{margin:0;min-width:0}
#app .requests-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:0;border:0;background:transparent}#app .requests-filters label{min-width:0}#app .requests-filters>button{width:auto;justify-self:start;margin:0}
#app .request-details{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:10px 16px;font-size:14px}#app .request-details dt{color:var(--ui-muted)}#app .request-details dd{margin:0;overflow-wrap:anywhere}#app .request-details small{display:block;color:var(--ui-muted)}#app .request-actions{display:flex;gap:10px;flex-wrap:wrap}#app .request-actions form{padding:0;border:0;background:transparent;margin:0}#app .request-actions button{width:auto;margin:0}#app .requests-table table{min-width:760px}
@media(max-width:700px){#app .requests-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#app .request-details{grid-template-columns:minmax(0,1fr);gap:5px}#app .request-details dd{margin-bottom:8px}}
#app.owner-app .ui-page-body[data-page="payroll"]{grid-template-columns:minmax(0,1fr)!important}
#app .ui-page-body[data-page="payroll"]{gap:18px}#app .ui-page-body[data-page="payroll"]>.panel{margin:0;min-width:0}
#app .payroll-filters{display:flex;gap:12px;flex-wrap:wrap;align-items:end}#app .payroll-filters form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;flex:1;padding:0;margin:0;border:0;background:transparent}#app .payroll-filters label{min-width:160px;flex:1}#app .payroll-filters button{width:auto;margin:0}
#app .payroll-top-actions{display:flex;gap:8px;flex-wrap:wrap}#app .payroll-top-actions button{width:auto;margin:0;min-height:36px;padding:8px 12px}
#app .payroll-steps{display:grid;gap:10px}#app .payroll-steps button{width:100%;margin:0;text-align:left;white-space:normal}#app .payroll-status-filter{max-width:380px}#app .payroll-status-filter form{display:flex;gap:10px;align-items:end;margin:0;padding:0;border:0;background:transparent}#app .payroll-status-filter label{flex:1}#app .payroll-status-filter button{width:auto;margin:0}
#app .payroll-slip{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;font-size:14px}#app .payroll-slip dt{color:var(--ui-muted)}#app .payroll-slip dd{margin:0;font-weight:700;text-align:right}
#app.owner-app .ui-page-body[data-page="finance"]{grid-template-columns:minmax(0,1fr)!important}#app [data-live-cashbook]{display:grid;gap:18px;min-width:0}#app [data-live-cashbook] .panel{margin:0;min-width:0}
#app .cashbook-create-buttons{display:flex;gap:8px;flex-wrap:wrap}#app .cashbook-create-buttons button{margin:0;width:auto}
#app .cashbook-in,#app .cashbook-in strong{color:#86efac}#app .cashbook-out,#app .cashbook-out strong{color:#fdba74}#app .sales-metrics .cashbook-net strong{color:var(--ui-ink)}
#app .cashbook-legend{display:flex;gap:18px;font-size:12px;margin:0 0 10px}#app button.cashbook-chart-bar{height:185px;min-height:0;display:flex;align-items:end;gap:3px;width:100%;padding:0!important;margin:0;background:transparent!important;border:0!important;box-shadow:none!important;transform:none!important}#app .cashbook-chart-bar span{flex:1;min-height:2px;border-radius:5px 5px 0 0}#app .cashbook-in-bar{background:#4ade80}#app .cashbook-out-bar{background:#fb923c}#app .cashbook-chart-bar:hover span{filter:brightness(1.2)}
#app .cashbook-history-filters form{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0;padding:0;border:0;background:transparent}#app .cashbook-history-filters label{flex:1;min-width:140px}#app .cashbook-history-filters button{width:auto;margin:0}#app .cashbook-kind{display:inline-block;font-size:12px;font-weight:700;padding:4px 8px;border:1px solid currentColor;border-radius:20px}
#app.owner-app .ui-page-body[data-page="report"]{grid-template-columns:minmax(0,1fr)!important}
#app [data-live-sales]{min-width:0;display:grid;gap:18px}#app [data-live-sales] .panel{margin:0;min-width:0}
#app .sales-filter{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:0;padding:0;border:0;background:transparent}#app .sales-filter label{flex:1;min-width:160px}#app .sales-filter button{width:auto;margin:0}
#app .sales-presets,#app .sales-tabs{display:flex;gap:8px;flex-wrap:wrap}#app .sales-presets{margin-top:12px}#app .sales-presets button,#app .sales-tabs button{width:auto;margin:0;min-height:36px;padding:7px 14px}
#app .sales-tabs button[aria-current="page"]{background:#f9731626;color:#fed7aa;border-color:#fb923c}
#app .sales-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}#app .sales-metrics article{padding:20px;background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:16px;min-width:0}#app .sales-metrics small{display:block;color:var(--ui-muted);font-size:12px}#app .sales-metrics strong{display:block;font-size:clamp(18px,2vw,27px);margin-top:7px;overflow-wrap:anywhere}#app .sales-metrics article:first-child strong{color:#fdba74}
#app .sales-note{font-size:12px;color:var(--ui-muted);margin:0}#app .sales-charts{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px;align-items:start}
#app .sales-chart-scale{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:var(--ui-muted)}#app .sales-column-chart{display:flex;gap:8px;align-items:end;min-height:225px;overflow-x:auto;padding:8px 0;scrollbar-width:none}#app .sales-column-chart::-webkit-scrollbar{display:none}
#app .sales-chart-column{flex:1;min-width:23px;max-width:80px;text-align:center}#app .sales-chart-column small{display:block;font-size:10px;white-space:nowrap;transform:none}#app button.sales-chart-bar{height:185px;min-height:0;position:relative;display:flex;align-items:end;padding:0!important;width:100%;margin:0;border:0!important;border-radius:7px;background:transparent!important;box-shadow:none!important;transform:none!important}#app .sales-chart-bar span{display:block;height:var(--bar-height);min-height:2px;width:100%;background:linear-gradient(#fdba74,#f97316);border-radius:6px 6px 0 0}#app .sales-chart-bar:hover span{background:#fed7aa}
#app .sales-payment{padding:12px 0}#app .sales-payment>div{display:flex;justify-content:space-between;gap:10px}#app .sales-payment meter{display:block;width:100%;height:18px;margin:8px 0;accent-color:#fb923c}#app .sales-payment small{font-size:12px}
#app .sales-table{overflow:auto}#app .sales-table table{width:100%;border-collapse:collapse;font-size:13px;min-width:420px}#app .sales-table td,#app .sales-table th{text-align:left;padding:12px 8px;border-bottom:1px solid var(--ui-border);vertical-align:top}#app .sales-table th{background:var(--ui-raised);color:var(--ui-ink)}#app .sales-table td small{display:block;color:var(--ui-muted);font-size:11px;margin-top:4px}
#app .sales-best>div{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--ui-border)}#app .sales-best>div>span{color:#fdba74;font-size:14px}#app .sales-best>div>div{flex:1;min-width:0}#app .sales-best strong{display:block;font-size:13px}#app .sales-best small{font-size:11px}#app .sales-best b{font-size:13px;white-space:nowrap}#app .sales-empty{padding:14px;border:1px dashed var(--ui-border);border-radius:12px;color:var(--ui-muted);margin:0}
@media(max-width:1000px){#app .sales-charts{grid-template-columns:minmax(0,1fr)}}@media(max-width:640px){#app .sales-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#app .sales-metrics article{padding:14px}#app .sales-filter label{min-width:130px}#app .sales-chart-scale{flex-wrap:wrap}}
#app [data-product-filter]{max-width:420px;margin:0;padding:0;background:transparent;border:0}
#app .product-table table{min-width:0;width:100%;table-layout:fixed}#app .product-table th,#app .product-table td{overflow-wrap:anywhere;white-space:normal}#app .product-table .catalog-identity strong{min-width:0}#app .product-table .catalog-actions{gap:6px;align-items:start}
@media(max-width:700px){#app .product-table thead{display:none}#app .product-table table,#app .product-table tbody,#app .product-table tr,#app .product-table td{display:block;width:100%;box-sizing:border-box}#app .product-table tr{padding:10px;border-bottom:1px solid var(--ui-border)}#app .product-table td{padding:5px;border:0}#app .product-table td:nth-child(3)::before{content:'Giá: ';color:var(--ui-muted)}#app .product-table td:nth-child(4)::before{content:'Trừ tồn: ';color:var(--ui-muted)}}
#app .current-stock-table table{min-width:0;width:100%;table-layout:fixed}#app .current-stock-table td,#app .current-stock-table th{overflow-wrap:anywhere}#app .current-stock-table .person-link{white-space:normal;text-align:left;max-width:100%}
#app [data-stock-filter]{max-width:420px;margin:0;padding:0;background:transparent;border:0}
#app.owner-app .ui-page-body[data-page="inventory-report"]{grid-template-columns:minmax(0,1fr)!important}
#app .ui-page-body[data-page="stock"]>.panel{grid-column:1/-1}
#app .inventory-actions{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;position:sticky;top:76px;z-index:15;padding:14px 18px;background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:14px;box-shadow:0 8px 24px #08111d33}
#app .inventory-actions>div{display:flex;gap:10px;flex-wrap:wrap}#app .inventory-actions button{margin:0;width:auto}
#app .inventory-report{grid-column:1/-1;min-width:0;display:grid;gap:20px}#app .inventory-report .panel{margin:0}
#app .inventory-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}#app .inventory-filters label{min-width:180px;flex:1}#app .inventory-filters button{width:auto;margin:0}
#app .inventory-report .schedule-table table{min-width:600px}#app .inventory-report .inventory-damage{color:#fdba74;font-weight:700}
@media(max-width:640px){#app .inventory-actions{top:60px}#app .inventory-actions>div{width:100%}#app .inventory-actions button{flex:1}}
#app .schedule-table.checklist-table{overflow:visible;min-width:0}
#app .schedule-table.checklist-table table{min-width:0;width:100%;table-layout:fixed}
#app .checklist-table th,#app .checklist-table td{overflow-wrap:anywhere;white-space:normal}
#app .checklist-table .person-link{max-width:100%;white-space:normal;text-align:left}
#app .checklist-table .schedule-status{white-space:normal;margin-bottom:4px}
@media(max-width:640px){#app .checklist-table thead{display:none}#app .checklist-table table,#app .checklist-table tbody,#app .checklist-table tr,#app .checklist-table td{display:block;width:100%;box-sizing:border-box}#app .checklist-table tr{padding:10px;border-bottom:1px solid var(--ui-border)}#app .checklist-table td{border:0;padding:5px}#app .checklist-table td:nth-child(3)::before{content:'Ngày: ';color:var(--ui-muted)}#app .checklist-table td:nth-child(4)::before{content:'Tổng: ';color:var(--ui-muted)}}
#app .checklist-job-list article.checklist-job{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
#app .checklist-job-actions{display:flex;gap:8px;grid-column:1/-1}#app .checklist-job-actions button{width:auto;min-height:32px;padding:5px 12px;margin:0}
#app .checklist-job-editor{grid-column:1/-1;text-align:left!important}#app .checklist-job-editor[hidden]{display:none}#app .checklist-job-editor form{margin:0;padding:12px}#app .checklist-job-info{min-width:0;overflow-wrap:anywhere}
#app .checklist-delete-confirm{display:flex;align-items:center;gap:8px}#app .checklist-delete-confirm input{width:18px;min-height:18px;height:18px;flex:none}
#app dialog.checklist-person-dialog{width:min(760px,calc(100vw - 32px));overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain}
#app dialog.checklist-person-dialog::-webkit-scrollbar{display:none;width:0;height:0}
#app dialog.checklist-person-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
#app .checklist-person-dialog>header,#app .checklist-person-dialog>p{flex:none}
#app .checklist-person-dialog>.checklist-job-list{min-height:0;overflow-y:auto;flex:1 1 auto;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain}
#app .checklist-person-dialog>.checklist-job-list::-webkit-scrollbar{display:none;width:0;height:0}
#app .checklist-job-list{display:grid;gap:10px}#app .checklist-job-list article{display:flex;justify-content:space-between;gap:16px;padding:12px;border:1px solid var(--ui-border);border-radius:10px;align-items:start}
#app .checklist-job-list small{display:block;font-size:12px;margin-top:4px}#app .checklist-job-list article>div:last-child{flex:none;text-align:right}
#app .team-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
#app .team-filters>form[data-auto-team]{flex:2;min-width:280px}
#app .team-filters>.team-branch-filter{flex:1;min-width:220px}
@media(max-width:600px){#app .team-filters>form[data-auto-team],#app .team-filters>.team-branch-filter{flex-basis:100%;min-width:0}}
#app.owner-app .ui-page-body[data-page="team"]{grid-template-columns:minmax(0,1fr)!important}
#app .team-filters form{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:0;margin:0;border:0;background:transparent}#app .team-filters label{min-width:180px;flex:1}#app .team-filters button{width:auto;margin:0}
#app .team-row-actions{display:flex;gap:6px;flex-wrap:wrap}#app .team-row-actions form{padding:0;margin:0;border:0;background:transparent}#app .team-row-actions button{width:auto;margin:0;min-height:34px;padding:6px 10px;font-size:12px}
#app .team-table table{min-width:850px}#app .team-table details{min-width:100px}#app .team-table details p{max-width:260px;font-size:12px}
#app .team-dialog .team-grants{margin-top:12px}
dialog.photo-viewer{position:fixed;inset:0;margin:auto;width:min(1100px,calc(100vw - 24px));max-height:calc(100dvh - 24px);box-sizing:border-box;padding:18px;border:1px solid #61738b;border-radius:16px;background:#1b2738;color:#edf2f8;overflow:auto;box-shadow:0 24px 80px #0009}
dialog.photo-viewer:not([open]){display:none}dialog.photo-viewer::backdrop{background:#050b15dd}
.photo-viewer header,.photo-viewer footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.photo-viewer header strong{overflow-wrap:anywhere}
.photo-viewer button{width:auto;flex:none;padding:10px 16px;border:1px solid #61738b;border-radius:10px;background:#344960;color:#edf2f8;cursor:pointer}.photo-viewer button:disabled{opacity:.4;cursor:default}
.photo-viewer>img{display:block;width:100%;height:min(65dvh,720px);object-fit:contain;margin-top:16px;background:#101a28;border-radius:10px}.photo-viewer>p{text-align:center;margin:10px 0;color:#b9c8da}
#app .checklist-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}#app .checklist-filters form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:0;padding:0;border:0;background:transparent}#app .checklist-filters label{min-width:180px}#app .checklist-filters button{width:auto;margin:0}#app .checklist-table table{min-width:650px}
#app .photo-toolbar{display:flex;gap:16px;flex-wrap:wrap;align-items:end}
#app .photo-toolbar form{display:flex;gap:10px;align-items:end;margin:0;flex:1;min-width:260px;padding:0;border:0;background:transparent}
#app .photo-toolbar label{flex:1;min-width:0}#app .photo-toolbar button{width:auto;flex:none;margin:0}
#app .photo-days,#app .photo-pagination{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}
#app .photo-days form,#app .photo-pagination form{padding:0;margin:0;border:0;background:transparent}
#app .photo-days button,#app .photo-pagination button{width:auto;margin:0;padding:8px 12px;min-height:36px}
#app .photo-pagination{justify-content:flex-end}#app .photo-panel .photo-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}
#app .photo-panel .photo-gallery img{height:140px;object-fit:cover}
@media(max-width:800px){#app .photo-panel .photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){#app .photo-toolbar form{min-width:0;flex-basis:100%;flex-wrap:wrap}#app .photo-toolbar label{flex-basis:100%}}
#app .schedule-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;width:100%}
#app .schedule-heading button{width:auto;margin:0 0 0 auto;flex:none}
#app .schedule-filters:not(.today-filters) form{grid-template-columns:repeat(5,minmax(0,1fr))}
#app .schedule-filters:not(.today-filters) form>button{grid-column:1/-1;justify-self:start;width:auto}
#app .schedule-filters label{min-width:0}
@media(max-width:900px){#app .schedule-filters:not(.today-filters) form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){#app .schedule-filters:not(.today-filters) form{grid-template-columns:minmax(0,1fr)}}
#app dialog.schedule-dialog{position:fixed;inset:0;margin:auto;width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:24px;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-panel);color:var(--ui-ink);box-shadow:0 24px 80px #0008;box-sizing:border-box;text-align:left;white-space:normal}
#app dialog.schedule-dialog:not([open]){display:none}
#app dialog.schedule-dialog::backdrop{background:#08111dbb;backdrop-filter:blur(3px)}
#app .schedule-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
#app .schedule-dialog header h2{margin:0}#app .schedule-dialog header button{width:auto;margin:0}
#app .schedule-dialog .schedule-editor{display:grid;gap:12px}#app .schedule-dialog form{margin:0;min-width:0}#app .schedule-dialog label{white-space:normal}
#app .schedule-branch{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;padding:7px 11px;border:1px solid var(--branch-edge);border-left:3px solid var(--branch-ink);border-radius:9px;background:var(--branch-bg);color:var(--branch-ink);line-height:1.4;max-width:100%}
#app .schedule-branch strong{font-size:13px;font-weight:700}#app .schedule-branch small{color:inherit;font-size:11px;opacity:.85}
.branch-tone-0{--branch-bg:#163d4d;--branch-ink:#9be7f5;--branch-edge:#387486}
.branch-tone-1{--branch-bg:#363252;--branch-ink:#d3c4ff;--branch-edge:#706292}
.branch-tone-2{--branch-bg:#19443a;--branch-ink:#9ce7c5;--branch-edge:#3f806a}
.branch-tone-3{--branch-bg:#493622;--branch-ink:#ffd39a;--branch-edge:#8d6b40}
.branch-tone-4{--branch-bg:#492e43;--branch-ink:#f7bcdf;--branch-edge:#8d5b7f}
.branch-tone-5{--branch-bg:#233d60;--branch-ink:#b6d6ff;--branch-edge:#527aaa}
#app.owner-app .ui-page-body[data-page="schedule"],#app.owner-app .ui-page-body[data-page="today-shifts"]{grid-template-columns:minmax(0,1fr)!important}
#app .schedule-table thead,#app .schedule-table th{background:var(--ui-raised,#2b3b50);color:var(--ui-ink,#edf2f8)}
#app.owner-app nav.schedule-pagination{position:static;inset:auto;transform:none;width:auto;background:transparent;border:0;padding:0;box-shadow:none;z-index:auto;min-height:0;justify-content:flex-end;margin-top:14px}
#app .today-filters form{display:flex;gap:12px;align-items:end;flex-wrap:wrap}#app .today-filters label{min-width:220px;flex:1}#app .today-filters button{width:auto}
#app .ui-page-body[data-page="today-shifts"] .schedule-table table{min-width:720px}
:root{--ui-canvas:#1b2738;--ui-panel:#253348;--ui-raised:#2b3b50;--ui-hover:#344960;--ui-border:#4a5b73;--ui-ink:#edf2f8;--ui-muted:#b9c8da;--ui-accent:#f97316;--ui-accent-ink:#281205;--ui-radius:20px;--ui-gap:20px;background:var(--ui-canvas);color:var(--ui-ink)}
body{background:var(--ui-canvas)}
#app:not(.landing){font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;font-synthesis:none;color-scheme:dark;color:var(--ui-ink);background:var(--ui-canvas);--green:var(--ui-accent);--dark:var(--ui-panel);--line:var(--ui-border);--muted:var(--ui-muted);line-height:1.6;overflow-wrap:break-word}
#app:not(.landing) h1{font-size:clamp(25px,2.6vw,32px);line-height:1.25;letter-spacing:-.035em}
#app:not(.landing) h2{font-size:17px;line-height:1.4;letter-spacing:-.015em}
#app:not(.landing) p{line-height:1.65}
#app:not(.landing) small,#app:not(.landing) .muted{color:var(--ui-muted)}
.ui-page-heading{margin:4px 0 24px;max-width:860px}.ui-page-heading .ui-eyebrow{font-size:10px;font-weight:750;letter-spacing:.13em;color:#fdba74;margin:0 0 9px}.ui-page-heading h1{margin:0 0 9px}.ui-page-heading>p:last-child{color:var(--ui-muted);font-size:13px;margin:0;max-width:680px}
.ui-page-body{display:grid;gap:var(--ui-gap);min-width:0;align-content:start;align-items:start}.ui-page-body>.panel{margin:0}.ui-page-body .panel{min-width:0}
#app:not(.landing) .panel{background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:var(--ui-radius);padding:24px;box-shadow:0 5px 18px #0913210a}
#app:not(.landing) .panel>h2{margin:0 0 18px;padding-bottom:12px;border-bottom:1px solid #4a5b7370}
#app:not(.landing) label{font-size:12px;line-height:1.5;gap:7px;font-weight:650;color:var(--ui-ink);min-width:0}
#app:not(.landing) input:not([type="checkbox"]):not([type="hidden"]),#app:not(.landing) select{background:var(--ui-raised);color:var(--ui-ink);border:1px solid #61738b;border-radius:11px;min-height:46px;padding:11px 13px;font-family:inherit;font-size:14px;line-height:1.4;transition:border-color .15s,box-shadow .15s}
#app:not(.landing) input::placeholder{color:#9aadc4;opacity:1}
#app:not(.landing) input:focus-visible,#app:not(.landing) select:focus-visible{outline:none;border-color:#fb923c;box-shadow:0 0 0 3px #f9731626}
#app:not(.landing) input[readonly]{background:#213044;color:#cbd8e8}
#app:not(.landing) form{gap:16px}
#app:not(.landing) button{font-family:inherit;font-size:13px;font-weight:650;line-height:1.4;background:var(--ui-hover);border:1px solid #61738b80;color:var(--ui-ink);border-radius:11px;min-height:42px;padding:10px 16px}
#app:not(.landing) button:hover:not(:disabled){background:#40566f;border-color:#8294ad}
#app:not(.landing) button.primary,#app:not(.landing) button.ow-primary{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-accent-ink)}
#app:not(.landing) button.primary:hover:not(:disabled),#app:not(.landing) button.ow-primary:hover:not(:disabled){background:#fb923c;border-color:#fb923c}
#app:not(.landing) button.secondary{background:var(--ui-raised);border-color:#61738b;color:var(--ui-ink)}
#app:not(.landing) button:focus-visible,#app:not(.landing) a:focus-visible,#app:not(.landing) summary:focus-visible{outline:3px solid #fdba74;outline-offset:3px}
#app:not(.landing) button:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
#app:not(.landing) .rows li{padding:13px 0;border-color:#4a5b7370;align-items:flex-start;font-size:13px}
#app:not(.landing) .rows li>span{min-width:0;overflow-wrap:anywhere}
#app:not(.landing) details{border-color:#4a5b7380;padding:12px 0}
#app:not(.landing) summary{font-size:13px;line-height:1.6;min-height:30px;padding:4px 0}
#app:not(.landing) details[open]>summary{color:#fed7aa;margin-bottom:10px}
#app:not(.landing) details form{padding:16px;background:#21304477;border:1px solid #4a5b7355;border-radius:14px;margin:12px 0 4px}
#app:not(.landing) .close-summary{background:var(--ui-raised);padding:12px;border:1px solid var(--ui-border);color:var(--ui-muted)}
#app:not(.landing) .warning{color:#fdba74}
#app:not(.landing) .metric{color:#ffb599;line-height:1.2;letter-spacing:-.04em}
#app:not(.landing) .trial-notice{background:#2b3b50;border:1px solid #61738b99;border-radius:14px;color:var(--ui-ink);padding:14px 18px;margin-bottom:24px}
#app:not(.landing) .trial-notice small{color:var(--ui-muted)}
#notice:not(:empty){z-index:50;background:#28553f;border:1px solid #4c8c69;color:#e1f9e9;padding:13px 16px;box-shadow:0 8px 28px #09132130;font-size:13px}
#notice.error{background:#762634;border-color:#bb5c69;color:#ffe5e8}

/* Desktop workspaces: consistent page spacing and forms without oversized rows. */
#app.owner-app .ow-content{max-width:1440px;padding:24px 28px 40px}
#app.owner-app .ow-content.with-checkout{padding-bottom:180px}
#app.owner-app .ow-greeting h1{font-size:24px;line-height:1.3}
#app.owner-app .ow-sidebar nav button{background:transparent;border-color:transparent;color:var(--ui-muted);border-radius:11px;min-height:42px;padding:10px 14px;font-size:13px}
#app.owner-app .ow-sidebar nav button:hover{background:var(--ui-hover);border-color:transparent}
#app.owner-app .ow-sidebar nav button[aria-current]{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-accent-ink)}
#app.owner-app .ow-sidebar nav .ow-nav-group{color:var(--ui-muted)}
#app.owner-app .product{display:grid;min-height:110px;padding:16px 14px;justify-items:start;gap:8px;border-radius:16px;background:var(--ui-panel);border-color:var(--ui-border)}
#app.owner-app .product b{background:var(--ui-accent);color:var(--ui-accent-ink)}
#app.owner-app .minus{padding:0;width:42px;min-height:42px;border-radius:10px}
#app.owner-app .ui-page-body[data-page="home"],#app.owner-app .ui-page-body[data-page="sale"]{display:block}
#app.owner-app .ui-page-body[data-page="shift"] .page-title,#app.owner-app .ui-page-body[data-page="reviews"] .page-title{display:none}
#app.owner-app .ui-page-body[data-page="team"] .team-heading h1{display:none}
#app.owner-app .ui-page-body[data-page="team"] .team-heading{margin:0;padding:12px 16px;border:1px solid #4a5b7370;border-radius:12px;background:var(--ui-raised)}
#app.owner-app .team-heading p{margin:0;color:var(--ui-muted)}
#app.owner-app .team-grants{background:var(--ui-raised);border-color:var(--ui-border)}
#app.owner-app .team-grants p{font-size:11px;color:var(--ui-muted)}
#app.owner-app .team-grants input[type="checkbox"]{width:18px;height:18px;min-height:18px;padding:0;accent-color:var(--ui-accent)}
#app.owner-app .team-list{gap:20px}
#app.owner-app .ui-page-body button:not(.product):not(.minus){font-size:13px;min-height:42px}
#app.owner-app .ui-page-body form>button{width:max-content;justify-self:start;min-width:128px;margin-top:2px;padding:11px 20px}
#app.owner-app .ui-page-body .team-actions form>button,#app.owner-app .ui-page-body .task-row form>button{min-width:0;margin:0}
#app.owner-app .ui-page-body .team-delete button.primary{background:#6e2530;border-color:#ba5966;color:#ffe5e8}
#app.owner-app .ui-page-body .team-delete button.primary:hover{background:#883341;border-color:#df7c8a}
#app.owner-app .ui-page-body form[data-form="work-week"]>button,#app.owner-app .ui-page-body form[data-form="work-month"]>button,#app.owner-app .ui-page-body form[data-form="report"]>button{background:var(--ui-hover);border-color:#61738b;color:var(--ui-ink)}
#app.owner-app .payroll-table{border:1px solid #4a5b7370;border-radius:13px;overflow:auto}
#app.owner-app .payroll-table table{font-size:12px}
#app.owner-app .payroll-table th,#app.owner-app .payroll-table td{padding:13px 14px;border-color:#4a5b7370}
#app.owner-app .payroll-table thead th{background:var(--ui-raised);color:var(--ui-muted);font-size:11px;text-transform:uppercase;letter-spacing:.03em}
#app.owner-app .payroll-table tbody tr:nth-child(even){background:#ffffff03}
#app.owner-app .payroll-table .person-link{border:0;background:transparent;color:#fed7aa;padding:3px 0;min-height:32px}
#app.owner-app .cash-facts{padding:8px 0;row-gap:14px}
#app.owner-app .cash-handover{padding:16px 0}
#app.owner-app .cash-review-note{background:var(--ui-raised);border-color:#61738b88;color:var(--ui-muted)}
#app.owner-app .billing-link{color:#fdba74}
#app.owner-app [data-live-report]{display:grid;gap:20px;min-width:0}
#app.owner-app [data-live-report]>.panel{margin:0}

/* Phone workspace: the same palette with distinct, touch-friendly POS controls. */
#app.staff-app{max-width:600px;min-height:100dvh}
#app.staff-app .app-header{background:var(--ui-panel);border-bottom:1px solid var(--ui-border);display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:3px 12px;padding:15px 18px}
#app.staff-app .app-header .brand{grid-column:1;grid-row:1;font-size:10px;color:#fdba74;letter-spacing:.13em}
#app.staff-app .app-header>strong{grid-column:1;grid-row:2;font-size:15px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app.staff-app .app-header>span:last-child{grid-column:2;grid-row:1/3;font-size:12px;align-self:center;color:#edf2f8;background:var(--ui-hover);border:1px solid #61738b55;padding:8px 10px;border-radius:10px;max-width:120px;overflow-wrap:anywhere}
#app.staff-app .content{padding:20px 16px calc(100px + env(safe-area-inset-bottom))}
#app.staff-app .content.with-checkout{padding-bottom:calc(240px + env(safe-area-inset-bottom))}
#app.staff-app .ui-page-heading{margin:0 0 20px}
#app.staff-app .ui-page-body{gap:16px}
#app.staff-app .panel{padding:18px;border-radius:18px}
#app.staff-app .panel>h2{font-size:16px;margin-bottom:15px;padding-bottom:10px}
#app.staff-app .product{background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:16px;min-height:110px;padding:15px 13px;display:grid;gap:8px;justify-content:stretch;justify-items:start}
#app.staff-app .product strong{font-size:14px;line-height:1.4;text-align:left;color:var(--ui-ink)}
#app.staff-app .product span{font-size:13px;color:#ffb599}
#app.staff-app .product b{background:var(--ui-accent);color:var(--ui-accent-ink);top:7px;right:7px;min-width:24px;text-align:center}
#app.staff-app .tile-selected .product{border-color:#fb923c;background:#303e50;box-shadow:0 0 0 1px #f9731620}
#app.staff-app .minus{background:var(--ui-hover);border:1px solid #61738b80;color:var(--ui-ink);width:42px;min-height:42px;border-radius:10px;padding:0;font-size:20px}
#app.staff-app .sale-tools{margin-top:14px;gap:8px}
#app.staff-app .sale-tools button{color:var(--ui-ink);font-size:12px}
#app.staff-app .page-title{margin-bottom:20px}
#app.staff-app .page-title .eyebrow{color:#fdba74;font-size:10px;margin-bottom:7px}
#app.staff-app nav{background:var(--ui-panel);border-color:var(--ui-border);min-height:64px;padding:7px 8px calc(7px + env(safe-area-inset-bottom));gap:4px;box-shadow:0 -5px 20px #09132118}
#app.staff-app nav button{border-color:transparent;background:transparent;color:var(--ui-muted);font-size:11px;padding:6px 3px;min-height:48px;border-radius:11px}
#app.staff-app nav button[aria-current]{background:#f9731624;color:#fed7aa}
#app.staff-app .checkout{background:var(--ui-panel);border-top:1px solid #61738b;bottom:calc(64px + env(safe-area-inset-bottom));padding:13px 16px;box-shadow:0 -8px 26px #09132130}
#app.staff-app .checkout .spread{margin-bottom:12px;font-size:13px}
#app.staff-app .checkout strong{font-size:24px;color:var(--ui-ink)}
#app.staff-app .checkout button{min-height:48px;font-size:13px}
#app.staff-app .shift-flow{background:var(--ui-raised);color:var(--ui-muted);border-color:var(--ui-border);font-size:11px;padding:12px;margin:0}
#app.staff-app .task-row{gap:12px;padding:12px 0;border-color:#4a5b7370;font-size:12px}
#app.staff-app .task-row form{gap:0}
#app.staff-app .task-row button{font-size:11px;padding:8px 10px;min-height:40px;white-space:nowrap}
#app.staff-app .work-tools{margin-bottom:16px}

/* Account entry and billing belong to the same visual system as the workspace. */
#app:not(.landing) .welcome{max-width:480px;margin:clamp(24px,7vh,72px) auto;padding:32px;background:var(--ui-panel);border:1px solid #61738b88;border-radius:24px;box-shadow:0 16px 48px #09132118}
#app:not(.landing) .welcome .brand{font-size:11px;color:#fdba74;letter-spacing:.1em;margin-bottom:24px}
#app:not(.landing) .welcome h1{font-size:29px;margin-bottom:12px}
#app:not(.landing) .welcome>p{color:var(--ui-muted);font-size:13px;margin:0 0 24px}
#app:not(.landing) .welcome form{gap:17px}
#app:not(.landing) .welcome .primary{margin-top:6px;min-height:46px}
#app:not(.landing) .auth-link{background:transparent;border-color:#61738b77;color:#fed7aa;font-size:12px;margin-top:12px}
#app:not(.landing) .auth-home{background:transparent;border:0;padding:0}
#app:not(.landing) .auth-plan-link{color:#fdba74;font-size:12px}
#app:not(.landing) .billing-screen{max-width:1040px;padding:32px 24px;margin:0 auto;min-height:100dvh}
#app:not(.landing) .billing-screen>.eyebrow{color:#fdba74;font-size:10px;margin-bottom:12px}
#app:not(.landing) .billing-screen>h1{margin-bottom:12px}
#app:not(.landing) .billing-screen>p:not(.eyebrow){color:var(--ui-muted);font-size:14px;margin-bottom:24px;max-width:680px}
#app:not(.landing) .billing-plans{gap:20px;margin:26px 0}
#app:not(.landing) .billing-plans .panel{display:flex;flex-direction:column;gap:12px;padding:24px}
#app:not(.landing) .billing-plans .panel>p{color:var(--ui-muted);font-size:13px;margin:0}
#app:not(.landing) .billing-plans .panel>p strong{display:block;color:#ffb599;font-size:30px;letter-spacing:-.04em;margin-bottom:3px}
#app:not(.landing) .billing-plans form{margin-top:auto;padding-top:12px}
#app:not(.landing) .billing-plans .primary{font-size:12px;min-height:46px}
#app:not(.landing) .billing-demo{background:#73501244;border:1px solid #c6903c77;color:#fed7aa;border-radius:12px;font-size:13px}
#app:not(.landing) .billing-qr{background:#fff;padding:12px;border-radius:16px;margin:20px auto;max-width:100%}
#app:not(.landing) .billing-link{color:#fdba74;font-size:13px}
#app:not(.landing) [data-payment-status]{padding:12px 14px;border:1px solid #61738b77;background:var(--ui-raised);border-radius:12px;font-size:13px;color:var(--ui-muted)}

@media(min-width:1100px){
 #app.owner-app [data-live-report]{grid-template-columns:repeat(2,minmax(0,1fr))}
 #app.owner-app .ui-page-body[data-page="schedule"],#app.owner-app .ui-page-body[data-page="stock"],#app.owner-app .ui-page-body[data-page="settings"]{grid-template-columns:repeat(2,minmax(0,1fr))}
 #app.owner-app .ui-page-body[data-page="stock"]>.panel:last-child{grid-column:1/-1}
 #app.owner-app .ui-page-body[data-page="schedule"]{grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr)}
 #app.owner-app .ui-page-body[data-page="reviews"]>.page-title,#app.owner-app .ui-page-body[data-page="shift"]>.page-title{grid-column:1/-1}
 #app.owner-app form[data-form="profile"],#app.owner-app form[data-form="product"],#app.owner-app form[data-form="stock-move"]{grid-template-columns:repeat(2,minmax(0,1fr))}
 #app.owner-app form[data-form="profile"]>button,#app.owner-app form[data-form="product"]>button,#app.owner-app form[data-form="stock-move"]>button{grid-column:1/-1}
 #app.owner-app form[data-form="product"]>label:last-of-type,#app.owner-app form[data-form="stock-move"]>label:last-of-type{grid-column:1/-1}
}
@media(max-width:960px){#app.owner-app .ow-content{padding:20px 16px 28px}.ui-page-heading{margin-bottom:20px}}
@media(max-width:640px){
 :root{--ui-gap:16px;--ui-radius:18px}
 #app:not(.landing) .panel{padding:18px}
 #app:not(.landing) input:not([type="checkbox"]):not([type="hidden"]),#app:not(.landing) select{font-size:16px;min-height:46px}
 #app.owner-app .ui-page-body form>button{width:100%;justify-self:stretch;min-height:46px}
 #app.owner-app .ui-page-body .team-actions form>button{width:100%}
 .ui-page-heading .ui-eyebrow{font-size:9px}.ui-page-heading>p:last-child{font-size:12px}
 #app:not(.landing) .welcome{margin:24px 14px;padding:25px 20px;border-radius:20px}
 #app:not(.landing) .welcome h1{font-size:26px}
 #app:not(.landing) .billing-screen{padding:26px 16px}
 #app:not(.landing) .billing-plans{grid-template-columns:1fr;gap:16px}
 #app:not(.landing) .billing-plans .panel{padding:22px}
 #app:not(.landing) .trial-notice{padding:12px 14px;font-size:12px;margin-bottom:20px}
 #app:not(.landing) .cash-facts{gap:10px 12px;font-size:12px}
 #app:not(.landing) .cash-facts dd{max-width:170px}
 #app.owner-app .cash-handover summary{font-size:12px}
}
@media(prefers-reduced-motion:reduce){#app:not(.landing) input,#app:not(.landing) select{transition:none}}
.finance-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-block:14px}
.finance-metrics .panel{margin:0;padding:18px;min-width:0}.finance-metrics small{display:block;color:#bbccdf}.finance-metrics strong{display:block;font-size:clamp(18px,2vw,28px);margin-top:6px;overflow-wrap:anywhere}
.finance-presets{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.finance-chart{display:grid;gap:18px;max-height:430px;overflow:auto;padding-right:8px}.finance-bar-row>strong{display:block;margin-bottom:5px}.finance-bar-line{display:grid;grid-template-columns:72px minmax(60px,1fr) 120px;align-items:center;gap:10px;margin-top:5px;font-size:12px}.finance-bar-line b{text-align:right;font-variant-numeric:tabular-nums}.finance-bar-line meter{display:block;width:100%;height:22px;accent-color:#fb923c}.finance-bar-line meter::-webkit-meter-bar{background:#34465b;border:0;border-radius:5px}.finance-bar-line meter::-webkit-meter-optimum-value{background:#fb923c;border-radius:5px}.finance-bar-line meter.outgoing::-webkit-meter-optimum-value{background:#a5b4fc}.finance-bar-line meter::-moz-meter-bar{background:#fb923c}.finance-table{overflow:auto}.finance-table table{border-collapse:collapse;min-width:650px;width:100%;font-size:13px}.finance-table th,.finance-table td{text-align:left;padding:12px 10px;border-bottom:1px solid #4a5b73;vertical-align:top}.finance-table th{color:#bbccdf;white-space:nowrap}.finance-table td small{display:block;max-width:300px;overflow-wrap:anywhere;color:#bbccdf}.finance-table .finance-money{white-space:nowrap;font-variant-numeric:tabular-nums}.finance-table form{margin:0}.finance-context{color:#ffb599}@media(max-width:640px){.finance-metrics{grid-template-columns:1fr;gap:8px}.finance-metrics .panel{padding:12px}.finance-metrics strong{font-size:23px}.finance-bar-line{grid-template-columns:55px minmax(35px,1fr) 95px;gap:6px;font-size:11px}}
.quay-brand-image{display:block;width:42px;height:42px;object-fit:contain;flex:none;box-sizing:border-box;padding:0;background:#f97316;border:0;border-radius:11px;box-shadow:0 2px 8px #0003}
#app.owner-app .ow-logo-icon{padding:0;width:44px;height:44px;background:transparent;border-radius:12px;box-shadow:none}
#app.owner-app .ow-logo-icon .quay-brand-image{width:44px;height:44px}
.app-header .brand,.auth-home{display:inline-flex;align-items:center;gap:8px}
.app-header .quay-brand-image{width:38px;height:38px}
#app.landing .quay-brand-image{width:40px;height:40px;max-width:none}
#app.landing a[href="#trang-chu"]>div:has(.quay-brand-image){width:40px;height:40px;background:transparent;box-shadow:none}
@media(min-width:961px) and (max-height:680px){#app.owner-app .ow-logo-icon,#app.owner-app .ow-logo-icon .quay-brand-image{width:38px;height:38px}}
.photo-field{display:grid;gap:8px}.photo-field small{font-weight:400;font-size:12px;color:#bbccdf}.photo-field input[type=file]{padding:10px;max-width:100%;font-size:13px}.photo-preview:not([hidden]){display:block;width:100%;max-width:280px;max-height:220px;object-fit:contain;border-radius:12px}.product-photo{display:block;width:100%;height:110px;object-fit:cover;border-radius:10px;margin-bottom:10px}.product-thumb{width:54px;height:54px;object-fit:cover;border-radius:9px;vertical-align:middle;margin-right:10px}.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}.photo-gallery figure{margin:0;background:#2b3b50;border-radius:12px;padding:8px}.photo-gallery img{display:block;width:100%;height:160px;object-fit:cover;border-radius:8px}.photo-gallery figcaption{padding:8px 2px}.photo-gallery small{display:block;color:#bbccdf;font-size:11px}.task-row{flex-wrap:wrap}.task-row form{width:100%}.tile .product:has(.product-photo){display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;min-height:180px}.photo-field input::file-selector-button{background:#fb923c;color:#281205;border:0;border-radius:8px;padding:8px 10px;margin-right:10px;cursor:pointer}
.photo-field [data-clear-photo][hidden]{display:none!important}.photo-field [data-clear-photo]:not([hidden]){justify-self:start;background:#7f2938;color:#ffe4e6;border-color:#b64c5d}
.owner-avatar-img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}.owner-avatar-preview{width:96px;height:96px;object-fit:cover;border-radius:50%;border:2px solid #fb923c;margin-bottom:14px}#app.owner-app .ow-top-actions button.ow-avatar{padding:0;overflow:hidden;min-width:32px;width:32px;height:32px;border-radius:50%}
.product-catalog{display:grid;gap:0}.catalog-item{min-width:0;border-bottom:1px solid #4a5b7370;padding:12px 0}.catalog-item:last-child{border-bottom:0}.catalog-header{display:grid;grid-template-columns:minmax(160px,1fr) auto auto;align-items:center;gap:18px}.catalog-identity{display:flex;align-items:center;gap:12px;min-width:0}.catalog-identity>div{min-width:0}.catalog-identity strong{display:block;overflow-wrap:anywhere;font-size:14px}.catalog-identity small{display:block;font-size:11px;color:#bbccdf;margin-top:4px}.catalog-identity .product-thumb{flex:none;width:48px;height:48px;margin:0}.catalog-no-image{display:grid;place-items:center;width:48px;height:48px;flex:none;background:#34465b;color:#bbccdf;border-radius:10px;font-size:22px}.catalog-price{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:14px}.catalog-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}#app.owner-app .catalog-actions button{min-height:32px;padding:5px 10px;font-size:12px;border-radius:8px;margin:0}#app.owner-app .catalog-actions .catalog-delete{color:#fda4af;border-color:#b95b6b60;background:#64293740}.product-editor[hidden]{display:none!important}.product-editor:not([hidden]){display:block;width:100%;margin-top:12px;padding:16px;background:#1b273880;border:1px solid #4a5b73;border-radius:12px;box-sizing:border-box}.catalog-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.product-editor form{max-width:680px;margin-top:8px}.product-editor p{max-width:680px;font-size:13px}#app.owner-app .catalog-editor-heading button{min-height:30px;padding:4px 10px;font-size:12px}@media(max-width:640px){.catalog-header{grid-template-columns:minmax(0,1fr) auto;gap:10px}.catalog-actions{grid-column:1/-1;justify-content:flex-end}.catalog-identity strong{font-size:13px}.product-editor:not([hidden]){padding:12px}}
.branch-cover-preview{display:block;width:100%;max-width:600px;height:160px;object-fit:cover;border-radius:12px;margin-block:12px}.staff-app .app-header.staff-branded{position:relative;isolation:isolate;overflow:hidden;min-height:112px;padding:16px;border-radius:0 0 14px 14px}.staff-app .app-header.staff-branded>.staff-cover-image{position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:cover;pointer-events:none}.staff-app .app-header.staff-branded::before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,#0c142be6,#0c142b99);pointer-events:none}.staff-app .app-header.staff-branded>:not(.staff-cover-image){position:relative;z-index:2;color:#fff;text-shadow:0 1px 3px #0008}.staff-app .app-header.staff-branded .brand{color:#ffceaa}.staff-app .app-header.staff-branded .quay-brand-image{text-shadow:none}@media(min-width:641px){.staff-app .app-header.staff-branded{min-height:124px}}

#app .handover-day{min-width:0;display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}#app .handover-day>label{flex:1;min-width:140px}#app .handover-day-buttons{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}#app .handover-day-buttons button{width:auto;margin:0;padding:8px 10px;min-height:36px}
.usage-guide{box-sizing:border-box;width:min(640px,calc(100vw - 24px));max-height:90dvh;padding:0;border:1px solid #53677f;border-radius:18px;background:#233247;color:#f4f7fb;box-shadow:0 24px 80px #0008;overflow:auto;scrollbar-width:none}.usage-guide::backdrop{background:#091322b8;backdrop-filter:blur(3px)}.usage-guide header,.usage-guide footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;background:#233247;position:sticky;z-index:1}.usage-guide header{top:0;border-bottom:1px solid #53677f}.usage-guide footer{bottom:0;border-top:1px solid #53677f}.usage-guide-body{padding:22px}.usage-guide h2{font-size:24px;line-height:1.35;margin:18px 0 10px}.usage-guide p,.usage-guide li{line-height:1.65}.usage-guide li{padding:0 0 10px 4px}.usage-guide ol{padding-left:24px}.usage-guide small{display:block;color:#becddd;margin-top:16px;line-height:1.5}.usage-guide progress{width:100%;height:6px;accent-color:#ffad56}.usage-guide button,.usage-guide-launch{font:inherit;cursor:pointer;border:1px solid #61738a;border-radius:10px;padding:10px 14px;background:#34485f;color:#fff;font-weight:600}.usage-guide button:disabled{opacity:.4;cursor:default}.usage-guide [data-guide=next]{background:#ffad56;color:#192536;border-color:#ffad56}.usage-guide-launch{position:fixed;right:16px;bottom:22px;z-index:30;box-shadow:0 4px 18px #0005;font-size:13px}.usage-guide button:focus-visible,.usage-guide-launch:focus-visible{outline:3px solid #ffad56;outline-offset:3px}@media(max-width:600px){.usage-guide-launch{bottom:80px;right:10px}.usage-guide header,.usage-guide footer{padding:14px}.usage-guide-body{padding:16px}.usage-guide h2{font-size:21px}}
.guide-spotlight{position:fixed;z-index:9998;pointer-events:none;border:3px solid #ffad56;border-radius:10px;box-shadow:0 0 0 9999px #07101d99;box-sizing:border-box}.guide-tooltip{position:fixed;z-index:9999;box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:auto;background:#233247;color:#f4f7fb;border:1px solid #ffad56;border-radius:14px;padding:18px;box-shadow:0 12px 45px #0008;font:14px/1.6 system-ui;scrollbar-width:none}.guide-tooltip header,.guide-tooltip footer{display:flex;justify-content:space-between;align-items:center;gap:10px}.guide-tooltip h2{font-size:20px;line-height:1.35;margin:16px 0 10px}.guide-tooltip p{margin:0 0 12px}.guide-tooltip small{display:block;color:#bacddd;margin-bottom:18px}.guide-tooltip progress{width:100%;height:5px;accent-color:#ffad56}.guide-tooltip button{border:1px solid #62748a;border-radius:8px;padding:9px 12px;background:#34485f;color:#fff;cursor:pointer;font:600 13px system-ui}.guide-tooltip [data-guide=next]{background:#ffad56;color:#182538;border-color:#ffad56}.guide-tooltip button:disabled{opacity:.4}.guide-tooltip button:focus-visible{outline:3px solid #fff;outline-offset:2px}
.guide-tooltip[popover],.guide-spotlight[popover]{margin:0;inset:auto;overflow:auto}.guide-spotlight[popover]{padding:0;overflow:visible;background:transparent;color:inherit}.guide-tooltip[popover]:popover-open{display:block}

#app .sales-metrics.revenue-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
#app .sales-metrics.revenue-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}#app .revenue-metrics .best-seller-metric{grid-column:span 2}#app .best-seller-metric strong{font-size:clamp(18px,2vw,24px)}#app .best-seller-metric strong+small{margin-top:8px}@media(max-width:640px){#app .sales-metrics.revenue-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
#app .best-seller-filter{display:flex;gap:10px;flex-wrap:wrap;padding:0;margin:12px 0;border:0;background:transparent}#app .best-seller-filter label{flex:1;min-width:110px}#app .best-seller-filter input,#app .best-seller-filter select{width:100%}

#app .sales-metrics.revenue-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
#app .sales-chart-stack{display:grid;align-content:start;gap:18px;min-width:0}#app .sales-chart-stack>.panel{margin:0}
/* Workspace responsive layout: contain wide data inside its own surface. */
#app:is(.owner-app,.staff-app) :is(.ow-main,.ow-content,.content,.ui-page-body,.panel,.sales-chart-stack){min-width:0;max-width:100%;box-sizing:border-box}
#app:is(.owner-app,.staff-app) :is(input,select,textarea,.ui-select){max-width:100%;box-sizing:border-box}
#app:is(.owner-app,.staff-app) :is(.sales-table,.schedule-table,.product-table){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
#app:is(.owner-app,.staff-app) :is(.sales-table,.schedule-table) th{white-space:nowrap}
#app:is(.owner-app,.staff-app) .panel :is(h2,h3,p,strong){overflow-wrap:anywhere}
#app .sales-best>div{min-width:0;gap:10px}#app .sales-best>div>div{min-width:0}#app .sales-best b{white-space:nowrap}
#app :is(.sales-tabs,.sales-presets,.photo-pagination){display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#app dialog.schedule-dialog :is(form,.two,label,fieldset){min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:960px){
 #app :is(.sales-charts,.team-list){grid-template-columns:minmax(0,1fr)}
 #app :is(.sales-filter,.best-seller-filter){gap:10px}
 #app :is(.payroll-filters,.requests-filters,.handover-filters){grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
 #app.owner-app .ow-content{padding:14px 12px 90px}#app .ui-page-heading h1{font-size:26px;line-height:1.25}
 #app:is(.owner-app,.staff-app) .panel{padding:16px;border-radius:14px}
 #app .sales-charts,#app .sales-chart-stack{gap:14px}
 #app .sales-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 #app .sales-filter label{min-width:0;width:100%}#app .sales-filter label:first-child:has(select){grid-column:1/-1}
 #app .sales-filter>button{grid-column:1/-1;width:100%;min-width:0}
 #app .best-seller-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}#app .best-seller-filter label{min-width:0}
 #app:is(.owner-app,.staff-app) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px;min-height:44px}
 #app:is(.owner-app,.staff-app) :is(.ui-select-trigger,.sales-tabs button,.sales-presets button,.photo-pagination button){min-height:44px;min-width:0}
 #app .sales-best>div{display:grid;grid-template-columns:26px minmax(0,1fr) auto}#app .sales-best strong{font-size:14px}
 #app dialog.schedule-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:16px;border-radius:14px}
 #app dialog.schedule-dialog header{gap:10px;align-items:flex-start}#app dialog.schedule-dialog header h2{font-size:19px;line-height:1.4;min-width:0}#app dialog.schedule-dialog header button{flex:none;min-width:0;padding:9px 12px}
 #app dialog.schedule-dialog .two{grid-template-columns:minmax(0,1fr)}
 #app .photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#app .photo-gallery img{height:130px}
 #app .handover-day{align-items:stretch}#app .handover-day-buttons{width:100%}#app .handover-day-buttons button{flex:1;min-width:0;min-height:44px}
}
@media(max-width:380px){
 #app :is(.requests-filters,.handover-filters,.payroll-filters){grid-template-columns:minmax(0,1fr)}
 #app .sales-best>div{grid-template-columns:24px minmax(0,1fr)}#app .sales-best b{grid-column:2}
 #app .sales-metrics article{padding:12px}#app .sales-metrics strong{font-size:20px}
}
@media(orientation:landscape) and (max-height:500px){#app dialog.schedule-dialog{max-height:calc(100dvh - 12px);margin:auto}.guide-tooltip{max-height:calc(100dvh - 12px)}}
.payroll-qr{padding:16px;border:1px solid #61738b;border-radius:12px;margin:16px 0}.payroll-qr img,.payroll-my-qr{display:block;width:min(280px,100%);height:auto;object-fit:contain;background:white;padding:8px;box-sizing:border-box;border-radius:10px;margin:12px auto}.payroll-qr small{display:block;line-height:1.5}.payment-confirm{display:flex!important;gap:10px;align-items:flex-start;line-height:1.5}.payment-confirm input{width:20px!important;min-height:20px!important;flex:none;margin-top:2px}.payment-state{display:block;margin-top:6px;color:#bfe5cf}
#app :is(.sales-tabs,.sales-presets) button[aria-current="page"]{background:#ffad56!important;color:#192536!important;border-color:#ffc481!important;box-shadow:0 0 0 2px #ffad5626!important;font-weight:750}#app .sales-tabs button:not([aria-current="page"]):hover{border-color:#ffad56;background:#3b4e65}#app .sales-tabs button[aria-current="page"]:focus-visible{outline:3px solid #ffe0b5;outline-offset:3px}
/* Consistent selected tabs across owner and staff workspaces. */
#app:is(.owner-app,.staff-app) :is(button[data-tab][aria-current="page"],button[role="tab"][aria-selected="true"],.sales-tabs button[aria-current="page"]){background:#ffad56!important;color:#192536!important;border-color:#ffc481!important;box-shadow:0 0 0 2px #ffad5626!important;font-weight:750}
#app:is(.owner-app,.staff-app) button[data-tab][aria-current="page"] :is(span,svg){color:inherit!important}
#app:is(.owner-app,.staff-app) :is(button[data-tab][aria-current="page"],button[role="tab"][aria-selected="true"]):focus-visible{outline:3px solid #ffe0b5;outline-offset:3px}
#app form.payroll-slip-filters{display:grid;grid-template-columns:minmax(180px,1.3fr) repeat(2,minmax(160px,1fr));gap:12px;align-items:end;margin:16px 0;padding:0;border:0;background:transparent}#app .payroll-slip-filters label{min-width:0}#app .payroll-slip-filters :is(input,select,.ui-select){width:100%}@media(max-width:760px){#app form.payroll-slip-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#app .payroll-slip-filters label:first-child{grid-column:1/-1}}@media(max-width:400px){#app form.payroll-slip-filters{grid-template-columns:minmax(0,1fr)}}
.notify-launch{position:fixed;left:14px;bottom:20px;z-index:30;border:1px solid #61738b;border-radius:12px;padding:12px 16px;background:#34485f;color:#fff;cursor:pointer;font:600 13px system-ui;box-shadow:0 5px 20px #0005}dialog.notify-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:20px;border:1px solid #61738b;border-radius:16px;background:#233247;color:#f4f7fb}dialog.notify-dialog::backdrop{background:#07101dbb}.notify-dialog header,.notify-dialog footer,.notify-controls{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}.notify-dialog h2{font-size:21px}.notify-dialog button{border:1px solid #61738b;border-radius:10px;padding:10px 12px;background:#34485f;color:#fff;font:inherit;cursor:pointer}.notify-dialog button:disabled{opacity:.5}.notify-list{display:grid;gap:10px;margin:16px 0}.notify-list .notify-item{display:grid;gap:6px;width:100%;text-align:left}.notify-list .notify-unread{border-left:4px solid #ffad56;background:#3c4350}.notify-item small{color:#bbccdf}.notify-item span{font-size:13px}.notify-dialog .muted{font-size:13px;line-height:1.5}@media(max-width:640px){.notify-launch{bottom:80px;left:10px}.notify-dialog{padding:14px}.notify-controls button{flex:1;min-height:44px}}
/* Compact notification inbox */
.notify-launch{width:46px;height:46px;padding:0;display:grid;place-items:center;font-size:21px;border-radius:50%}.notify-launch b{position:absolute;top:-5px;right:-6px;min-width:19px;padding:2px 4px;border-radius:12px;background:#ffad56;color:#172536;font:700 10px system-ui;box-sizing:border-box}dialog.notify-dialog{width:min(490px,calc(100vw - 24px));padding:0;max-height:min(760px,calc(100dvh - 32px));border-radius:16px;scrollbar-width:none}.notify-dialog>header{position:sticky;top:0;z-index:2;background:#233247;padding:16px 18px;border-bottom:1px solid #61738b55;flex-wrap:nowrap}.notify-dialog header h2{display:flex;gap:8px;align-items:center;font-size:18px;margin:0 0 3px}.notify-dialog header small{font-size:11px;color:#bbccdf}.notify-count{font-size:11px;line-height:1;background:#ffad5624;color:#ffd19b;padding:5px 7px;border-radius:20px}.notify-dialog header>button{padding:7px 10px;background:transparent;border:0;font-size:18px;flex:none}.notify-toolbar{display:flex;justify-content:space-between;align-items:flex-start;padding:10px 18px;gap:10px;border-bottom:1px solid #61738b40}.notify-toolbar>button{border:0;background:transparent;padding:5px 0;font-size:12px;color:#ffd19b}.notify-settings{font-size:12px;max-width:230px}.notify-settings summary{padding:5px;cursor:pointer;text-align:right;list-style:none}.notify-settings>div{display:grid;gap:10px;padding:12px;margin-top:6px;border:1px solid #61738b;border-radius:10px;background:#1b293a}.notify-settings small{color:#bbccdf;font-size:11px;line-height:1.5}.notify-status{margin:10px 18px;font-size:12px;line-height:1.5;color:#ffd19b}.notify-list{gap:0;margin:0}.notify-list .notify-item{border:0;border-bottom:1px solid #61738b35;border-radius:0;padding:13px 18px;background:transparent;gap:5px}.notify-list .notify-item:hover{background:#34485f}.notify-list .notify-unread{background:#ffad560a;border-left:3px solid #ffad56;padding-left:15px}.notify-item-heading{display:flex;align-items:flex-start;gap:8px;justify-content:space-between}.notify-item-heading strong{font-size:13px;line-height:1.45}.notify-item-heading i{width:7px;height:7px;border-radius:50%;background:#ffad56;flex:none;margin-top:5px}.notify-item>span{font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#cfdae7}.notify-item>small{font-size:10px;color:#aabdd2}.notify-dialog>footer{position:sticky;bottom:0;background:#233247;padding:10px 18px;border-top:1px solid #61738b55;font-size:12px;flex-wrap:nowrap}.notify-dialog footer button{padding:6px 10px;font-size:12px}.notify-empty{display:grid;gap:10px;justify-items:center;padding:40px 16px;color:#bbccdf}.notify-empty strong{font-size:14px}.notify-empty small{font-size:12px}@media(max-width:640px){.notify-dialog button{min-height:40px}.notify-launch{width:44px;height:44px}.notify-dialog>header{padding:14px}.notify-toolbar{padding:8px 14px}.notify-list .notify-item{padding:12px 14px}.notify-list .notify-unread{padding-left:11px}}
.notify-settings>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 12px;border:1px solid #61738b;background:#34485f;border-radius:9px;font-size:12px;min-height:34px}.notify-settings>button[aria-expanded=true]{border-color:#ffad56;color:#ffd19b}.notify-settings>div[hidden]{display:none!important}
.notify-launch{left:auto;right:154px;bottom:22px}@media(max-width:640px){.notify-launch{left:auto;right:144px;bottom:80px}}@media(max-width:380px){.notify-launch{right:138px}}
.notify-launch{left:auto;right:16px;bottom:76px}@media(max-width:640px){.notify-launch{left:auto;right:10px;bottom:134px}}@media(max-width:380px){.notify-launch{right:10px}}
.usage-guide-launch,.notify-launch{box-sizing:border-box;width:46px;height:46px;min-width:46px;min-height:46px;padding:0;border-radius:50%;display:grid;place-items:center;right:16px;left:auto}.usage-guide-launch{bottom:22px;font-size:22px;line-height:1}.notify-launch{bottom:80px}@media(max-width:640px){.usage-guide-launch,.notify-launch{width:44px;height:44px;min-width:44px;min-height:44px;right:10px}.usage-guide-launch{bottom:80px}.notify-launch{bottom:136px}}
@media(max-width:640px){
 .usage-guide-launch,.notify-launch{right:max(10px,env(safe-area-inset-right,0px));z-index:30}
 .usage-guide-launch{bottom:var(--floating-bottom,calc(74px + env(safe-area-inset-bottom,0px)))}
 .notify-launch{bottom:calc(var(--floating-bottom,74px) + 56px)}
 #app:is(.owner-app,.staff-app) :is(.ow-content,.content){padding-right:calc(68px + env(safe-area-inset-right,0px));padding-bottom:calc(130px + env(safe-area-inset-bottom,0px))}
 #app.staff-app .content.with-checkout{padding-bottom:calc(290px + env(safe-area-inset-bottom,0px))}
 body.floating-keyboard :is(.usage-guide-launch,.notify-launch),body:has(dialog[open]) :is(.usage-guide-launch,.notify-launch){visibility:hidden;pointer-events:none}
}
#app.owner-app .ow-sidebar nav button[aria-current="page"]{background:#ffbb70!important;color:#172536!important;border:1px solid #ffd19a!important;box-shadow:inset 4px 0 0 #fff0d6,0 2px 10px #ffad5625!important;font-weight:800}#app.owner-app .ow-sidebar nav button[aria-current="page"] :is(span,svg,.ow-icon){color:#172536!important;opacity:1!important}#app.owner-app .ow-sidebar nav button[aria-current="page"] .ow-icon{filter:none!important}#app.owner-app .ow-sidebar nav button:not([aria-current="page"]):hover{background:#3c4e65;color:#fff}
/* Employee phone layout: full-width cards and a stable compact header. */
@media(max-width:640px){
 body:has(#app.staff-app){margin:0;padding:0;background:#1b2738}
 #app.staff-app{width:100%;max-width:none;margin:0;min-height:100dvh}
 #app.staff-app .app-shell{display:block;width:100%;min-width:0}
 #app.staff-app .app-header{position:sticky;top:0;z-index:31;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:4px 12px;min-height:112px;padding:calc(12px + env(safe-area-inset-top,0px)) 70px 12px 14px;border-bottom:1px solid #4a5b73;background:#253348}
 #app.staff-app .app-header .brand{grid-column:1;grid-row:1;display:flex;align-items:center;gap:8px;font-size:10px;letter-spacing:.08em;min-width:0}
 #app.staff-app .app-header .brand img{width:32px;height:32px;flex:none}
 #app.staff-app .app-header>strong{grid-column:1;grid-row:2;font-size:14px;line-height:1.3;text-align:left}
 #app.staff-app .app-header>span:not(.brand){grid-column:2;grid-row:1/3;align-self:center;max-width:115px;font-size:11px;overflow-wrap:anywhere;text-align:center;padding:7px 9px;background:#34485f;border-radius:10px}
 #app.staff-app .content,#app.staff-app .content.with-checkout{width:100%;padding:18px 14px calc(100px + env(safe-area-inset-bottom,0px));min-width:0}
 #app.staff-app .content.with-checkout{padding-bottom:calc(245px + env(safe-area-inset-bottom,0px))}
 #app.staff-app .ui-page-heading{margin-bottom:18px}#app.staff-app .ui-page-heading h1{font-size:25px;margin-bottom:8px}#app.staff-app .ui-page-heading p{font-size:13px;line-height:1.6}
 #app.staff-app .ui-page-body{gap:14px;grid-template-columns:minmax(0,1fr)}
 #app.staff-app .ui-page-body>.panel{padding:16px;border-radius:14px;margin:0}
 #app.staff-app .panel>h2{margin-bottom:14px;padding-bottom:12px;font-size:16px}
 #app.staff-app .shift-flow{margin:0;padding:11px 13px;font-size:12px;line-height:1.7;border-radius:12px}
 #app.staff-app .photo-field input[type=file]{width:100%;font-size:12px;min-height:46px;padding:8px;line-height:1.6;overflow:hidden}
 #app.staff-app .photo-field input::file-selector-button{font-size:12px;padding:7px 9px;margin-right:8px}
 #app.staff-app .photo-field small{font-size:11px;line-height:1.5;margin:0}
 #app.staff-app .app-shell>nav{position:fixed;left:0;right:0;bottom:0;transform:none;width:100%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:7px 8px calc(7px + env(safe-area-inset-bottom,0px));background:#253348;border-top:1px solid #4a5b73;z-index:32}
 #app.staff-app .app-shell>nav button{margin:0;padding:8px 2px;min-height:44px;min-width:0;width:100%;font-size:11px;line-height:1.25;white-space:nowrap;word-break:normal;overflow-wrap:normal;border-radius:10px}
 body:has(#app.staff-app) .notify-launch{top:calc(10px + env(safe-area-inset-top,0px));bottom:auto;right:12px;z-index:33}
 body:has(#app.staff-app) .usage-guide-launch{top:calc(62px + env(safe-area-inset-top,0px));bottom:auto;right:12px;z-index:33}
 #app.staff-app .checkout{width:100%;left:0;right:0;transform:none;bottom:calc(58px + env(safe-area-inset-bottom,0px));border-radius:14px 14px 0 0}
}
@media(max-width:360px){#app.staff-app .content{padding-left:10px;padding-right:10px}#app.staff-app .app-header{padding-left:10px;gap:4px 8px}#app.staff-app .app-header>span:not(.brand){max-width:95px;font-size:10px}#app.staff-app .app-shell>nav button{font-size:10px}}
#app .photo-empty{grid-column:1/-1;display:grid;gap:6px;text-align:center;padding:24px 12px;border:1px dashed #61738b70;border-radius:12px;background:#1b293a55;min-width:0}#app .photo-empty strong{font-size:14px}#app .photo-empty span{font-size:12px;color:#bbccdf;line-height:1.5}#app .photo-summary{font-size:12px;line-height:1.6;margin:12px 0}
@media(max-width:640px){#app.staff-app .photo-panel .photo-toolbar{display:block}#app.staff-app .photo-toolbar form{display:block;width:100%;padding:0;margin:0;border:0;background:transparent}#app.staff-app .photo-toolbar label{width:100%}#app.staff-app .photo-days{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}#app.staff-app .photo-days form{min-width:0;width:100%;margin:0}#app.staff-app .photo-days button{width:100%;min-width:0;margin:0;padding:8px 4px;white-space:nowrap;font-size:12px;min-height:40px}#app.staff-app .photo-panel .photo-pagination{justify-content:center;margin-top:12px;font-size:12px}#app.staff-app .photo-summary{font-size:12px}#app.staff-app .photo-gallery{min-width:0}#app.staff-app .app-shell>nav button{font-size:11px;letter-spacing:-.2px;padding-inline:1px;min-width:0}}
/* Keep the employee's five navigation items inside the bar at every width. */
#app.staff-app .app-shell>nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;box-sizing:border-box!important;gap:3px!important;padding-left:6px!important;padding-right:6px!important;max-width:100vw;min-width:0;overflow:visible}
#app.staff-app .app-shell>nav>button{box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:100%!important;margin:0!important;padding:7px 1px!important;font-size:11px!important;line-height:1.25!important;letter-spacing:-.2px;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;text-align:center;display:flex;align-items:center;justify-content:center}
@media(max-width:640px){#app.staff-app .app-shell>nav{width:100%!important;left:0!important;right:0!important;transform:none!important}}
@media(max-width:350px){#app.staff-app .app-shell>nav>button{font-size:10px!important}}
/* Employee schedule and leave: readable phone cards instead of a wide table. */
#app .employee-shift-card{border:1px solid #4a5b73;border-radius:12px;padding:13px;margin-top:10px;background:#2b3b5040}#app .employee-shift-title{display:block;font-size:14px;font-weight:750;line-height:1.45}#app .employee-shift-time{display:block;font-size:12px;color:#d4e3f5;line-height:1.7;margin-top:5px}#app .employee-shift-person{display:block;font-size:11px;color:#aebfd2;margin-top:4px}#app .employee-request-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}#app .employee-week-filter form{display:flex;align-items:end;gap:10px}#app .employee-week-filter label{flex:1;min-width:0}#app .employee-week-filter button{width:auto;flex:none}
@media(max-width:640px){
 #app.staff-app [data-page="schedule"]>.panel{padding:15px}
 #app.staff-app .employee-week-filter form{padding:0;border:0;background:transparent;margin:0}#app.staff-app .employee-week-filter button{display:none}
 #app.staff-app [data-page="schedule"] .requests-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0;background:transparent;border:0}#app.staff-app .requests-filters>button{grid-column:1/-1;width:100%}
 #app.staff-app [data-page="schedule"] :is(input[type=date],input[type=datetime-local]){width:100%;min-width:0;max-width:100%;min-inline-size:0;box-sizing:border-box;font-size:16px;text-align:left}#app.staff-app input::-webkit-date-and-time-value{text-align:left;min-height:1.4em}
 #app.staff-app .employee-shift-card details{padding:0;border:0}#app.staff-app .employee-shift-card summary{padding:0 0 0 2px}
 #app.staff-app [data-page="schedule"] .sales-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#app.staff-app [data-page="schedule"] .sales-metrics article{padding:12px}#app.staff-app [data-page="schedule"] .sales-metrics strong{font-size:18px}
 #app.staff-app .requests-table{overflow:visible}#app.staff-app .requests-table :is(table,tbody){display:block;min-width:0;width:100%}#app.staff-app .requests-table thead{display:none}#app.staff-app .requests-table tr{display:block;border:1px solid #4a5b73;border-radius:12px;padding:10px;margin:10px 0;background:#2b3b5030}#app.staff-app .requests-table td{display:block;width:100%;padding:5px 2px;border:0;white-space:normal;font-size:13px}#app.staff-app .requests-table td small{display:block;line-height:1.6;margin:4px 0}#app.staff-app .requests-table td:nth-child(3)::before{content:'Loại: ';color:#b8c9de}#app.staff-app .requests-table td:nth-child(5)::before{content:'Người nhận thay: ';color:#b8c9de}#app.staff-app .requests-table td:last-child button{width:100%;min-height:42px}
 #app.staff-app .employee-request-buttons button{padding:10px 6px;font-size:13px;min-width:0}#app.staff-app .request-details{grid-template-columns:minmax(0,1fr);gap:4px}#app.staff-app .request-details dd{margin:0 0 10px}
}
/* iOS date controls must not contribute their localized intrinsic width. */
#app.staff-app .employee-week-filter{width:100%;min-width:0;max-width:100%}
@media(max-width:640px){
 #app.staff-app .employee-week-filter form{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;min-width:0!important;max-width:100%!important;gap:0;box-sizing:border-box}
 #app.staff-app .employee-week-filter label{display:grid;grid-template-columns:minmax(0,1fr);width:100%;min-width:0;max-width:100%;box-sizing:border-box}
 #app.staff-app :is(input[type="date"],input[type="datetime-local"],input[type="month"]){-webkit-appearance:none;appearance:none;display:block;box-sizing:border-box!important;width:100%!important;inline-size:100%!important;min-width:0!important;min-inline-size:0!important;max-width:100%!important;max-inline-size:100%!important;margin:0;overflow:hidden;padding:10px 12px;min-height:46px}
 #app.staff-app input::-webkit-datetime-edit{padding:0;min-width:0;max-width:100%}
 #app.staff-app input::-webkit-date-and-time-value{min-width:0;max-width:100%;white-space:nowrap;text-align:left}
}

/* Keep account dialog actions visible while its fields scroll. */
#app dialog.team-dialog[open]{display:flex;flex-direction:column;overflow:hidden;padding:0}
#app dialog.team-dialog>header{flex:none;margin:0;padding:20px 24px;border-bottom:1px solid var(--ui-border);background:var(--ui-panel);z-index:1}
#app dialog.team-dialog>.team-dialog-body{flex:1;min-height:0;overflow:auto;padding:20px 24px 24px;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}
#app dialog.team-dialog>.team-dialog-body::-webkit-scrollbar{display:none;width:0;height:0}
@media(max-width:600px){#app dialog.team-dialog>header{padding:16px}#app dialog.team-dialog>.team-dialog-body{padding:16px}}

/* Keep close controls visible in every scrolling dialog. */
dialog{scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain}
dialog::-webkit-scrollbar,dialog *::-webkit-scrollbar{display:none;width:0;height:0}
dialog *{scrollbar-width:none}
#app dialog.schedule-dialog:not(.team-dialog):not(.checklist-person-dialog)>header{position:sticky;top:0;z-index:20;background:var(--ui-panel);margin:-24px -24px 16px;padding:20px 24px;border-bottom:1px solid var(--ui-border)}
dialog.photo-viewer>header{position:sticky;top:0;z-index:20;background:#1b2738;margin:-18px -18px 16px;padding:16px 18px;border-bottom:1px solid #61738b55}
dialog.notify-dialog>header{position:sticky;top:0;z-index:20}
@media(max-width:700px){#app dialog.schedule-dialog:not(.team-dialog):not(.checklist-person-dialog)>header{margin:-16px -16px 14px;padding:16px}}

#app dialog input[type="checkbox"]{width:18px;height:18px;min-width:18px;min-height:18px;max-width:18px;padding:0;margin:0;flex:0 0 18px;appearance:auto;accent-color:var(--ui-accent)}
#app dialog .checklist-delete-confirm{display:flex;align-items:center;gap:10px;line-height:1.5;margin:14px 0}
#app dialog.schedule-dialog.request-dialog[open]{display:flex;flex-direction:column;padding:0;overflow:hidden}
#app dialog.schedule-dialog.request-dialog[open]>header{position:static;flex:none;margin:0;padding:20px 24px;border-bottom:1px solid var(--ui-border)}
#app dialog.request-dialog>.request-dialog-body{flex:1;min-height:0;overflow:auto;padding:16px 24px 24px;scrollbar-width:none;overscroll-behavior:contain}
#app .request-dialog-body>p:first-child{margin-top:0}
@media(max-width:700px){#app dialog.schedule-dialog.request-dialog[open]>header{padding:16px}#app dialog.request-dialog>.request-dialog-body{padding:16px}}

/* Shared modal frame: header outside the scrolling content. */
#app dialog.schedule-dialog.modal-frame[open],dialog.photo-viewer.modal-frame[open]{display:flex;flex-direction:column;overflow:hidden;padding:0}
#app dialog.schedule-dialog.modal-frame[open]>header,dialog.photo-viewer.modal-frame[open]>header{position:static;flex:none;z-index:1;margin:0;padding:20px 24px;border-bottom:1px solid #61738b55}
#app dialog.modal-frame>.modal-scroll-body,dialog.photo-viewer.modal-frame>.modal-scroll-body{flex:1;min-height:0;overflow:auto;padding:20px 24px 24px;scrollbar-width:none;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.modal-scroll-body>p:first-child{margin-top:0}
#app dialog label:has(>input[type="checkbox"]){display:flex;align-items:center;gap:10px;line-height:1.5}
#app dialog label>input[type="checkbox"]{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-height:18px;padding:0!important;margin:0;flex:0 0 18px}
dialog.photo-viewer .modal-scroll-body>img{display:block;width:100%;height:min(65dvh,720px);object-fit:contain;background:#101a28;border-radius:10px}
dialog.photo-viewer .modal-scroll-body>p{text-align:center;color:#b9c8da}
dialog.photo-viewer.modal-frame>footer{flex:none;padding:12px 18px;border-top:1px solid #61738b55}
@media(max-width:700px){#app dialog.schedule-dialog.modal-frame[open]>header,dialog.photo-viewer.modal-frame[open]>header{padding:16px}#app dialog.modal-frame>.modal-scroll-body,dialog.photo-viewer.modal-frame>.modal-scroll-body{padding:16px}}

/* iPhone: keep dialogs within the visible screen, including the keyboard. */
@media(max-width:640px){
 #app dialog.schedule-dialog[open],dialog.photo-viewer[open],dialog.notify-dialog[open]{box-sizing:border-box;min-width:0;width:calc(var(--modal-viewport-width,100vw) - 24px);max-width:calc(100vw - 24px);max-height:calc(var(--modal-viewport-height,100dvh) - 24px - env(safe-area-inset-bottom,0px));inset:calc(var(--modal-viewport-top,0px) + 12px) 0 auto;margin:0 auto;transform:none;border-radius:14px}
 #app dialog.modal-frame>.modal-scroll-body,#app dialog.team-dialog>.team-dialog-body,#app dialog.request-dialog>.request-dialog-body,dialog.photo-viewer>.modal-scroll-body{box-sizing:border-box;width:100%;min-width:0;max-height:calc(var(--modal-viewport-height,100dvh) - 112px - env(safe-area-inset-bottom,0px));overflow-x:hidden;overflow-y:auto;padding:16px;flex:0 1 auto}
 #app dialog.schedule-dialog.modal-frame[open]>header,#app dialog.schedule-dialog.request-dialog[open]>header,#app dialog.team-dialog>header{padding:14px 16px;gap:12px;align-items:center}
 #app dialog.schedule-dialog>header h2{font-size:17px;line-height:1.35;overflow-wrap:anywhere}
 #app dialog.schedule-dialog>header button{width:auto;min-width:64px;min-height:40px;flex:none;font-size:13px;padding:8px 10px}
 #app dialog.schedule-dialog :is(form,label,fieldset,input,textarea,select){box-sizing:border-box;min-width:0;max-width:100%}
 #app dialog.schedule-dialog :is(input:not([type=checkbox]):not([type=radio]),textarea,select){font-size:16px;width:100%}
 #app .payroll-dialog .modal-scroll-body>p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
}

/* Compact phone dialogs; keep the body visible on Safari flex layouts. */
@media(max-width:640px){
 #app dialog.schedule-dialog[open]{width:calc(var(--modal-viewport-width,100vw) - 16px);max-width:calc(100vw - 16px);max-height:calc(var(--modal-viewport-height,100dvh) - 16px);top:calc(var(--modal-viewport-top,0px) + 8px);border-radius:12px}
 #app dialog.schedule-dialog.modal-frame[open]>header,#app dialog.schedule-dialog.request-dialog[open]>header,#app dialog.team-dialog>header{padding:10px 12px;gap:8px}
 #app dialog.schedule-dialog>header h2{font-size:15px;line-height:1.3}
 #app dialog.schedule-dialog>header button{font-size:12px;min-width:56px;min-height:34px;padding:6px 8px}
 #app dialog.modal-frame>.modal-scroll-body,#app dialog.team-dialog>.team-dialog-body,#app dialog.request-dialog>.request-dialog-body{flex:0 1 auto;min-height:60px;max-height:calc(var(--modal-viewport-height,100dvh) - 82px);padding:12px;font-size:13px;line-height:1.45}
 #app .payroll-dialog .modal-scroll-body>p{font-size:13px;line-height:1.45;margin-bottom:10px}
 #app dialog.schedule-dialog label{font-size:12px;gap:5px}
 #app dialog.schedule-dialog form{gap:10px}
 #app dialog.schedule-dialog form>button{min-height:38px;padding:8px 12px;font-size:13px}
}

#app form.payroll-attendance-filters,#app .payroll-status-filter form.payroll-attendance-filters{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,240px);gap:12px;align-items:end;margin-bottom:14px}
#app .payroll-attendance-filters label{min-width:0}
@media(max-width:600px){#app form.payroll-attendance-filters,#app .payroll-status-filter form.payroll-attendance-filters{grid-template-columns:minmax(0,1fr)}}

/* Scheduled checklist: compact responsive cards and immediate employee search. */
#app .checklist-assignment-filters{display:grid;grid-template-columns:minmax(140px,1fr) minmax(190px,1.5fr) minmax(150px,1fr) minmax(130px,.8fr) auto;gap:12px;align-items:end;margin-bottom:16px}
#app .checklist-assignment-filters form{display:contents}
#app .checklist-assignment-filters form:last-child{display:block}
#app .checklist-assignment-filters label{min-width:0;margin:0}
#app .checklist-assignment-filters input,#app .checklist-assignment-filters select{width:100%;min-width:0;box-sizing:border-box}
#app .assigned-shift-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}
#app article.assigned-shift-card{display:flex;flex-direction:column;gap:14px;min-width:0;padding:20px;border:1px solid var(--ui-border,var(--line));border-radius:16px;background:rgba(255,255,255,.035);transition:border-color .15s,background .15s}
#app article.assigned-shift-card:hover{border-color:#e6a34f;background:rgba(255,174,80,.045)}
#app .assigned-shift-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0}
#app .assigned-shift-card-head h3{font-size:1.08rem;margin:0;overflow-wrap:anywhere}
#app .assigned-shift-card-head .schedule-branch{margin:0;flex-shrink:0;font-size:.75rem;max-width:48%;overflow-wrap:anywhere}
#app .assigned-shift-person{display:flex;gap:10px;align-items:center;min-width:0}
#app .assigned-shift-person strong{overflow-wrap:anywhere;font-size:.94rem}
#app .assigned-shift-avatar{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:rgba(255,174,80,.15);color:#ffb55e;font-weight:800}
#app .assigned-shift-card .assigned-shift-time{margin:0;color:var(--muted);font-size:.86rem;font-variant-numeric:tabular-nums}
#app .assigned-shift-progress{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.82rem;color:var(--muted);margin-top:auto}
#app .assigned-shift-card progress{appearance:none;display:block;width:100%;height:6px;border:0;border-radius:8px;background:rgba(128,148,168,.2);overflow:hidden}
#app .assigned-shift-card progress::-webkit-progress-bar{background:rgba(128,148,168,.2);border-radius:8px}
#app .assigned-shift-card progress::-webkit-progress-value{background:#ffb155;border-radius:8px}
#app .assigned-shift-card progress::-moz-progress-bar{background:#ffb155;border-radius:8px}
#app .assigned-shift-card>button{width:100%;min-height:42px;margin:0;font-size:.86rem}
#app .assigned-shift-empty{padding:28px 16px;text-align:center;border:1px dashed var(--ui-border,var(--line));border-radius:12px;color:var(--muted)}
@media(max-width:1050px){#app .checklist-assignment-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#app .checklist-assignment-filters form:last-child{justify-self:start}}
@media(max-width:650px){#app .assigned-shift-grid{grid-template-columns:minmax(0,1fr);gap:12px}#app article.assigned-shift-card{padding:16px;gap:12px}#app .checklist-assignment-filters{gap:10px}#app .checklist-assignment-filters [data-checklist-search]{display:contents}#app .checklist-assignment-filters [data-checklist-search]>label{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){#app article.assigned-shift-card{transition:none}}
#app .checklist-assignment-filters [data-checklist-search] input[type="search"]{appearance:none;-webkit-appearance:none}@media(max-width:650px){#app .checklist-assignment-filters [data-checklist-search]>label{grid-row:1}}
