/* Shared header and navigation reused from the restaurant assistant. */
.app-header{position:sticky;top:0;z-index:35;min-height:59px;padding:8px max(16px,calc((100vw - 1040px)/2));background:#fff;border-bottom:1px solid #e6eae1;color:#283c31}
.app-brand,.app-header-right{display:flex;align-items:center;gap:10px}.app-brand strong{font-size:17px}.app-brand small{font-size:10px;color:#7e8c7d}.app-logo{width:33px;height:33px;border-radius:8px;background:#284c3c;color:#fff;display:grid;place-items:center;font:20px serif}.app-header-right small{font-size:11px;color:#7e8c7d}.app-header #logout{min-height:36px;background:#fff;border:1px solid #dbe2d5;color:#284c3c;padding:5px 9px;font-size:12px}
/* Shared feature navigation: a fixed rail on wide screens and a drawer on phones. */
.app-header-left{display:flex;align-items:center;gap:10px;min-width:0}
.menu-toggle{display:none;align-items:center;gap:7px;flex:none;min-height:38px;padding:7px 10px;background:#edf2eb;color:#284c3c;font-size:13px}
.menu-toggle span:first-child{font-size:17px;line-height:1}
.module-sidebar,.sidebar-backdrop{display:none}
.module-sidebar[hidden],.sidebar-backdrop[hidden],.menu-toggle[hidden]{display:none!important}
.module-sidebar{position:fixed;z-index:60;top:59px;bottom:0;left:0;width:240px;background:#fff;border-right:1px solid #e1e7dc;box-shadow:3px 0 18px #173d370d;flex-direction:column;padding:18px 12px calc(14px + env(safe-area-inset-bottom));color:#283c31}
.sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:0 10px 12px;font-size:15px;color:#284c3c}
.sidebar-close{display:none;background:transparent;color:#60746d;font-size:26px;line-height:1;padding:2px 7px}
.sidebar-identity{margin:0 8px 18px;padding:12px;background:#f3f6f1;border-radius:9px;color:#5c6f61;font-size:12px;overflow-wrap:anywhere}
.module-sidebar .module-nav{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;justify-content:stretch;width:100%;gap:5px;overflow:visible;margin:0;padding:0}
.module-sidebar .module-nav button{display:flex;align-items:center;gap:11px;width:100%;min-height:44px;padding:9px 12px;text-align:left;font-size:14px;border-radius:9px;color:#4e6254}
.module-sidebar .module-nav button.active{background:#eaf0e8;color:#214f40;font-weight:700}
.nav-glyph{display:grid;place-items:center;flex:none;width:25px;height:25px;border-radius:7px;background:#f0f3ed;color:#627666;font-size:12px}
.module-sidebar .module-nav button.active .nav-glyph{background:#d6e5d8;color:#214f40}
.sidebar-footer{margin-top:auto;padding:14px 8px 0;border-top:1px solid #edf0ea}
.sidebar-footer button{width:100%;background:#fff;color:#5c6f61;border:1px solid #e1e7dc;font-size:13px}
@media(min-width:960px){.module-sidebar:not([hidden]){display:flex}body.with-sidebar main{width:calc(100% - 240px);max-width:none;margin:0 0 0 240px}.app-header{padding-left:16px;padding-right:20px}}
@media(max-width:959px){.menu-toggle:not([hidden]){display:inline-flex}.sidebar-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:55;background:#10281da8}.module-sidebar:not([hidden]){display:flex;top:0;bottom:0;width:min(300px,86vw);padding-top:calc(18px + env(safe-area-inset-top));transform:translateX(-105%);visibility:hidden;transition:transform .2s ease,visibility .2s}.module-sidebar.open{transform:translateX(0);visibility:visible}.sidebar-close{display:block}body.drawer-open{overflow:hidden}}
@media(max-width:600px){.app-header{gap:7px}.app-brand{gap:7px}.app-brand strong{font-size:15px}.app-brand small{font-size:9px}.app-logo{width:30px;height:30px;font-size:17px}}
@media(prefers-reduced-motion:reduce){.module-sidebar{transition:none!important}}

.mobile-page-title,.sidebar-brand{display:none}
.menu-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:959px){
  body.authenticated .app-header{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;gap:0;min-height:56px;padding:4px 12px}
  body.authenticated .app-header-left{grid-column:1;grid-row:1}
  body.authenticated .app-header .app-brand{display:none}
  body.authenticated .mobile-page-title{display:block;grid-column:2;grid-row:1;text-align:center;font-size:18px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.authenticated .app-header-right{grid-column:3;grid-row:1;justify-content:flex-end}
  body.authenticated .app-header-right small{display:none}
  .app-header .menu-toggle{align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:10px;background:transparent;border:0;border-radius:8px}
  .app-header .menu-toggle:hover{background:#f0f4ee}
  .sidebar-head{padding:0 4px 16px;gap:8px}
  .sidebar-caption{display:none}
  .sidebar-brand{display:flex}
  .sidebar-close{width:44px;height:44px;flex:none}
  body.authenticated main{padding-top:16px}
}
body{background:#f5f6f2;color:#283c31}
main{max-width:1040px;padding:18px 24px 48px}
.app-header{box-sizing:border-box;padding:8px 20px;min-height:59px;display:flex;justify-content:space-between;align-items:center}
.app-header-right small{margin:0;overflow-wrap:anywhere}
.module-sidebar .module-nav button{border:0;background:transparent;font-weight:500}
.module-sidebar .module-nav button.active{background:#eaf0e8;font-weight:700}
.sidebar-footer button{border-radius:9px;min-height:44px;padding:10px 15px}
.sidebar-close{border:0;border-radius:8px}
.inventory-page{max-width:680px;margin:auto}
.inventory-heading{padding:18px 0 19px}
.controls{top:59px;background:#f5f6f2}
.view-accounts .page{max-width:680px;margin:18px auto;padding:0 0 48px}
.view-accounts .account-page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
.view-accounts .account-page-head h1{font-size:24px;margin:0;min-width:0}
.view-accounts .account-add-button{min-height:44px;padding:8px 14px;border:1px solid #b7c9be;background:transparent;font-size:14px;white-space:nowrap;flex:none}
.view-accounts .name{overflow-wrap:anywhere}
.view-accounts .account-main{min-width:0}
#notice{max-width:680px;margin:0 auto 18px}
@media(max-width:959px){
 body.authenticated .app-header{min-height:56px}
 main{padding:16px 16px 32px}
 .inventory-heading{padding:0 0 16px}
 .inventory-heading h1{display:none}
 .inventory-heading .heading{justify-content:flex-end}
 .inventory-heading .header-actions{position:static}
 .inventory-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
 .inventory-heading .heading{order:2;flex:none}
 .inventory-heading .date-label{margin-top:0;min-width:0}
 .controls{top:56px}
 .view-accounts .page{margin-top:0}
 .view-accounts .account-page-head{justify-content:flex-end;margin-bottom:16px}
 .view-accounts .account-page-head h1{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .module-sidebar .sidebar-brand{display:flex}
}
@media(max-width:350px){main{padding-left:12px;padding-right:12px}.inventory-heading{gap:6px}.inventory-heading select{font-size:12px}.view-accounts .account{padding:14px 12px}}

.material-add-dialog{position:fixed;inset:0;margin:auto;width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #dce5db;border-radius:14px;color:#253c33;background:#fff;box-shadow:0 24px 70px #1c302b33}
.material-add-dialog::backdrop{background:#182a2459}
.material-add-dialog[open],.material-add-dialog form{display:flex;flex-direction:column;min-height:0}
.material-add-dialog form{max-height:calc(100dvh - 26px);gap:0}
.material-add-dialog .material-add-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:1px solid #e6eae3;flex:none}
.material-add-dialog .material-add-head h2{font-size:18px;margin:0}
.material-add-dialog .close-material-add{font-size:26px;min-width:44px;min-height:44px;padding:0;background:transparent;border:0}
.material-add-dialog .material-add-body{padding:20px;overflow-y:auto;min-height:0;overscroll-behavior:contain}
.material-add-dialog .material-editor-title{display:block}
.material-add-dialog .material-editor-title label{margin-bottom:8px}
.material-add-dialog .material-editor-title input{font-size:18px;border:1px solid #dce2d9;padding:10px 12px}
.material-add-dialog .material-add-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:none;padding:14px 20px;background:#f8faf6;border-top:1px solid #e6eae3}
.material-add-dialog .material-add-actions button{min-height:48px}
.material-add-dialog .material-add-error{color:#a23b32;margin-top:14px}
.account-edit-dialog{width:min(440px,calc(100% - 24px))}
.account-edit-dialog .form-fields{display:grid;gap:16px;padding:20px;min-height:0;overflow-y:auto}
.account-edit-dialog .field{min-width:0}
.account-edit-dialog .field input{width:100%;min-height:46px}
.account-edit-dialog .account-edit-error{color:#a23b32;margin:0}
.visibility-overlay{z-index:70}.visibility-dialog{z-index:71}
.material-add-dialog label{margin:0;font-size:13px}.material-add-dialog label input{margin-top:8px}
.material-add-dialog button{border:1px solid #dbe2d5;border-radius:8px;background:#fff;color:#284c3c;font-weight:600;min-height:48px;padding:10px 16px}
.material-add-dialog button.primary{background:#284c3c;border-color:#284c3c;color:#fff}
