/* VA ERP native desktop-style workspace. Presentation only; business logic stays unchanged. */
:root{
  --desktop-chrome:#263746;--desktop-chrome-2:#344b5d;--desktop-surface:#f1eee7;
  --desktop-panel:#fffdf9;--desktop-line:#c9c3b9;--desktop-grid:#d9dee2;
  --desktop-focus:#0d9488;--desktop-selected:#dff4ee;--desktop-text:#26323d;
  --desktop-muted:#62707b;--desktop-danger:#a83232;--desktop-menu-height:31px;
  --desktop-status-height:28px
}
body[data-theme="dark"]{
  --ink:#e6edf3;--ink-strong:#fff;--muted:#a8b4bf;--faint:#7f8b95;
  --bg:#111a22;--panel:#19242e;--panel-soft:#202d38;--line:#34424d;
  --desktop-surface:#17212a;--desktop-panel:#202b35;--desktop-line:#45535e;
  --desktop-grid:#3d4b56;--desktop-text:#e8eef3;--desktop-muted:#a7b4be;
  --desktop-selected:#184a45
}
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .desktop-workspace,
body[data-theme="dark"] .desktop-filterbar,
body[data-theme="dark"] .desktop-register-footer,
body[data-theme="dark"] .desktop-entry-card,
body[data-theme="dark"] .desktop-entry-footer,
body[data-theme="dark"] .account-popover{background:var(--desktop-panel);color:var(--desktop-text)}
body[data-theme="dark"] input,body[data-theme="dark"] select,body[data-theme="dark"] textarea{background:#111a22;color:#edf3f7;border-color:#4a5965}
body[data-theme="dark"] .data-table th{background:#263541;color:#e7eef3}
body[data-theme="dark"] .data-table td{background:#1d2933;color:#dbe5eb;border-color:#35434f}
body[data-theme="dark"] .desktop-row-open:hover td{background:#263941}
body[data-theme="dark"] .desktop-register-table .is-selected td{background:var(--desktop-selected)!important}
body[data-theme="dark"] .desktop-entry-dialog{background:#17212a;color:#e8eef3}
body[data-theme="dark"] .desktop-entry-commandbar{background:#263541;border-color:#44535f}
body[data-theme="dark"] .desktop-entry-tabs{background:#17212a;border-color:#44535f}
body[data-theme="dark"] .desktop-entry-tabs button{background:#24313c;color:#cdd8df;border-color:#43515c}
body[data-theme="dark"] .desktop-entry-tabs button[aria-selected="true"]{background:#0f766e;color:#fff}

/* Desktop menu strip */
.desktop-menubar{position:sticky;top:0;z-index:37;height:var(--desktop-menu-height);display:flex;align-items:stretch;background:#1c2b38;color:#e7edf2;border-bottom:1px solid #0d1720;font-size:12px;box-shadow:0 1px 0 rgba(255,255,255,.06) inset}
.desktop-menu-home,.desktop-menu>summary,.desktop-theme-toggle{display:flex;align-items:center;padding:0 13px;border:0;background:transparent;color:inherit;text-decoration:none;cursor:pointer;list-style:none;font-weight:700}
.desktop-menu>summary::-webkit-details-marker{display:none}.desktop-menu{position:relative}.desktop-menu[open]>summary,.desktop-menu>summary:hover,.desktop-menu-home:hover,.desktop-theme-toggle:hover{background:#0f766e;color:#fff}
.desktop-menu-panel{position:absolute;top:100%;left:0;z-index:90;min-width:260px;max-height:72vh;overflow:auto;padding:7px;border:1px solid #647481;background:#f8fafb;color:#26323d;box-shadow:0 16px 40px rgba(5,15,23,.35)}
.desktop-menu-panel p{margin:5px 7px 3px;padding:5px 6px;border-bottom:1px solid #d4dce1;color:#66737d;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.desktop-menu-panel a{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:7px 9px;text-decoration:none;border-radius:3px}
.desktop-menu-panel a:hover{background:#0f766e;color:#fff}.desktop-menu-panel kbd{font-size:9px;color:inherit;opacity:.65}.desktop-menu-spacer{flex:1}.desktop-theme-toggle{font-size:17px}
.topbar{top:var(--desktop-menu-height)}
.app-stage{padding-bottom:var(--desktop-status-height)}
.desktop-statusbar{position:fixed;left:var(--sidebar-width);right:0;bottom:0;z-index:34;height:var(--desktop-status-height);display:flex;align-items:center;gap:22px;padding:0 12px;background:#263746;color:#dce5eb;border-top:1px solid #14222d;font-size:11px}
.desktop-statusbar span{display:flex;align-items:center;gap:7px}.desktop-statusbar span:last-child{margin-left:auto;font-variant-numeric:tabular-nums}.desktop-statusbar .connection-dot{width:7px;height:7px}

/* Register workspace */
.desktop-workspace{border:1px solid #aeb9c1;background:var(--desktop-surface);color:var(--desktop-text);box-shadow:0 18px 42px rgba(20,35,48,.10);min-height:calc(100vh - 170px)}
.desktop-workspace-titlebar{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:7px 12px;background:linear-gradient(#344b5d,#263746);color:#fff;border-bottom:1px solid #13222d}
.desktop-workspace-titlebar>div:first-child{display:flex;align-items:center;gap:10px}.desktop-window-mark{display:grid;place-items:center;flex:0 0 auto;width:29px;height:29px;border-radius:4px;background:#0d9488;color:#fff;font-size:10px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}
.desktop-workspace-titlebar h1{margin:1px 0 0;font-size:17px;line-height:1.1;color:#fff}.desktop-workspace-titlebar .breadcrumbs{color:#c8d4dc;font-size:10px}.desktop-workspace-titlebar .breadcrumbs a{color:#e8f0f4}.desktop-titlebar-status{display:flex;align-items:center;gap:10px}.desktop-titlebar-status small{color:#c8d3da}
.desktop-register-toolbar{min-height:54px;display:flex;align-items:center;gap:7px;padding:6px 9px;background:#e8e4dc;border-bottom:1px solid #bdb8ae;overflow-x:auto}
body[data-theme="dark"] .desktop-register-toolbar{background:#202d38;border-color:#45535e}
.desktop-toolbar-group{display:flex;gap:5px}.desktop-tool-button{min-width:70px;min-height:39px;display:flex;align-items:center;justify-content:center;gap:5px;padding:5px 9px;border:1px solid #aeb8bf;border-radius:4px;background:linear-gradient(#fff,#e9edf0);color:#26323d;text-decoration:none;font-size:11px;font-weight:750;cursor:pointer;white-space:nowrap}
.desktop-tool-button span{font-size:13px;font-weight:900}.desktop-tool-button:hover:not(:disabled){border-color:#0f766e;background:#e7f5f2}.desktop-tool-button.is-primary{background:linear-gradient(#e9fbf7,#cceee7);border-color:#6eb9ac}.desktop-tool-button.is-danger{color:#8f2626}.desktop-tool-button:disabled{opacity:.42;cursor:not-allowed}.desktop-toolbar-spacer{flex:1}.desktop-shortcut-strip{display:flex;gap:4px;align-items:center}.desktop-shortcut-strip kbd,.desktop-entry-commandbar kbd{padding:3px 5px;border:1px solid #b7c1c8;border-radius:3px;background:#f8fafb;color:#52616d;font:700 9px/1.2 inherit;white-space:nowrap}
.desktop-workflow-tabs{margin:0;padding:6px 9px 0;background:#dfe4e7;border-bottom:1px solid #adb8bf}.desktop-workflow-tabs a{border-radius:5px 5px 0 0;border:1px solid #aeb8bf;border-bottom:0;background:#edf1f3;color:#41515e;padding:8px 13px}.desktop-workflow-tabs a.is-active{background:var(--desktop-panel);color:#0f766e}
.desktop-filterbar{display:flex;align-items:end;justify-content:space-between;gap:15px;padding:9px 10px;background:var(--desktop-panel);border-bottom:1px solid var(--desktop-line)}
.desktop-search{display:flex;align-items:end;gap:6px}.desktop-search>label{font-size:11px;font-weight:800}.desktop-search>div{height:34px;display:flex;align-items:center;border:1px solid #aeb8bf;background:#fff}.desktop-search>div span{padding:0 7px;color:#687683}.desktop-search input{width:min(440px,40vw);height:32px;border:0;outline:0;padding:4px 8px}.desktop-search button,.desktop-search>a{height:34px;display:flex;align-items:center;padding:0 12px;border:1px solid #9eabb4;background:#eef2f4;color:#26323d;text-decoration:none;font-weight:700;cursor:pointer}.desktop-record-summary{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:0 5px;text-align:right}.desktop-record-summary strong{font-size:18px}.desktop-record-summary small{grid-column:1/-1;color:var(--desktop-muted);font-size:10px}
.desktop-grid-shell{padding:0;background:var(--desktop-panel)}.desktop-register-grid{max-height:calc(100vh - 340px);min-height:320px;border:0}.desktop-register-table{border-collapse:separate;border-spacing:0;min-width:100%}.desktop-register-table th{position:sticky;top:0;z-index:2;background:#e2e8eb;color:#26323d;border-right:1px solid #b6c0c7;border-bottom:1px solid #9eabb4;font-size:11px;text-transform:none;letter-spacing:0;white-space:nowrap}.desktop-register-table td{border-right:1px solid #d4dce1;border-bottom:1px solid #d9e0e4;font-size:11px;white-space:nowrap}.desktop-register-table tbody tr:nth-child(even) td{background:#f8fafb}.desktop-row-actions{position:sticky;right:0;background:inherit!important}.desktop-action-column{position:sticky!important;right:0;z-index:3!important}.desktop-register-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 10px;background:#e8e4dc;border-top:1px solid #bdb8ae}.desktop-selected-status{display:flex;align-items:center;gap:5px;font-size:11px}.desktop-selected-status span{color:var(--desktop-muted)}.desktop-register-footer .pager{padding:0;border:0;background:transparent}

/* Popup entry windows */
.desktop-web-window.desktop-entry-dialog{background:var(--desktop-surface);color:var(--desktop-text);border-radius:3px;border:1px solid #788a97}.desktop-entry-title{display:flex!important;align-items:center;gap:9px}.desktop-entry-title>div{display:grid}.desktop-entry-commandbar{min-height:45px;display:flex;align-items:center;gap:5px;padding:5px 8px;background:#e5e1d9;border-bottom:1px solid #bdb8ae;overflow-x:auto}.desktop-entry-commandbar button,.desktop-entry-commandbar a{min-height:34px;display:flex;align-items:center;gap:5px;padding:4px 9px;border:1px solid #aab5bc;border-radius:3px;background:linear-gradient(#fff,#e7ecef);color:#27333e;text-decoration:none;font-size:10px;font-weight:800;cursor:pointer}.desktop-entry-commandbar .is-danger{color:#922b2b}.desktop-entry-commandbar button:disabled{opacity:.45}.desktop-entry-body{padding:8px 10px 12px}.desktop-entry-tabs{position:sticky;top:-8px;z-index:5;display:flex;gap:3px;padding:5px 5px 0;margin:0 0 8px;background:var(--desktop-surface);border-bottom:1px solid var(--desktop-line);overflow-x:auto}.desktop-entry-tabs button{min-height:34px;padding:6px 12px;border:1px solid #b5bfc6;border-bottom:0;border-radius:5px 5px 0 0;background:#e6eaed;color:#33424d;font-size:11px;font-weight:800;cursor:pointer;white-space:nowrap}.desktop-entry-tabs button[aria-selected="true"]{background:var(--desktop-panel);color:#0f766e;border-top:3px solid #0f766e;padding-top:4px}.desktop-tab-panel.is-hidden{display:none}.desktop-entry-card{padding:0;border-radius:3px;background:var(--desktop-panel);border:1px solid var(--desktop-line)}.desktop-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 9px;background:#edf1f3;border-bottom:1px solid #c9d1d6}.desktop-section-heading h2{margin:0;font-size:12px}.desktop-section-heading p{margin:1px 0 0;color:#6b7882;font-size:9px}.desktop-section-heading>button{border:0;background:transparent;color:#0f766e;font-size:10px;font-weight:800;cursor:pointer}.desktop-entry-grid{padding:9px;grid-template-columns:repeat(3,minmax(230px,1fr));gap:7px 11px}.desktop-entry-grid .field{grid-template-columns:minmax(125px,155px) minmax(0,1fr)}.desktop-entry-grid label{font-size:11px}.desktop-field-control{min-width:0}.desktop-password-control{display:grid;grid-template-columns:minmax(0,1fr) auto}
.desktop-password-control input{border-radius:7px 0 0 7px}
.desktop-password-control button{min-width:54px;border:1px solid #c9d5dc;border-left:0;border-radius:0 7px 7px 0;background:#edf2f5;color:#31505f;font-weight:800;cursor:pointer}
.desktop-field-control>small{display:block;color:var(--desktop-muted);font-size:9px;margin-top:2px}.desktop-lookup-control{display:grid;grid-template-columns:minmax(0,1fr) 31px}.desktop-lookup-control select{border-radius:4px 0 0 4px}.desktop-lookup-control button{border:1px solid #aeb8bf;border-left:0;background:#e6ebee;color:#26323d;border-radius:0 4px 4px 0;font-weight:900;cursor:pointer}.desktop-lookup-control button:hover{background:#dff4ee}.desktop-entry-grid .checkbox-field .desktop-field-control{display:flex;align-items:center;min-height:34px}.desktop-entry-grid .checkbox-field input{width:18px;height:18px;min-height:0}.desktop-line-card .section-title{margin:0}.desktop-line-grid th,.desktop-line-grid td{font-size:10px}.line-number-head,.line-number{position:sticky;left:0;z-index:2;width:42px;min-width:42px;text-align:center;background:#edf1f3!important}.desktop-workflow-actionbar{margin:8px 0 0;border-radius:3px}.desktop-form-status{display:flex;align-items:center;gap:7px;font-size:10px}.desktop-form-status i{width:7px;height:7px;border-radius:50%;background:#19a974}.desktop-entry-footer{padding:7px 10px}.desktop-entry-footer .button{min-height:34px;min-width:90px;border-radius:3px}
.desktop-entry-dialog.is-section-minimized .desktop-entry-card:not(.desktop-line-card) [data-section-body]{display:none}.desktop-entry-dialog.is-section-minimized .desktop-entry-card:not(.desktop-line-card){margin-bottom:5px}

/* Generic nested selection popup */
.desktop-choice-dialog{width:min(620px,calc(100vw - 32px));max-height:min(680px,calc(100vh - 40px));padding:0;border:1px solid #667986;border-radius:4px;background:var(--desktop-panel);color:var(--desktop-text);box-shadow:0 24px 70px rgba(7,18,27,.42)}.desktop-choice-dialog::backdrop{background:rgba(8,18,26,.38)}.desktop-choice-head{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;background:#263746;color:#fff}.desktop-choice-head strong{font-size:13px}.desktop-choice-head button{border:0;background:transparent;color:#fff;font-size:19px;cursor:pointer}.desktop-choice-search{padding:8px;border-bottom:1px solid var(--desktop-line)}.desktop-choice-search input{width:100%;height:37px;padding:6px 9px;border:1px solid #aeb8bf}.desktop-choice-list{max-height:480px;overflow:auto;padding:5px}.desktop-choice-list button{width:100%;display:flex;justify-content:space-between;padding:8px 9px;border:0;border-bottom:1px solid var(--desktop-line);background:transparent;color:inherit;text-align:left;cursor:pointer}.desktop-choice-list button:hover,.desktop-choice-list button.is-current{background:var(--desktop-selected)}.desktop-choice-empty{padding:24px;text-align:center;color:var(--desktop-muted)}

@media(max-width:1100px){.desktop-entry-grid{grid-template-columns:repeat(2,minmax(220px,1fr))}.desktop-shortcut-strip{display:none}.desktop-titlebar-status small{display:none}}
@media(max-width:760px){.desktop-menubar{display:none}.topbar{top:0}.desktop-statusbar{left:0}.app-stage{padding-bottom:var(--desktop-status-height)}.desktop-workspace{min-height:calc(100vh - 130px)}.desktop-workspace-titlebar,.desktop-filterbar,.desktop-register-footer{align-items:flex-start;flex-direction:column}.desktop-register-toolbar{align-items:flex-start}.desktop-toolbar-spacer{display:none}.desktop-entry-grid{grid-template-columns:1fr}.desktop-entry-grid .field{grid-template-columns:1fr}.desktop-entry-grid label{text-align:left}.desktop-search{width:100%;align-items:stretch;flex-wrap:wrap}.desktop-search>div{flex:1}.desktop-search input{width:100%}.desktop-statusbar span:nth-child(2),.desktop-statusbar span:nth-child(3){display:none}}
@media print{.sidebar,.desktop-menubar,.topbar,.desktop-statusbar,.desktop-register-toolbar,.desktop-filterbar,.desktop-register-footer,.desktop-row-actions,.desktop-action-column{display:none!important}.app-stage{margin:0;padding:0}.page{max-width:none;padding:0}.desktop-workspace{border:0;box-shadow:none}.desktop-register-grid{max-height:none;overflow:visible}}

/* -------------------------------------------------------------------------
   VA ERP polished desktop workspace — 24.07.2026
   Corrects contrast, table striping and popup geometry while retaining the
   desktop field sequence, controls and workflows.
   ------------------------------------------------------------------------- */
.desktop-menubar{background:#122432;border-bottom-color:#07141d;box-shadow:0 1px 0 rgba(255,255,255,.07) inset}
.desktop-menu>summary:hover,.desktop-menu[open]>summary,.desktop-menu-home:hover,.desktop-theme-toggle:hover{background:#0b8f83}
.desktop-menu-panel{border-color:#bfcbd3;border-radius:0 0 8px 8px;background:#fff;color:#1e2e39;box-shadow:0 18px 46px rgba(5,18,28,.28)}
.desktop-menu-panel a:hover{background:#e6f5f2;color:#08776e}
.desktop-statusbar{background:#152936;border-top-color:#071820;color:#dce7ed}
.desktop-workspace{overflow:hidden;border:1px solid #c4d0d8;border-radius:13px;background:#fff;box-shadow:0 16px 40px rgba(16,37,51,.10)}
.desktop-workspace-titlebar{min-height:62px;padding:9px 14px;background:linear-gradient(115deg,#1a3446,#203f52);border-bottom-color:#112a39}
.desktop-window-mark{border-radius:8px;background:linear-gradient(145deg,#22b6a5,#087f75);box-shadow:0 6px 14px rgba(8,127,117,.24)}
.desktop-register-toolbar{min-height:58px;padding:8px 11px;background:#f6f8fa;border-bottom-color:#d0dbe2}
.desktop-tool-button{min-height:38px;border-color:#cbd6dd;border-radius:7px;background:#fff;color:#263844;box-shadow:0 1px 2px rgba(16,35,48,.04)}
.desktop-tool-button:hover:not(:disabled){border-color:#79b8ae;background:#edf8f6;color:#08766d}
.desktop-tool-button.is-primary{border-color:#80c4b9;background:#e5f6f2;color:#086e66}
.desktop-tool-button.is-danger{color:#a9363d}
.desktop-shortcut-strip kbd,.desktop-entry-commandbar kbd{border-color:#ccd7de;border-radius:6px;background:#fff;color:#5d6f7b}
.desktop-filterbar{padding:11px 13px;background:#fff;border-bottom-color:#d7e0e6}
.desktop-search>div{height:38px;border-color:#cbd6dd;border-radius:8px;background:#fff;overflow:hidden}
.desktop-search input{height:36px;color:#17232e}
.desktop-search button,.desktop-search>a{height:38px;border-color:#cbd6dd;border-radius:8px;background:#eef3f6;color:#263844}
.desktop-search button:hover,.desktop-search>a:hover{border-color:#86bcb4;background:#e8f5f2;color:#08766d}
.desktop-grid-shell{background:#fff}
.desktop-register-grid{max-height:calc(100vh - 350px);background:#fff}
.desktop-register-table th{background:#eaf0f4;color:#334b5a;border-right-color:#c9d4dc;border-bottom-color:#b9c7d0;font-size:11px}
.desktop-register-table td{background:#fff;color:#263844;border-right-color:#dde5ea;border-bottom-color:#e0e7ec;font-size:11px}
.desktop-register-table tbody tr:nth-child(even) td{background:#f7f9fb}
.desktop-register-table tbody tr:hover td{background:#e8f5f2!important;color:#183b38}
.desktop-register-table .is-selected td{background:#d9f0eb!important;color:#173b37}
.desktop-register-footer{padding:8px 12px;background:#f6f8fa;border-top-color:#d0dbe2}
.row-selector input{accent-color:#0b8f83}
.icon-pencil{color:#31505f}
.icon-pencil:hover,.icon-pencil:focus{background:#dff3ef;color:#08766d}

/* Four explicit rows: title bar, command bar, scrolling form and footer.
   The former three-row grid made the command bar fill the window and pushed
   the actual form to the bottom, creating the large empty area in screenshots. */
.desktop-entry-shell{grid-template-rows:auto auto minmax(0,1fr) auto!important;background:#f3f6f8}
.desktop-web-window.desktop-entry-dialog{border:1px solid #718695;border-radius:12px;background:#f3f6f8;box-shadow:0 34px 100px rgba(5,18,28,.42)}
.desktop-entry-head{padding:11px 14px;background:linear-gradient(115deg,#1a3446,#203f52);border-bottom-color:#102938}
.desktop-entry-title strong{font-size:17px}
.desktop-entry-title small{color:#c6d4dc}
.desktop-window-button{border-radius:7px;background:#355267}
.desktop-window-button:hover{background:#0b8f83}
.desktop-entry-commandbar{min-height:52px;padding:7px 10px;background:#f5f7f9;border-bottom-color:#ccd7de}
.desktop-entry-commandbar button,.desktop-entry-commandbar a{min-height:37px;border-color:#c8d4dc;border-radius:7px;background:#fff;color:#273a46;box-shadow:0 1px 2px rgba(16,35,48,.04)}
.desktop-entry-commandbar button:hover,.desktop-entry-commandbar a:hover{border-color:#7dbbb1;background:#eaf7f4;color:#08766d}
.desktop-entry-body{min-height:0;overflow:auto;padding:12px 14px 16px;background:#f3f6f8}
.desktop-entry-form{align-content:start}
.desktop-entry-tabs{top:-12px;padding:7px 7px 0;margin:0 0 11px;background:#f3f6f8;border-bottom-color:#cdd8df}
.desktop-entry-tabs button{min-height:38px;padding:7px 14px;border-color:#c4d0d8;border-radius:8px 8px 0 0;background:#e8eef2;color:#435865}
.desktop-entry-tabs button:hover{background:#deebe9;color:#08766d}
.desktop-entry-tabs button[aria-selected="true"]{background:#fff;color:#08766d;border-top-color:#0b8f83}
.desktop-entry-card{overflow:hidden;border-color:#ccd7de;border-radius:10px;background:#fff;box-shadow:0 6px 18px rgba(17,38,51,.05)}
.desktop-section-heading{padding:10px 12px;background:#edf2f5;border-bottom-color:#d2dce2}
.desktop-section-heading h2{color:#263b49;font-size:13px}
.desktop-section-heading p{color:#71828e}
.desktop-entry-grid{padding:14px;gap:11px 16px}
.desktop-entry-grid label{color:#3a4e5b;font-weight:750}
.desktop-entry-grid input,.desktop-entry-grid select,.desktop-entry-grid textarea{min-height:40px;border-color:#c9d5dc;border-radius:7px;background:#fff;color:#17232e;padding:7px 9px}
.desktop-entry-grid input:focus,.desktop-entry-grid select:focus,.desktop-entry-grid textarea:focus{outline:0;border-color:#37a99e;box-shadow:0 0 0 3px rgba(11,143,131,.11)}
.desktop-lookup-control button{border-color:#c9d5dc;border-left:0;border-radius:0 7px 7px 0;background:#edf2f5;color:#31505f}
.desktop-lookup-control button:hover{background:#dff3ef;color:#08766d}
.desktop-field-control>small{color:#74848f}
.desktop-entry-footer{padding:10px 14px;background:#eef2f5;border-top-color:#ccd7de}
.desktop-entry-footer .button{min-height:39px;border-radius:8px}
.desktop-form-status{color:#536873}
.desktop-choice-dialog{border-color:#8fa2ae;border-radius:10px;overflow:hidden}
.desktop-choice-head{background:linear-gradient(115deg,#1a3446,#203f52)}
.desktop-choice-search{background:#f4f7f9}
.desktop-choice-search input{border-color:#c9d5dc;border-radius:7px}

body.app-body[data-theme="dark"] .desktop-workspace{background:#15232d;border-color:#38505d}
body.app-body[data-theme="dark"] .desktop-workspace-titlebar{background:linear-gradient(115deg,#172e3d,#1e3b4b)}
body.app-body[data-theme="dark"] .desktop-register-toolbar{background:#1a2934;border-color:#3a4d59}
body.app-body[data-theme="dark"] .desktop-tool-button{background:#223541;color:#e4edf2;border-color:#405560;box-shadow:none}
body.app-body[data-theme="dark"] .desktop-tool-button:hover:not(:disabled){background:#28443f;color:#7ee0d1;border-color:#4f837b}
body.app-body[data-theme="dark"] .desktop-tool-button.is-primary{background:#18443f;color:#7ee0d1;border-color:#3d7f76}
body.app-body[data-theme="dark"] .desktop-shortcut-strip kbd,
body.app-body[data-theme="dark"] .desktop-entry-commandbar kbd{background:#223541;color:#cbd8df;border-color:#425762}
body.app-body[data-theme="dark"] .desktop-filterbar{background:#17252f;border-color:#3a4d59}
body.app-body[data-theme="dark"] .desktop-search>div{background:#101b24;border-color:#415560}
body.app-body[data-theme="dark"] .desktop-search input{background:#101b24;color:#edf3f7}
body.app-body[data-theme="dark"] .desktop-search button,
body.app-body[data-theme="dark"] .desktop-search>a{background:#223541;color:#e4edf2;border-color:#405560}
body.app-body[data-theme="dark"] .desktop-grid-shell,
body.app-body[data-theme="dark"] .desktop-register-grid{background:#15232d}
body.app-body[data-theme="dark"] .desktop-register-table th{background:#263a46;color:#e1eaf0;border-color:#465b67}
body.app-body[data-theme="dark"] .desktop-register-table td{background:#17252f;color:#dde7ed;border-color:#334955}
body.app-body[data-theme="dark"] .desktop-register-table tbody tr:nth-child(even) td{background:#1c2d38}
body.app-body[data-theme="dark"] .desktop-register-table tbody tr:hover td{background:#25443f!important;color:#effaf8}
body.app-body[data-theme="dark"] .desktop-register-table .is-selected td{background:#1e4d47!important;color:#f0fbf9}
body.app-body[data-theme="dark"] .desktop-register-footer{background:#1a2934;border-color:#3a4d59}
body.app-body[data-theme="dark"] .icon-pencil{color:#d3e0e7}
body.app-body[data-theme="dark"] .desktop-entry-shell,
body.app-body[data-theme="dark"] .desktop-web-window.desktop-entry-dialog{background:#111c25;color:#e7eef4}
body.app-body[data-theme="dark"] .desktop-entry-head{background:linear-gradient(115deg,#172e3d,#1e3b4b)}
body.app-body[data-theme="dark"] .desktop-entry-commandbar{background:#1a2934;border-color:#3a4d59}
body.app-body[data-theme="dark"] .desktop-entry-commandbar button,
body.app-body[data-theme="dark"] .desktop-entry-commandbar a{background:#223541;color:#e6eef3;border-color:#425762}
body.app-body[data-theme="dark"] .desktop-entry-body{background:#111c25}
body.app-body[data-theme="dark"] .desktop-entry-tabs{background:#111c25;border-color:#3b4f5a}
body.app-body[data-theme="dark"] .desktop-entry-tabs button{background:#1d2d38;color:#bac9d2;border-color:#40545f}
body.app-body[data-theme="dark"] .desktop-entry-tabs button[aria-selected="true"]{background:#17252f;color:#67d9ca;border-top-color:#31b7a7}
body.app-body[data-theme="dark"] .desktop-entry-card{background:#17252f;border-color:#3a4e59;box-shadow:none}
body.app-body[data-theme="dark"] .desktop-section-heading{background:#20323d;border-color:#3b4f5a}
body.app-body[data-theme="dark"] .desktop-section-heading h2{color:#e8eff4}
body.app-body[data-theme="dark"] .desktop-section-heading p{color:#9dafbc}
body.app-body[data-theme="dark"] .desktop-entry-grid label{color:#cbd8df}
body.app-body[data-theme="dark"] .desktop-entry-grid input,
body.app-body[data-theme="dark"] .desktop-entry-grid select,
body.app-body[data-theme="dark"] .desktop-entry-grid textarea{background:#0f1922;color:#edf3f7;border-color:#415662}
body.app-body[data-theme="dark"] .desktop-lookup-control button{background:#263945;color:#dce7ed;border-color:#415662}
body.app-body[data-theme="dark"] .desktop-entry-footer{background:#1a2934;border-color:#3a4d59}
body.app-body[data-theme="dark"] .desktop-form-status{color:#b3c2cc}
body.app-body[data-theme="dark"] .desktop-choice-search{background:#17252f}

@media(max-width:1100px){
  .desktop-entry-dialog{height:calc(100vh - 16px)}
}

/* Controlled ERP palette: readable across every browser and OS theme. */
body.app-body,
body.app-body[data-theme="dark"]{
  --ink:#172631;--ink-strong:#0d1b25;--muted:#647683;--faint:#8b9aa5;
  --bg:#edf2f5;--panel:#fff;--panel-soft:#f6f9fa;--line:#d4dee4;
  --desktop-surface:#f2f5f7;--desktop-panel:#fff;--desktop-line:#cbd6dd;
  --desktop-grid:#dce4e9;--desktop-text:#233744;--desktop-muted:#687985;
  --desktop-selected:#d9f0eb;color:#172631;background:#edf2f5
}
body.app-body[data-theme="dark"] .topbar{background:rgba(255,255,255,.94);color:#172631;border-color:#d4dee4}
body.app-body[data-theme="dark"] .command-trigger{background:#f7f9fa;color:#647683;border-color:#d4dee4}
body.app-body[data-theme="dark"] .account-popover{background:#fff;color:#172631;border-color:#d4dee4}
body.app-body[data-theme="dark"] .desktop-workspace{background:#fff;border-color:#c4d0d8}
body.app-body[data-theme="dark"] .desktop-register-toolbar{background:#f6f8fa;border-color:#d0dbe2}
body.app-body[data-theme="dark"] .desktop-tool-button{background:#fff;color:#263844;border-color:#cbd6dd;box-shadow:0 1px 2px rgba(16,35,48,.04)}
body.app-body[data-theme="dark"] .desktop-tool-button:hover:not(:disabled){background:#edf8f6;color:#08766d;border-color:#79b8ae}
body.app-body[data-theme="dark"] .desktop-tool-button.is-primary{background:#e5f6f2;color:#086e66;border-color:#80c4b9}
body.app-body[data-theme="dark"] .desktop-shortcut-strip kbd,
body.app-body[data-theme="dark"] .desktop-entry-commandbar kbd{background:#fff;color:#5d6f7b;border-color:#ccd7de}
body.app-body[data-theme="dark"] .desktop-filterbar{background:#fff;border-color:#d7e0e6}
body.app-body[data-theme="dark"] .desktop-search>div{background:#fff;border-color:#cbd6dd}
body.app-body[data-theme="dark"] .desktop-search input{background:#fff;color:#17232e}
body.app-body[data-theme="dark"] .desktop-search button,
body.app-body[data-theme="dark"] .desktop-search>a{background:#eef3f6;color:#263844;border-color:#cbd6dd}
body.app-body[data-theme="dark"] .desktop-grid-shell,
body.app-body[data-theme="dark"] .desktop-register-grid{background:#fff}
body.app-body[data-theme="dark"] .desktop-register-table th{background:#eaf0f4;color:#334b5a;border-color:#c9d4dc}
body.app-body[data-theme="dark"] .desktop-register-table td{background:#fff;color:#263844;border-color:#dde5ea}
body.app-body[data-theme="dark"] .desktop-register-table tbody tr:nth-child(even) td{background:#f7f9fb}
body.app-body[data-theme="dark"] .desktop-register-table tbody tr:hover td{background:#e8f5f2!important;color:#183b38}
body.app-body[data-theme="dark"] .desktop-register-table .is-selected td{background:#d9f0eb!important;color:#173b37}
body.app-body[data-theme="dark"] .desktop-register-footer{background:#f6f8fa;border-color:#d0dbe2}
body.app-body[data-theme="dark"] .desktop-entry-shell,
body.app-body[data-theme="dark"] .desktop-web-window.desktop-entry-dialog{background:#f3f6f8;color:#233744}
body.app-body[data-theme="dark"] .desktop-entry-commandbar{background:#f5f7f9;border-color:#ccd7de}
body.app-body[data-theme="dark"] .desktop-entry-commandbar button,
body.app-body[data-theme="dark"] .desktop-entry-commandbar a{background:#fff;color:#273a46;border-color:#c8d4dc}
body.app-body[data-theme="dark"] .desktop-entry-body{background:#f3f6f8}
body.app-body[data-theme="dark"] .desktop-entry-tabs{background:#f3f6f8;border-color:#cdd8df}
body.app-body[data-theme="dark"] .desktop-entry-tabs button{background:#e8eef2;color:#435865;border-color:#c4d0d8}
body.app-body[data-theme="dark"] .desktop-entry-tabs button[aria-selected="true"]{background:#fff;color:#08766d;border-top-color:#0b8f83}
body.app-body[data-theme="dark"] .desktop-entry-card{background:#fff;border-color:#ccd7de;box-shadow:0 6px 18px rgba(17,38,51,.05)}
body.app-body[data-theme="dark"] .desktop-section-heading{background:#edf2f5;border-color:#d2dce2}
body.app-body[data-theme="dark"] .desktop-section-heading h2{color:#263b49}
body.app-body[data-theme="dark"] .desktop-section-heading p{color:#71828e}
body.app-body[data-theme="dark"] .desktop-entry-grid label{color:#3a4e5b}
body.app-body[data-theme="dark"] .desktop-entry-grid input,
body.app-body[data-theme="dark"] .desktop-entry-grid select,
body.app-body[data-theme="dark"] .desktop-entry-grid textarea{background:#fff;color:#17232e;border-color:#c9d5dc}
body.app-body[data-theme="dark"] .desktop-lookup-control button{background:#edf2f5;color:#31505f;border-color:#c9d5dc}
body.app-body[data-theme="dark"] .desktop-entry-footer{background:#eef2f5;border-color:#ccd7de}
body.app-body[data-theme="dark"] .desktop-form-status{color:#536873}

/* -------------------------------------------------------------------------
   Fixed global Web ERP chrome and collapsible navigation sidebar.
   The menu strip and user/search strip stay above every module workspace.
   ------------------------------------------------------------------------- */
:root{
  --shell-sidebar-offset:var(--sidebar-width);
  --erp-fixed-chrome-height:calc(var(--desktop-menu-height) + 74px);
}
.sidebar{z-index:70;transition:none}
.sidebar-pin-toggle{display:grid;place-items:center;margin-left:auto;color:#dce8ef;font-size:15px}
.sidebar-pin-toggle:hover{background:rgba(255,255,255,.1)}
.app-stage{margin-left:var(--shell-sidebar-offset);padding-top:var(--erp-fixed-chrome-height);transition:none}
.desktop-menubar{position:fixed;top:0;left:var(--shell-sidebar-offset);right:0;z-index:65;justify-content:flex-start;transition:none}
.desktop-menu-home{position:relative;z-index:2;flex:0 0 auto;min-width:86px}
.desktop-menu-cluster{position:static;height:100%;display:flex;align-items:center;justify-content:flex-start}
.desktop-menu-cluster .desktop-menu,.desktop-menu-cluster .desktop-menu>summary{height:100%}
.sidebar-unhide{display:none;position:relative;z-index:2;align-items:center;gap:6px;height:100%;padding:0 11px;border:0;border-right:1px solid rgba(255,255,255,.12);background:#0d1e2a;color:#fff;font-size:10px;font-weight:800;cursor:pointer}
.sidebar-unhide:hover,.sidebar-unhide:focus-visible{background:#0b8f83;outline:2px solid #36b7a7;outline-offset:-2px}
.desktop-menu-visibility-toggle{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:6px;height:100%;margin-left:auto;padding:0 12px;border:0;border-left:1px solid rgba(255,255,255,.12);background:#0d1e2a;color:#fff;font-size:10px;font-weight:800;cursor:pointer}
.desktop-menu-visibility-toggle:hover,.desktop-menu-visibility-toggle:focus-visible{background:#0b8f83;outline:2px solid #36b7a7;outline-offset:-2px}
.topbar{position:fixed;top:var(--desktop-menu-height);left:var(--shell-sidebar-offset);right:0;z-index:60;transition:none}
.desktop-statusbar{left:var(--shell-sidebar-offset);transition:none}
body.sidebar-collapsed{--shell-sidebar-offset:0px}
html.sidebar-state-collapsed{--shell-sidebar-offset:0px}
body.sidebar-collapsed .sidebar{transform:translateX(-102%);box-shadow:none}
html.sidebar-state-collapsed .sidebar{transform:translateX(-102%);box-shadow:none}
body.sidebar-collapsed .sidebar-unhide{display:flex}
html.sidebar-state-collapsed .sidebar-unhide{display:flex}
body.desktop-menu-collapsed .desktop-menu-cluster{display:none}
html.desktop-menu-state-collapsed .desktop-menu-cluster{display:none}
body.sidebar-collapsed .page,html.sidebar-state-collapsed .page{max-width:none}
body.sidebar-collapsed .auth-overlay,
body.sidebar-collapsed .company-overlay,
html.sidebar-state-collapsed .auth-overlay,
html.sidebar-state-collapsed .company-overlay{left:0!important}
.auth-overlay,.company-overlay{top:var(--erp-fixed-chrome-height)!important;left:var(--shell-sidebar-offset)!important}
.desktop-entry-dialog{margin-top:calc(var(--erp-fixed-chrome-height) + 8px);height:min(900px,calc(100vh - var(--erp-fixed-chrome-height) - 16px))}
.desktop-menu-panel a:focus,.desktop-menu>summary:focus{outline:2px solid #36b7a7;outline-offset:-2px}

@media(max-width:1180px){
  .desktop-menu-home{min-width:72px;padding-inline:9px}
  .desktop-menu-home,.desktop-menu>summary{padding-left:9px;padding-right:9px}
  .sidebar-unhide [data-sidebar-toggle-label],.desktop-menu-visibility-toggle [data-desktop-menu-toggle-label]{display:none}
}
@media(max-width:760px){
  :root{--shell-sidebar-offset:0px;--erp-fixed-chrome-height:66px}
  .sidebar-pin-toggle,.sidebar-unhide{display:none!important}
  .app-stage{margin-left:0;padding-top:var(--erp-fixed-chrome-height)}
  .topbar{top:0;left:0}
  .auth-overlay,.company-overlay{top:var(--erp-fixed-chrome-height)!important;left:0!important}
  .desktop-entry-dialog{margin-top:calc(var(--erp-fixed-chrome-height) + 4px);height:calc(100vh - var(--erp-fixed-chrome-height) - 8px)}
}
/* Unified ERP popup layout: viewport-safe window with all sections in one scroll. */
.desktop-entry-dialog,
.desktop-entry-dialog[data-depth="2"],
.desktop-entry-dialog[data-depth="3"]{
  box-sizing:border-box;
  width:min(1540px,calc(100dvw - 24px));
  height:min(900px,calc(100dvh - 24px));
  max-width:calc(100dvw - 24px);
  max-height:calc(100dvh - 24px);
  margin:auto;
}
.desktop-entry-dialog.is-maximized{
  width:calc(100dvw - 12px)!important;
  height:calc(100dvh - 12px)!important;
  max-width:calc(100dvw - 12px);
  max-height:calc(100dvh - 12px);
  border-radius:8px!important;
}
.desktop-entry-form{align-content:start}
.desktop-entry-form>.desktop-entry-card{margin:0}

@media(max-width:650px){
  .desktop-entry-dialog,
  .desktop-entry-dialog[data-depth="2"],
  .desktop-entry-dialog[data-depth="3"]{
    width:calc(100dvw - 8px);
    height:calc(100dvh - 8px);
    max-width:calc(100dvw - 8px);
    max-height:calc(100dvh - 8px);
  }
  .desktop-entry-head{padding:8px 10px}
  .desktop-entry-commandbar{min-height:42px}
  .desktop-entry-body{padding:8px}
  .desktop-entry-footer{padding:8px}
}
