/* Palette 1 + structural shell from the approved HTML. Module bodies remain independent. */
body[data-design="graphite-1"]{--bg:#f3f7f7;--surface:#fff;--ink:#183336;--text:#183336;--muted:#526c70;--line:#bdced0;--border:#bdced0;--accent:#0b6471;--soft:#e7f2f2;--nav:#102e34;--navactive:#244c55;--navtext:#e7f0f5;--green:#18734d;--greensoft:#e9f6ee;--red:#a63e3e;--redsoft:#fbeeee;--amber:#896012;--ambersoft:#fff6df;--card-bg:#fff;--sidebar-width:208px;margin:0;height:100dvh;min-height:0;overflow:hidden;background:var(--bg);color:var(--ink);font:14px/1.5 Arial,Helvetica,sans-serif}
body[data-design="graphite-1"] *{box-sizing:border-box}
body[data-design="graphite-1"] .graphite-shell{display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr);grid-template-rows:64px minmax(0,1fr);height:100%;min-height:0;width:100%;max-width:none;margin:0;padding:0;gap:0;overflow:hidden}
body[data-design="graphite-1"]:not(.nav-expanded){--sidebar-width:64px}
body[data-design="graphite-1"] .graphite-topbar{grid-column:1/-1;position:relative!important;inset:auto!important;height:64px!important;min-height:0;margin:0;padding:0 22px!important;border:0;border-bottom:1px solid var(--line);box-shadow:none;background:var(--surface);z-index:50;transform:none}
body[data-design="graphite-1"] .graphite-topbar:after,body[data-design="graphite-1"] .graphite-topbar:before{display:none}
body[data-design="graphite-1"] .graphite-topbar-inner{height:100%;width:100%;max-width:none;margin:0;padding:0!important;display:flex!important;align-items:center;gap:18px!important;flex-wrap:nowrap!important}
body[data-design="graphite-1"] .brand{width:164px;min-width:164px;height:45px;padding:0;display:flex;align-items:center;flex:none}
body[data-design="graphite-1"] .brand-wordmark{display:block;width:164px!important;max-width:164px;height:auto!important;max-height:44px;object-fit:contain;filter:none}
body[data-design="graphite-1"] .top-global-search-wrap{flex:1 1 320px;width:auto;max-width:480px;min-width:100px;margin:0;position:relative}
body[data-design="graphite-1"] .top-global-search{height:38px;min-height:38px;background:var(--bg);border:1px solid var(--line);border-radius:5px;box-shadow:none;padding:0 10px;gap:8px;display:flex;align-items:center;margin:0;width:100%}
body[data-design="graphite-1"] .top-global-search input{font:14px Arial;min-height:0;height:36px;padding:0 6px;background:transparent;border:0;box-shadow:none;color:var(--ink);width:100%;min-width:0}
body[data-design="graphite-1"] .top-actions{display:flex!important;flex:0 0 auto;flex-wrap:nowrap!important;align-items:center;gap:8px!important;margin-left:auto;width:auto!important;min-width:0}
body[data-design="graphite-1"] .top-actions .app-version-mini{font-size:10px;color:var(--muted)}
body[data-design="graphite-1"] .erp-daymeter{display:flex;flex-direction:row;align-items:center;flex:0 0 320px;width:320px;min-width:320px;max-width:320px;min-height:0;height:52px;padding:0;gap:12px;border:0;border-radius:0;background:none;box-shadow:none;font-size:13px;position:relative;cursor:default}
body[data-design="graphite-1"] .erp-daymeter-context{display:flex;flex-direction:column;flex:1 1 224px;min-width:0;height:52px;padding:2px 6px;gap:1px;position:relative;color:inherit;text-decoration:none}
body[data-design="graphite-1"] .erp-daymeter-primary{display:contents}
body[data-design="graphite-1"] .erp-daymeter-date{font-size:13px;line-height:18px;font-weight:600;white-space:normal;overflow:visible;text-overflow:clip;max-width:none;order:0}
body[data-design="graphite-1"] .erp-daymeter-time{position:static;display:flex;align-items:center;justify-content:center;flex:0 0 84px;width:84px;height:38px;padding:3px 5px;border:0;border-radius:4px;background:var(--bg);color:var(--muted);font-size:28px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:0;white-space:nowrap;cursor:default;box-shadow:none}
body[data-design="graphite-1"] .erp-daymeter-secondary{font-size:11px;line-height:16px;gap:2px;padding-right:0;order:1}
body[data-design="graphite-1"] .erp-daymeter-state,body[data-design="graphite-1"] .erp-daymeter-countdown{font-size:11px;line-height:15px;white-space:normal}
body[data-design="graphite-1"] .erp-daymeter-status-line{gap:4px;white-space:normal;align-items:start}
body[data-design="graphite-1"] .erp-daymeter-track{height:2px;left:6px;right:6px;bottom:3px;width:auto;max-width:calc(100% - 12px)}
body[data-design="graphite-1"] .top-actions :is(.notification-bell,.chat-drawer-launch,.support-mini-link),body[data-design="graphite-1"] .global-back-button{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:7px;width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;border:1px solid var(--line);border-radius:5px!important;background:var(--surface);box-shadow:none;color:var(--ink);font-size:18px}
body[data-design="graphite-1"] .top-actions svg{height:19px;width:19px;stroke:currentColor;stroke-width:1.7;fill:none}
body[data-design="graphite-1"] .notification-count-badge{font:700 10px/1 Arial;min-width:16px;min-height:16px;padding:3px;top:-5px;right:-5px;border-width:1px}
body[data-design="graphite-1"] .graphite-topbar .user-profile-chip{display:flex;flex:0 0 auto;gap:8px;border:0;background:none;border-radius:0;padding:0;box-shadow:none;color:var(--ink);font-size:12px;max-width:155px;min-width:34px;height:38px}
body[data-design="graphite-1"] .user-profile-chip>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-design="graphite-1"] .top-avatar{height:34px!important;width:34px!important;min-width:34px;font-size:12px;flex:none;background:var(--soft);color:var(--accent);border:0}
body[data-design="graphite-1"] .top-actions .ghost-button{height:38px;min-height:38px;padding:8px 10px;border:1px solid var(--line);border-radius:5px;font-size:12px;color:var(--ink);background:#fff}
body[data-design="graphite-1"] .logout-inline{display:contents}
body[data-design="graphite-1"] .graphite-navigation{grid-column:1;grid-row:2;position:relative!important;inset:auto!important;min-height:0;width:auto!important;height:auto!important;margin:0!important;padding:0!important;background:var(--nav);z-index:40;border:0;box-shadow:none;overflow:visible}
body[data-design="graphite-1"] #nav-sidebar{position:static!important;inset:auto!important;width:100%!important;height:100%!important;max-height:none;display:flex;flex-direction:column;gap:0;padding:12px 10px 10px;overflow-y:hidden;overflow-x:hidden;background:var(--nav);border:0;border-radius:0;box-shadow:none;scrollbar-width:thin;color:var(--navtext)}
body[data-design="graphite-1"] .nav-caption{font-size:10px;letter-spacing:1.1px;opacity:.62;height:28px;min-height:28px;flex:none;box-sizing:border-box;padding:4px 12px 10px;white-space:nowrap}
body[data-design="graphite-1"] #nav-sidebar :is(.nav-section,.nav-more-toggle){display:flex;align-items:center;justify-content:flex-start;gap:10px;flex:none;width:100%;min-width:0;min-height:44px;height:44px;box-sizing:border-box;padding:8px 10px;margin:0 0 4px;border:1px solid transparent;border-radius:5px;font:16px/1.4 Arial;text-decoration:none;color:var(--navtext);background:none;box-shadow:none;text-align:left;overflow:visible;transform:none}
body[data-design="graphite-1"] #nav-sidebar :is(.nav-section,.nav-more-toggle):hover{background:var(--navactive)}
body[data-design="graphite-1"] #nav-sidebar .nav-section.active{background:var(--navactive);border-color:#ffffff70;box-shadow:inset 3px 0 var(--navtext)}
body[data-design="graphite-1"] #nav-sidebar .nav-section svg{width:22px;height:22px;flex:0 0 22px;stroke:currentColor;stroke-width:1.7;fill:none}
body[data-design="graphite-1"] #nav-sidebar .nav-label{display:block;font:16px/1.4 Arial;opacity:1;visibility:visible;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
body[data-design="graphite-1"] .nav-toggle{width:100%;height:40px;min-height:40px;border:0;margin:0;padding:0 12px;background:transparent;color:var(--navtext);text-align:right;border-radius:3px;flex:none}
body[data-design="graphite-1"] .nav-chevron{font-size:23px;line-height:1}
body[data-design="graphite-1"]:not(.nav-expanded) #nav-sidebar{padding-inline:6px}
body[data-design="graphite-1"]:not(.nav-expanded) #nav-sidebar .nav-label{display:none!important}
body[data-design="graphite-1"]:not(.nav-expanded) #nav-sidebar :is(.nav-section,.nav-more-toggle){justify-content:center;padding:8px}
body[data-design="graphite-1"] .nav-more-panel{position:fixed!important;top:calc(var(--nav-top,64px) + 8px)!important;left:calc(var(--sidebar-width) + 8px)!important;right:auto!important;bottom:12px;max-height:calc(100dvh - var(--nav-top,64px) - 20px);width:min(440px,calc(100vw - var(--sidebar-width) - 20px));padding:18px;overflow:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:0 8px 32px #102e3429;border-radius:6px;z-index:90}
body[data-design="graphite-1"] .nav-more-panel[hidden]{display:none!important}
/* The panel is inside the sidebar's stacking context (40). Raise that context
   while open above page tabs (55); raising only the panel cannot escape it.
   Closed navigation and the page's own modal/dialog layers remain unchanged. */
body[data-design="graphite-1"] .graphite-navigation:has(.nav-more-panel:not([hidden])){z-index:60}
body[data-design="graphite-1"] .nav-more-panel h2{font-size:18px;margin:0 0 10px}
body[data-design="graphite-1"] .nav-more-panel p{font-size:12px}
body[data-design="graphite-1"] .graphite-main{display:flex;flex-direction:column;grid-column:2;grid-row:2;overflow:auto;min-width:0;min-height:0;position:relative;scroll-padding-top:12px;background:var(--bg)}
body[data-design="graphite-1"] .graphite-main>.page{flex:1 0 auto;padding:22px 28px;min-height:0;max-width:none;width:100%;margin:0!important;display:block}
body[data-design="graphite-1"] .page:has(#inventory){padding:0}
body[data-design="graphite-1"] .nav-context:empty,body[data-design="graphite-1"] .graphite-navigation .nav-context{display:none}
body[data-design="graphite-1"] .graphite-main>.page>.nav-context{position:sticky!important;inset:0 auto auto!important;margin:0 0 18px;padding:8px 0;display:flex;gap:8px;flex-wrap:wrap;min-height:0;width:100%;background:var(--bg);z-index:25}
body[data-design="graphite-1"] .footer{position:static;grid-column:auto;margin:0!important;padding:12px 28px;min-height:0;background:var(--bg);color:var(--muted);font-size:11px;flex-wrap:wrap;display:flex;gap:8px}
body[data-design="graphite-1"] .mobile-bottom-nav{display:none!important}
body[data-design="graphite-1"] :is(a,button,input,select,textarea):focus-visible{outline:3px solid #3897d0;outline-offset:3px}
body[data-design="graphite-1"]:has(.impersonation-shell) .graphite-shell{grid-template-rows:auto 64px minmax(0,1fr)}
body[data-design="graphite-1"]:has(.impersonation-shell) .impersonation-shell{grid-column:1/-1;grid-row:1;position:static}
body[data-design="graphite-1"]:has(.impersonation-shell) :is(.graphite-main,.graphite-navigation){grid-row:3}
body[data-design="graphite-1"]:not(:has(.graphite-navigation)) .graphite-main{grid-column:1/-1}
@media(min-width:1600px){body[data-design="graphite-1"].nav-expanded{--sidebar-width:225px}}
@media(max-width:1100px){body[data-design="graphite-1"].nav-expanded{--sidebar-width:180px}body[data-design="graphite-1"] .user-profile-chip>span:last-child,body[data-design="graphite-1"] .app-version-mini{display:none}body[data-design="graphite-1"] .graphite-topbar{padding-inline:14px!important}body[data-design="graphite-1"] .graphite-topbar-inner{gap:10px!important}body[data-design="graphite-1"] .graphite-main>.page{padding:18px}body[data-design="graphite-1"] .page:has(#inventory){padding:0}}
@media(max-width:720px){body[data-design="graphite-1"]{--sidebar-width:52px!important}body[data-design="graphite-1"] .graphite-shell{grid-template-rows:auto minmax(0,1fr)}body[data-design="graphite-1"] .graphite-topbar{height:auto!important;min-height:64px;padding:8px!important}body[data-design="graphite-1"] .graphite-topbar-inner{flex-wrap:wrap!important;gap:6px!important}body[data-design="graphite-1"] .brand{min-width:105px;width:105px;height:36px}body[data-design="graphite-1"] .brand-wordmark{width:105px!important;max-width:105px;height:auto!important}body[data-design="graphite-1"] .top-global-search-wrap{order:3;max-width:none;flex:1 0 100%;height:34px}body[data-design="graphite-1"] .top-global-search{height:34px;min-height:34px}body[data-design="graphite-1"] .top-actions{gap:5px!important}body[data-design="graphite-1"] .erp-daymeter{display:flex;flex:1 0 100%;width:100%;min-width:0;max-width:none;height:52px;padding-inline:0}body[data-design="graphite-1"] .erp-daymeter-time{height:34px}body[data-design="graphite-1"] .top-actions{flex-wrap:wrap!important;justify-content:flex-end;flex:1 0 100%;width:100%!important}body[data-design="graphite-1"] .top-global-search-wrap{order:0;flex:1 1 120px;max-width:none}body[data-design="graphite-1"] .erp-daymeter-date{font-size:14px}body[data-design="graphite-1"] .top-actions .ghost-button{font-size:11px;padding:6px}body[data-design="graphite-1"] .top-actions :is(.notification-bell,.chat-drawer-launch,.support-mini-link),body[data-design="graphite-1"] .global-back-button{min-width:30px!important;width:30px!important;height:34px!important;min-height:34px!important;padding:5px}body[data-design="graphite-1"] .user-profile-chip{max-width:30px;min-width:30px}body[data-design="graphite-1"] .top-avatar{width:28px!important;height:28px!important;min-width:28px}body[data-design="graphite-1"] .global-back-button{display:none}body[data-design="graphite-1"].nav-expanded .graphite-navigation{width:min(260px,calc(100vw - 70px))!important;box-shadow:8px 0 24px #102e3433}body[data-design="graphite-1"] .nav-more-panel{left:60px!important;width:calc(100vw - 68px)}body[data-design="graphite-1"] .graphite-main>.page{padding:12px}body[data-design="graphite-1"] .page:has(#inventory){padding:0}}

/* Intermediate windows wrap the actions as a row instead of clipping Logout.
   Ordinary desktop keeps its original 64px header; the mobile layout above remains. */
@media(min-width:721px) and (max-width:940px){
 body[data-design="graphite-1"] .graphite-shell{grid-template-rows:auto minmax(0,1fr)}
 body[data-design="graphite-1"] .graphite-topbar{height:auto!important;padding:8px 14px!important}
 body[data-design="graphite-1"] .graphite-topbar-inner{height:auto;flex-wrap:wrap!important;gap:6px 10px!important}
 body[data-design="graphite-1"] .top-actions{flex:1 0 100%;width:100%!important;justify-content:flex-end}
}

/* Search keeps one frame, including keyboard focus. */
body[data-design="graphite-1"] .top-global-search:focus-within{outline:2px solid var(--accent);outline-offset:1px}
body[data-design="graphite-1"] .top-global-search input:focus-visible{outline:none}
.top-search-row[aria-selected="true"],.top-search-all[aria-selected="true"]{background:var(--soft);outline:2px solid var(--accent);outline-offset:-2px}
.erp-dirty-confirm{padding:18px;border:1px solid var(--line);border-radius:5px;background:var(--surface);position:sticky;bottom:0;z-index:9;box-shadow:0 -5px 22px #102e341c}
.erp-dirty-confirm p{font-size:16px;margin:0 0 12px}.erp-dirty-actions{display:flex;gap:8px;flex-wrap:wrap}
.erp-dirty-actions button{font:inherit;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:5px}
.erp-dirty-actions button:first-child{background:var(--accent);color:white}
[data-instruction-source034]{display:none!important}
body[data-design="graphite-1"] [data-top-instruction034]{margin-left:auto;flex:0 0 auto;font-size:15px;min-height:38px;padding:8px 12px;align-self:center;white-space:nowrap}
body[data-design="graphite-1"] .module-instruction034{position:sticky;top:0;z-index:25;display:flex;align-items:center;gap:8px;background:var(--bg);min-height:48px;padding:5px 0;margin-bottom:12px}

/* UI-18/19: only the More panel scrolls. Hidden sections cannot take focus. */
body[data-design="graphite-1"] #nav-sidebar>[hidden]{display:none}
body[data-design="graphite-1"] #nav-sidebar>.nav-more-toggle{margin-top:auto}
body[data-design="graphite-1"] #nav-sidebar .nav-more-toggle.active{background:var(--navactive);border-color:#ffffff70}
body[data-design="graphite-1"] #nav-sidebar .nav-more-toggle svg{width:18px;height:18px;flex:none;fill:currentColor}
body[data-design="graphite-1"] .nav-more-panel .nav-order-status{display:block;color:#a63e3e;font:14px/1.5 Arial;padding:8px 0;overflow-wrap:anywhere}
body[data-design="graphite-1"] .nav-more-panel [hidden]{display:none}
body[data-design="graphite-1"] .nav-more-panel p{font-size:14px}
.nav-more-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.nav-more-panel button,.nav-more-panel [data-nav-catalog]>a{display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--ink);font:14px/1.4 Arial;text-decoration:none;overflow-wrap:anywhere;cursor:pointer}
.nav-more-panel [data-nav-catalog]{display:grid;gap:8px;margin-bottom:16px}.nav-more-panel [data-nav-catalog]>a.active{background:var(--accent);border-color:var(--accent);color:white}
.nav-settings-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.nav-settings-row label{display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere;font-size:14px}.nav-settings-row input{width:18px;height:18px;flex:none;accent-color:var(--accent)}
.nav-settings-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.nav-more-panel button:disabled{opacity:.5;cursor:default}
body[data-design="graphite-1"] #nav-sidebar.nav-cramped>.nav-more-toggle{position:fixed;left:6px;bottom:6px;width:40px;min-height:38px;background:var(--nav);z-index:1001;padding:8px}
body[data-design="graphite-1"] #nav-sidebar.nav-cramped>.nav-more-toggle .nav-label{display:none}
body[data-design="graphite-1"] #nav-sidebar.nav-cramped>.nav-more-panel{top:6px!important;max-height:calc(100dvh - 12px);bottom:6px}
.nav-no-script{position:fixed;bottom:8px;left:6px;background:var(--nav);color:white;max-height:80dvh;overflow:auto;z-index:1002}.nav-no-script a{display:block;color:white;padding:8px}
@media(max-width:420px){.nav-settings-row{grid-template-columns:1fr auto}.nav-settings-row label{grid-column:1/-1}.nav-settings-row button{min-height:44px}.nav-more-heading{flex-wrap:wrap}}

/* MENU15: preserve row positions while only width and labels change. */
body[data-design="graphite-1"]:not(.nav-expanded) #nav-sidebar .nav-caption{visibility:hidden}
body[data-design="graphite-1"] #nav-sidebar .nav-caption[hidden]{display:none}
body[data-design="graphite-1"] #nav-sidebar>.nav-more-toggle{margin-top:auto}
body[data-design="graphite-1"] #nav-sidebar>.nav-toggle{display:flex;align-items:center;justify-content:center;cursor:pointer}
body[data-design="graphite-1"] #nav-sidebar .nav-more-toggle svg{width:22px;height:22px;flex:0 0 22px}
body[data-design="graphite-1"] #nav-sidebar :is(.nav-section,.nav-toggle,.nav-more-toggle):focus-visible{outline:2px solid var(--navtext);outline-offset:-3px}
body[data-design="graphite-1"] #nav-sidebar.nav-cramped>.nav-more-toggle{bottom:50px;margin-top:0}
body[data-design="graphite-1"] #nav-sidebar.nav-cramped>.nav-toggle{position:fixed;left:6px;bottom:6px;width:40px;background:var(--nav)}
.nav-hover-label{position:fixed;z-index:80;pointer-events:none;max-width:calc(100vw - 24px);padding:9px 12px;border:1px solid var(--line,#b9ccd0);border-radius:5px;background:var(--surface,#fff);color:var(--ink,#15383e);box-shadow:0 5px 20px #102e3433;font:16px/1.4 Arial;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
.nav-hover-label[hidden]{display:none}

.nav-settings-entry { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-settings-entry a { overflow-wrap: anywhere; color: inherit; }
.nav-settings-entry a:hover, .nav-settings-entry a:focus-visible { text-decoration: underline; }
.nav-more-panel [data-nav-limit]:not([hidden]) { position: sticky; top: 0; z-index: 1; padding: 8px; background: #fff4db; color: #503d1e; }
@media(max-width: 480px) { .nav-settings-entry { grid-column: 1 / -1; } }

/* Standalone cards in block-flow shells. Grid lanes and list/table rows own their spacing. */
:where(.page, .kb-article-shell, .vault-page, .drive-file-page, .finance-operation) > :where(.card) + :where(.card) { margin-block-start: 16px; }
