/* Food CRM mockups: shared styles. Load before the page's own <style>. */
:root{--ink:#20211f;--ink-2:#34342f;--muted:#77736d;--muted-2:#8a867e;--faint:#aaa69f;--line:#e9e6e0;--line-2:#e5e3df;--bg:#f7f6f3;--surface:#fff;--field:#faf9f7;--hover:#f3f1ed;--accent:#a56f3f;--focus:#a88a69;--danger:#a3443c;--danger-soft:#fbf0ee;--btn:#20211f;--btn-hover:#41413d;--btn-disabled:#d5d2cd;--radius:4px;--radius-card:8px}
*{box-sizing:border-box}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:focus-visible,a:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* ===== App shell: sidebar, bottom navigation, account menu, role preview bar ===== */
.bottom{position:fixed;z-index:3;bottom:0;left:0;right:0;display:flex;justify-content:space-around;min-height:64px;padding:7px 4px max(7px,env(safe-area-inset-bottom));border-top:1px solid #e9e6e0;background:#fff}
.bottom a{display:flex;flex:1;flex-direction:column;align-items:center;gap:4px;padding:4px 1px;color:#77736d;text-decoration:none;font-size:10px;min-height:50px}
.bottom a.active{color:#a56f3f;font-weight:700}
.bottom svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.layout{min-height:100vh;display:flex}
.workspace{min-width:0;flex:1}
.sidebar{position:sticky;top:0;height:100vh;width:240px;flex:0 0 240px;display:flex;flex-direction:column;padding:24px 16px 20px;background:#fff;border-right:1px solid #ebe9e4}
.sidebar-top{height:36px;flex:0 0 36px;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:24px}
.sidebar-toggle{display:flex;align-items:center;gap:12px;width:100%;min-height:43px;margin-top:20px;padding:0 12px;border:0;border-radius:5px;background:transparent;color:#696660;text-align:left;font-size:13px}
.sidebar-toggle:hover{background:#f5f4f1}
.sidebar.collapsed{width:72px;flex-basis:72px;padding-right:12px;padding-left:12px}
.sidebar.collapsed .sidebar-top{justify-content:flex-start}
.sidebar.collapsed .brand{margin-left:6px}
.sidebar.collapsed .sidebar-toggle{justify-content:center;padding:0}
.sidebar.collapsed .sidebar-toggle span{display:none}
.sidebar.collapsed .nav button span{display:none}
.sidebar.collapsed .account-info{display:none}
.sidebar.collapsed .nav button{justify-content:center;padding:0}
.sidebar.collapsed .account-trigger{padding-left:6px}
.sidebar.collapsed .sidebar-toggle svg{transform:rotate(180deg)}
.brand{display:block;width:36px;height:36px;flex:0 0 auto;margin-left:2px}
.brand svg{display:block;width:100%;height:100%}
.nav{display:grid;gap:3px}
.nav button{border:0;background:transparent;color:#77736d;display:flex;align-items:center;gap:12px;width:100%;min-height:43px;padding:0 12px;border-radius:5px;text-align:left;font-size:13px}
.bottom button{border:0;background:transparent;color:#77736d;display:flex;flex:1;flex-direction:column;align-items:center;gap:4px;padding:4px 1px;text-decoration:none;font-size:10px;min-height:50px;font-family:inherit;cursor:pointer}
.nav button:hover{background:#f5f4f1}
.nav button.active{background:#f1efeb;color:#20211f;font-weight:700}
.icon{width:20px;height:20px;flex:0 0 20px;display:inline-block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.account{position:relative;margin-top:auto;padding:18px 0 0;border-top:1px solid #efede9}
.account-trigger{display:flex;align-items:center;gap:10px;width:100%;height:36px;padding:0 8px;border:0;background:transparent;color:inherit;text-align:left}
.account-menu{position:absolute;z-index:5;bottom:calc(100% - 18px);left:0;display:none;width:max(100%,180px);padding:6px;border:1px solid #e9e6e0;border-radius:8px;background:#fff;box-shadow:0 8px 24px #20211f18}
.account:hover .account-menu{display:block}
.account:focus-within .account-menu{display:block}
.account-menu button{display:block;width:100%;padding:10px 12px;border:0;border-radius:5px;background:transparent;color:#34342f;text-align:left;font:inherit;font-size:12px}
.account-menu button:hover{background:#f1efeb}
.account-menu button:focus-visible{background:#f1efeb}
.avatar{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:50%;background:#eee9e1;color:#765a42;font-size:12px;font-weight:750}
.account strong{display:block}
.account small{display:block;margin-top:2px;color:#8a867e;font-size:11px}
.account-info{line-height:1.2}
.crumbs-nav{display:none}
.bottom button.active{color:#a56f3f;font-weight:700}
.bottom .icon{width:21px;height:21px}
.bottom button .icon{width:21px;height:21px}
@media(width<1024px){
.sidebar{display:none}
.layout{display:block}
}
@media(min-width:1024px){
.sidebar{position:fixed;z-index:4;top:0;left:0;height:100vh;box-shadow:4px 0 20px #20211f12}
.sidebar.collapsed{box-shadow:none}
.workspace{margin-left:72px;min-width:0;flex:1}
.layout{min-height:100vh;display:flex}
.bottom{display:none}
.crumbs-nav{display:block}
}

/* ===== Base ===== */
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif}

/* ===== Page title, breadcrumbs, page head ===== */
h1{margin:0;font-size:29px;letter-spacing:-.045em}
:where(.forms) h1{margin:0 0 12px;line-height:1.15}
.breadcrumbs{display:flex;align-items:center;gap:10px;margin:0;color:var(--ink);font-size:29px;font-weight:700;letter-spacing:-.045em}
@media(max-width:1023px){:where(.forms) .breadcrumbs{margin:0 0 12px}}
.breadcrumbs a{color:#696660;text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}
.breadcrumbs>span[aria-hidden]{color:#696660}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
@media(min-width:1024px){
h1{font-size:25px}
.breadcrumbs{font-size:25px;line-height:1.45}
.page-head{gap:16px;margin:0 0 12px;max-width:1200px}
}

/* ===== Buttons: one size (44px mobile, 36px desktop) ===== */
.primary,.save,.head-btn,.create,.btn,.ghost,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border:0;border-radius:var(--radius);background:var(--btn);color:#fff;font-size:13px;font-weight:700;line-height:1.2;text-align:center;text-decoration:none;transition:background-color .16s ease,transform .16s ease}
.primary:hover:not(:disabled),.save:hover:not(:disabled),.head-btn:hover:not(:disabled),.create:hover:not(:disabled),.btn:hover:not(:disabled){background:var(--btn-hover)}
.primary:active,.save:active,.head-btn:active,.create:active,.btn:active,.ghost:active,.secondary:active{transform:translateY(1px)}
.primary:disabled,.save:disabled,.head-btn:disabled,.create:disabled,.btn:disabled{background:var(--btn-disabled);color:#fff;cursor:not-allowed}
.ghost,.secondary{border:1px solid var(--line-2);background:var(--surface);color:var(--ink-2)}
.ghost:hover:not(:disabled),.secondary:hover:not(:disabled){background:var(--hover)}
@media(min-width:1024px){
.primary,.save,.head-btn,.create,.btn,.ghost,.secondary{min-height:32px;font-size:12px}
}

/* ===== Cards, text helpers, badges ===== */
.section{padding:16px;margin-bottom:12px;border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface)}
.hint{margin:6px 0 0;color:var(--muted-2);font-size:11px}
.meta{color:var(--muted);font-size:12px}
.notice{padding:12px;background:var(--field);border-radius:var(--radius);font-size:12px;line-height:1.6}
.field{display:block;margin:16px 0 7px;font-size:12px;font-weight:700}
.badge{display:inline-block;padding:5px 8px;border-radius:var(--radius);background:#dcefe0;color:#32633e;font-size:10px;font-weight:700;white-space:nowrap}
@media(min-width:1024px){
.section{padding:20px 22px}
}

/* ===== Form fields (pages with <body class="forms">) ===== */
:where(.forms) input:not([type=checkbox]),:where(.forms) select{width:100%;height:48px;padding:0 13px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--field);color:#242521;font-size:14px;transition:border-color .15s ease}
:where(.forms) select{font:inherit}
:where(.forms) input:not([type=checkbox]):hover,:where(.forms) select:hover{border-color:#c8c3bc}
:where(.forms) input:not([type=checkbox]):focus,:where(.forms) select:focus{outline:none;border-color:var(--focus)}
:where(.forms) input::placeholder{color:var(--faint)}
@media(min-width:1024px){
:where(.forms) input:not([type=checkbox]),:where(.forms) select{height:32px;font-size:12px}
}

/* ===== Page spacing: the same on every screen ===== */
main,.content{max-width:600px;margin:0 auto;padding:12px 16px 100px}
.heading{gap:12px}
.filters,.search-row,.toolbar{margin:12px 0}
.tabs{margin:12px 0 0}
.panel-head{padding:2px 8px}
.row,.order,.client-row,.org-row,.catalog-product{padding:16px}
@media(min-width:1024px){
main,.content{max-width:1600px;padding:14px 16px 100px}
.filters,.search-row,.toolbar{margin:12px 0}
.tabs{margin:12px 0 0}
.row,.order,.client-row,.org-row,.catalog-product,.user-row,#production-rows .row{min-height:56px!important;padding:8px 14px!important;box-sizing:border-box}
}

/* ===== Desktop controls: every input and button is 32px tall (navigation and menus excluded) ===== */
@media(min-width:1024px){
button:not(.sidebar-toggle):not(.account-trigger):not(.account-menu button):not(.nav button):not(.row-menu button):not(.tabs button):not(.switch button):not(.pagination button):not(.group):not(.client):not(.address-option),
a.primary,a.save,a.ghost,a.secondary,a.head-btn,a.create,
input:not([type=checkbox]):not([type=radio]):not(.pagination input),
select{height:32px!important;min-height:32px!important}
.icon-trash,.icon-button,.row-menu-button,.filter-button,.filter,.close{width:auto;min-width:32px}
.icon-trash,.row-menu-button,.close,.desktop-filter-close,.dialog-close{width:32px!important}
.tabs,.switch{height:32px!important;padding:2px!important;border-radius:6px!important}
.tabs button,.switch button{height:28px!important;min-height:28px!important;padding:0 14px!important;border-radius:4px!important}
.panel-head{min-height:0!important;padding:2px 8px}
.pagination button{width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important}
.pagination input{width:36px!important;height:24px!important;min-height:24px!important}
}

/* ===== List pages (<body class="fill">): on desktop the table takes the rest of the screen and only its rows scroll ===== */
@media(min-width:1024px){
.fill main,.fill .content{display:flex;flex-direction:column;height:100vh;padding-bottom:14px;overflow:hidden}
.fill main>*,.fill .content>*{flex:none}
.fill main>section:not([hidden]):not(.more),.fill #home:not([hidden]){display:flex!important;flex-direction:column;flex:1 1 0;min-height:0}
.fill #home{align-items:stretch!important}
.fill #home>*:not(.panel),.fill main>section>*:not(.panel){flex:none}
.fill .panel:not(.more){display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow-x:auto;overflow-y:hidden}
.fill .panel-head,.fill .panel>.table-head{flex:none}
.fill .panel>.table-head,.fill .panel>:is(.list,#list,#rows,#production-rows,#catalog-groups){scrollbar-gutter:stable}
.fill .panel>:is(.list,#list,#rows,#production-rows,#catalog-groups){flex:1 1 0;min-height:0;overflow-y:auto}
.fill .order-header,.fill .client-header{position:sticky;top:0;z-index:1;background:#fff}
}

/* ===== Entity pages on desktop: the page never scrolls; columns (or the single content area) scroll on their own ===== */
@media(min-width:1024px){
.cols main,.single main{display:flex;flex-direction:column;height:100vh;padding-bottom:14px;overflow:hidden}
.cols main>*,.single main>*{flex:none}
.cols main>form{flex:1 1 0;min-height:0;display:flex!important;flex-direction:column}
.cols .client-layout,.cols .product-layout{flex:1 1 0;min-height:0;grid-template-rows:minmax(0,1fr);align-items:stretch!important}
.cols .client-main,.cols .client-aside,.cols .product-main,.cols .product-aside{min-height:0;overflow-y:auto;position:static!important}
.single .scroll-area{flex:1 1 0;min-height:0;overflow-y:auto}
}

