.login-screen{min-height:100dvh;display:grid;place-items:center;padding:22px;background:var(--bg)}
.login-card{width:min(420px,100%);margin:0}.login-logo{width:150px;max-width:100%;height:auto;display:block;margin:auto}.login-card h1{font-size:23px;text-align:center}.login-card p{overflow-wrap:anywhere}.login-card button:not(.save){border:1px solid var(--line);background:#FFF6D8;border-radius:7px;padding:8px}
#cloud-toolbar{position:sticky;top:0;z-index:25;margin-left:218px;padding:8px 22px;background:#FFF6D8;display:flex;gap:8px;flex-wrap:wrap;align-items:center;font-size:12px}#cloud-toolbar button{border:1px solid var(--line);border-radius:6px;padding:5px 9px;background:white;color:var(--ink)}
#cloud-status{flex:1;min-width:160px;overflow-wrap:anywhere}#cloud-toolbar.failed{background:#fff1e9}#app-root[inert]{opacity:.85}
@media(max-width:1150px){#cloud-toolbar{margin-left:185px}}@media(max-width:760px){#cloud-toolbar{margin-left:0;padding:8px 14px}.login-screen{padding:14px}}

#sheet-sync-dialog{width:min(760px,calc(100vw - 28px));max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:16px;background:white;color:var(--ink);padding:18px;box-sizing:border-box}#sheet-sync-dialog::backdrop{background:#0005}.sync-table-wrap{overflow-x:auto}#sheet-sync-dialog table{width:100%;table-layout:fixed;font-size:13px}#sheet-sync-dialog td,#sheet-sync-dialog th{white-space:normal;word-break:normal;overflow-wrap:anywhere;padding:8px;text-align:left;border-bottom:1px solid var(--line)}#sheet-sync-dialog button{margin:4px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#FFF6D8;color:var(--ink)}#sheet-sync-status{overflow-wrap:anywhere}

/* Mobile header only. Desktop action wrappers flatten to preserve its layout. */
.mobile-room-title,.mobile-action-label,.mobile-disclosure,.mobile-more-label,.mobile-menu-label{display:none}
.mobile-extra-actions{display:contents}
@media(max-width:760px){
 .login-logo,.business-app aside .logo{display:none!important}
 #cloud-toolbar{position:static;margin:0;padding:10px 14px 8px;gap:6px;background:#F1E9DE;display:flex;flex-wrap:wrap}
 .mobile-room-title{display:block;flex:0 0 100%;font-size:19px;line-height:1.35;color:var(--ink);font-weight:600}
 #cloud-status{flex:0 0 100%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;line-height:1.4;order:1}
 .desktop-action-label{display:none}.mobile-action-label{display:inline}
 #cloud-refresh{order:2;flex:1 1 145px}#sheet-import{order:3;flex:1 1 110px}
 #cloud-toolbar button,.mobile-more-label{font-size:11px;line-height:1.4;padding:7px 8px;border-radius:7px}
 .mobile-disclosure{display:block;position:absolute;width:1px;height:1px;margin:-1px;clip-path:inset(50%);overflow:hidden;opacity:0}
 .mobile-more-label{display:block;order:4;border:1px solid var(--line);background:white;cursor:pointer;color:var(--ink)}
 .mobile-disclosure:focus-visible+label{outline:2px solid var(--brown);outline-offset:2px}
 #cloud-toolbar .mobile-extra-actions{display:none;order:5;flex:0 0 100%;gap:6px;flex-wrap:wrap}
 #mobile-actions-toggle:checked~.mobile-extra-actions{display:flex}
 #cloud-toolbar .mobile-extra-actions button{flex:1 1 140px}
 #sheet-sync-status{flex:0 0 100%;font-size:10px;line-height:1.4}
 #sheet-sync-status:empty{display:none}
 .business-app aside{position:static;width:100%;padding:0 14px 6px;background:#F1E9DE}
 .mobile-menu-label{display:block;font-size:12px;line-height:1.4;padding:7px 0;color:var(--ink);cursor:pointer}
 .business-app aside #nav{display:none}
 #mobile-menu-toggle:checked~#nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;max-height:245px;overflow-y:auto;overflow-x:hidden;padding-bottom:4px}
 .business-app #nav button{width:100%;min-width:0;max-width:100%;font-size:12px;line-height:1.4;padding:8px 9px;border-radius:6px;white-space:normal}
 .business-app main{padding-top:10px}
 .business-app main>header>span{display:none}
 .business-app main>header{gap:7px}
 .business-app main>header #search{padding:9px 12px;font-size:13px}
 .business-app .data-actions{gap:5px}
 .business-app .data-actions button,.business-app .data-actions label{font-size:11px;padding:5px 8px}
 .business-app .notice{font-size:10px;line-height:1.4;margin:8px 0}
}

/* Search only: keep the existing header and brand palette. */
.business-app header .search-bar{display:flex;align-items:center;flex:1 1 280px;min-width:0;gap:0;background:#fff;border:1px solid #BDA58A;border-radius:10px;overflow:hidden;box-shadow:0 1px 3px #4937290d}
.business-app header .search-bar:focus-within{outline:2px solid #9A6943;outline-offset:2px}
.business-app header .search-bar #search{flex:1;width:100%;min-width:0;border:0;border-radius:0;background:#fff;box-shadow:none;color:var(--ink);outline:none}
.business-app header .search-bar #search::placeholder{color:#776553;opacity:1}
.business-app #search-submit{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;min-height:44px;align-self:stretch;border:0;border-left:1px solid #E5CDAF;background:#F1E9DE;color:#77421C;cursor:pointer;touch-action:manipulation}
.business-app #search-submit:hover{background:#E5CDAF}
.business-app #search-submit:focus-visible{outline:2px solid #9A6943;outline-offset:-3px}
.search-results{margin-bottom:20px}
@media(max-width:760px){.business-app header .search-bar{flex-basis:100%;width:100%}.business-app header .search-bar #search{padding:9px 12px}.search-results h2{font-size:17px}}

/* Sync feedback remains visible outside the collapsed mobile actions. */
#sheet-sync-status{flex:0 0 100%;min-width:0;max-width:100%;box-sizing:border-box;padding:7px 9px;border:1px solid var(--line);border-radius:7px;background:#fff;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#sheet-sync-status:empty{display:none}
#sheet-sync-status[data-kind="error"]{color:#8C3024;border-color:#D9A79E}
#sheet-sync-status[data-kind="pending"]{color:var(--ink)}
@media(max-width:760px){#sheet-sync-status{order:4;font-size:11px}}

/* Mobile sync preview only; desktop tables and approval controls are unchanged. */
#sheet-sync-dialog .sync-mobile-cards{display:none}
@media(max-width:760px){
 #sheet-sync-dialog .sync-desktop-table{display:none}
 #sheet-sync-dialog .sync-mobile-cards{display:grid;gap:12px;min-width:0;max-width:100%}
 #sheet-sync-dialog .sync-product-card{min-width:0;max-width:100%;box-sizing:border-box;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;overflow-wrap:anywhere;line-height:1.6}
 #sheet-sync-dialog .sync-product-card h4{margin:0 0 6px;font-size:15px}
 #sheet-sync-dialog .sync-card-result{margin:0 0 10px;font-weight:600}
 #sheet-sync-dialog .sync-product-card dl{margin:0}
 #sheet-sync-dialog .sync-product-card dl>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;padding:5px 0}
 #sheet-sync-dialog .sync-product-card dt{font-size:12px;color:var(--muted)}
 #sheet-sync-dialog .sync-product-card dd{margin:0;min-width:0;font-size:13px}
 #sheet-sync-dialog .sync-card-reason{margin:8px 0;font-size:12px}
 #sheet-sync-dialog .sync-card-blocked{padding:9px;border:1px solid #D9A79E;border-radius:8px;background:#FFF5F2;color:#8C3024;font-size:12px}
 #sheet-sync-dialog .sync-card-blocked p{margin:5px 0 0}
 #sheet-sync-dialog .has-conflict{border-color:#D9A79E}
 #sheet-sync-dialog .sync-card-changes{border-top:1px solid var(--line);margin-top:10px;padding-top:9px;font-size:12px}
 #sheet-sync-dialog .sync-card-changes section{padding:8px 0;border-bottom:1px solid var(--line)}
 #sheet-sync-dialog .sync-card-changes section:last-child{border-bottom:0}
}

/* Current-menu filter feedback. */
.filter-notice{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:10px;font-size:12px;overflow-wrap:anywhere}
.filter-notice span{min-width:0}
.filter-notice button{flex-shrink:0}
@media(max-width:760px){.filter-notice{align-items:stretch;flex-direction:column}.filter-notice button{white-space:normal;min-height:40px}}
