/* Shared portal ERP theme, including work-order progress. */
@media screen {
body.erp-mode { --page:#f4f6f8; --surface:#fff; --surface-soft:#f7faf9; --line:#e2e8e8; --line-strong:#ccd8d6; --text:#243b40; --muted:#78898d; --primary:#167d68; --primary-strong:#106351; --shadow:none; --shadow-small:none; color:var(--text); background:var(--page); font-size:14px; }
body.erp-mode::before { display:none; }
body.erp-mode header.app-header { height:64px; min-height:64px; padding:0 24px 0 256px; background:#fff; border-bottom:1px solid #e2e8e8; box-shadow:none; backdrop-filter:none; }
body.erp-mode .brand-link { position:absolute; top:0; left:0; width:232px; height:64px; min-width:0; padding:0 18px; background:#172c31; color:#edf8f5; border-bottom:1px solid #2c4146; }
body.erp-mode .brand-mark { background:#96dec4; color:#173c36; border-radius:7px; width:32px; height:32px; box-shadow:none; }
body.erp-mode .brand-copy strong { color:#edf8f5; font-size:15px; }
body.erp-mode .brand-copy span { color:#9cb7b9; font-size:10px; }
body.erp-mode .header-context { margin-left:0; padding-left:0; border-left:0; }
body.erp-mode .header-context > span { display:none; }
body.erp-mode .header-context strong { margin:0; font-size:14px; color:#40585c; }
body.erp-mode .user-avatar { color:#17654e; background:#e4f6ee; border:1px solid #cae9dc; }
body.erp-mode .app-shell { display:block; width:auto; max-width:none; margin:0 0 0 232px; padding:24px 28px 60px; }
body.erp-mode .sidebar { position:fixed; inset:64px auto 0 0; width:232px; max-height:none; height:calc(100dvh - 64px); margin:0; padding:14px 12px; overflow-y:auto; border:0; border-radius:0; color:#cfdddd; background:#172c31; box-shadow:none; backdrop-filter:none; scrollbar-color:#496064 #172c31; scrollbar-gutter:auto; }
body.erp-mode .sidebar-title { display:none; }
body.erp-mode .sidebar-title strong { color:#c5dbd7; font-size:12px; }
body.erp-mode .sidebar-title > span { display:none; }
body.erp-mode .sidebar-foot { border-color:#30494b; color:#8eaaa8; background:transparent; padding:15px 9px; font-size:10px; line-height:1.8; }
body.erp-mode .sidebar-foot strong { color:#b5cfca; }
body.erp-mode .erp-fold-controls { display:flex; gap:12px; margin:0 9px 10px; }
body.erp-mode .erp-fold-controls button { padding:2px 0; min-height:22px; border:0; border-radius:0; color:#9ebeb4; background:transparent; font-size:10px; font-weight:400; }
body.erp-mode .erp-fold-controls button:hover { color:#dcfff1; text-decoration:underline; }
body.erp-mode .erp-directory { display:block; }
body.erp-mode .erp-role { margin-bottom:10px; }
body.erp-mode .erp-role > summary, body.erp-mode .erp-module > summary { display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; color:#a4dfcc; background:transparent; font-size:12px; font-weight:600; border:0; padding:8px 9px; line-height:1.4; border-radius:5px; }
body.erp-mode summary::-webkit-details-marker { display:none; }
body.erp-mode .erp-role > summary::after, body.erp-mode .erp-module > summary::after { content:'›'; margin-left:auto; transform:rotate(0deg); font-size:17px; font-weight:400; }
body.erp-mode details[open] > summary::after { transform:rotate(90deg); }
body.erp-mode .erp-role > summary { border-bottom:1px solid #2d4548; border-radius:0; }
body.erp-mode .erp-module { margin-top:3px; }
body.erp-mode .erp-module > summary { color:#b3d6cd; padding:8px 12px; font-size:12px; }
body.erp-mode summary:hover { background:#253e42; }
body.erp-mode summary:focus-visible { outline:2px solid #96dec4; outline-offset:-2px; }
body.erp-mode .erp-directory a { display:flex; align-items:center; gap:9px; width:100%; min-height:36px; margin:2px 0; padding:8px 12px 8px 18px; border:1px solid transparent; border-radius:5px; color:#b7c9cb; background:transparent; font-size:13px; font-weight:400; line-height:1.4; white-space:normal; box-shadow:none; }
body.erp-mode .erp-directory a > span:not(.nav-alert-badge) { flex:1; min-width:0; }
body.erp-mode .erp-directory a svg { width:16px; height:16px; flex-shrink:0; opacity:.85; }
body.erp-mode .erp-directory a:hover { color:#e7fff6; background:#2b4549; transform:none; }
body.erp-mode .erp-directory a.active { color:#123e35; background:#b4ecd7; border-color:#b4ecd7; font-weight:650; }
body.erp-mode .erp-directory a.active svg { opacity:1; }
body.erp-mode .erp-directory .nav-alert-badge { background:#d54b54; color:#fff; box-shadow:none; flex-shrink:0; }
body.erp-mode .erp-fold-controls { display:flex; }
body:not(.erp-mode) .erp-fold-controls { display:none; }
body.erp-mode .page-context { padding:0 0 20px; margin:0; }
body.erp-mode .page-breadcrumb { color:#869a9c; font-size:11px; margin-bottom:10px; }
body.erp-mode .page-context h1 { font-size:24px; line-height:1.4; color:#233e42; font-weight:650; }
body.erp-mode .page-context p { margin-top:8px; color:#788b8f; font-size:12px; }
body.erp-mode main > section { border-color:#e2e8e8; border-radius:7px; padding:20px; box-shadow:none; background:#fff; }
body.erp-mode h2 { color:#29484a; font-size:17px; }
body.erp-mode h3 { color:#365456; }
body.erp-mode input:not([type=checkbox]):not([type=radio]), body.erp-mode select, body.erp-mode textarea { border-radius:5px; border-color:#cfdcd8; }
body.erp-mode button:not(.erp-fold-controls button):not(.icon-button):not(.mobile-menu-button):not(.sidebar-backdrop) { border-radius:5px; }
body.erp-mode table { font-size:13px; }
body.erp-mode thead th { color:#56706e; background:#f3f8f6; border-bottom-color:#dce7e2; font-weight:600; }
body.erp-mode tbody td { border-bottom-color:#e8efec; }
body.erp-mode tbody tr:hover { background:#f6fbf8; }
body.erp-mode .dashboard-panel, body.erp-mode .dashboard-metric, body.erp-mode .dashboard-welcome { box-shadow:none; border-color:#e2e8e8; border-radius:7px; }
body.erp-mode .dashboard-welcome { background:#eff9f4; }

/* Work-order progress shares the portal theme; retain its table and route geometry. */
body.erp-mode .work-order-progress-heading h2 { color:var(--text); font-size:18px; font-weight:650; }
body.erp-mode .work-order-freshness { border-color:#cae9dc; background:#eff9f4; color:#17654e; border-radius:5px; font-weight:600; }
body.erp-mode .work-order-scope, body.erp-mode .work-order-scope.admin { border-color:#cae9dc; background:#eff9f4; color:#405e56; border-radius:5px; }
body.erp-mode .work-order-scope strong, body.erp-mode .work-order-scope.admin strong { color:#17654e; }
body.erp-mode .work-order-filters { border-color:var(--line); border-radius:5px; background:#f7faf9; }
body.erp-mode .work-order-filters label, body.erp-mode .work-order-factory-filter, body.erp-mode .work-order-choice-filter { color:#56706e; }
body.erp-mode .work-order-factory-options, body.erp-mode .work-order-choice-options { border-color:#cfdcd8; border-radius:5px; }
body.erp-mode .work-order-factory-options button.active, body.erp-mode .work-order-choice-options button.active { background:#b4ecd7; color:#123e35; }
body.erp-mode .work-order-today-reported.active, body.erp-mode .work-order-sort-controls button.active { background:#e5f6ee; border-color:#96d7bd; color:#17654e; box-shadow:none; }
body.erp-mode .work-order-stat { border-color:var(--line); border-radius:5px; }
body.erp-mode .work-order-stat strong { color:var(--text); font-weight:650; }
body.erp-mode .work-order-stat span, body.erp-mode .work-order-legend, body.erp-mode .work-order-sort-controls { color:#78898d; }
body.erp-mode .work-order-stat small { color:#869a9c; }
body.erp-mode .work-order-status-tabs { border-color:var(--line); border-radius:5px; }
body.erp-mode .work-order-status-tab { color:#56706e; font-weight:600; }
body.erp-mode .work-order-status-tab.active { color:#123e35; background:#b4ecd7; box-shadow:none; }
body.erp-mode .work-order-status-tab.active b { background:#d9f5e8; }
body.erp-mode .work-order-table-wrap { border-color:var(--line); border-radius:5px; }
body.erp-mode .work-order-table th, body.erp-mode .work-order-table th.work-order-identity, body.erp-mode .work-order-table th.work-order-image, body.erp-mode .work-order-table th.work-order-owner { color:#56706e; background:#f3f8f6; border-color:#dce7e2; font-weight:600; }
body.erp-mode .work-order-table td { color:var(--text); border-color:#e8efec; }
body.erp-mode .work-order-table tbody tr:hover td, body.erp-mode .work-order-table tbody tr:hover .work-order-process-head { background:#f6fbf8; }
body.erp-mode .work-order-sku { color:#167d68; }
body.erp-mode .work-order-code, body.erp-mode .work-order-timing-item > strong { color:var(--text); }
body.erp-mode .work-order-image-frame { border-color:var(--line); border-radius:5px; }
body.erp-mode .work-order-producing-summary { background:#eff9f4; border-color:#cae9dc; border-radius:5px; }
body.erp-mode .work-order-producing-summary > span, body.erp-mode .work-order-process-current-label { background:#167d68; }
body.erp-mode .work-order-producing-summary > strong, body.erp-mode .work-order-process-head strong, body.erp-mode .work-order-process-step.current > strong { color:#167d68; }
body.erp-mode .work-order-process-head { border-color:#e8efec; }
body.erp-mode .work-order-process-step.current .work-order-process-ring { border-color:#167d68; color:#167d68; box-shadow:0 0 0 4px #e5f6ee; }
body.erp-mode .work-order-process-step.complete .work-order-process-ring { border-color:#67ba98; color:#17654e; background:#e5f6ee; }
body.erp-mode .work-order-focus-current { border-color:#cae9dc; background:#eff9f4; color:#17654e; }
body.erp-mode .work-order-status.in-progress { color:#17654e; background:#e5f6ee; }
body.erp-mode .work-order-status.finished { color:#17654e; background:#d9f5e8; }
body.erp-mode .work-order-empty { border-color:#cfdcd8; border-radius:5px; background:#f7faf9; color:var(--muted); }
body.erp-mode .work-order-empty strong, body.erp-mode .work-order-pagination strong { color:var(--text); }
body.erp-mode .work-order-pagination { color:var(--muted); }
body.erp-mode .work-order-pagination label { white-space:nowrap; }
body.erp-mode .work-order-pagination select { border-color:#cfdcd8; border-radius:5px; }

body.erp-mode.auth-mode .app-shell { margin-left:0; }
body.erp-mode.auth-mode header.app-header { padding:0 28px; }
body.erp-mode.auth-mode .brand-link { position:static; width:auto; background:transparent; border:0; padding:0; }
body.erp-mode.auth-mode .brand-copy strong { color:#243b40; }
body.erp-mode.auth-mode .brand-copy span { color:#78918b; }
body.erp-embedded { --brand:#167d68; --brand-soft:#e5f6ee; --line:#e2e8e8; --ink:#243b40; --soft:#f5f8f7; --shadow:none; background:#f4f6f8; color:#243b40; font-family:'Microsoft YaHei','Segoe UI',Arial,sans-serif; font-size:14px; }
body.erp-embedded .panel, body.erp-embedded .card { border-radius:7px; box-shadow:none; border-color:#e2e8e8; }
body.erp-embedded table { font-size:12px; }
body.erp-embedded th { background:#f3f8f6; color:#56706e; }
body.erp-embedded button, body.erp-embedded input, body.erp-embedded select { border-radius:5px; }
@media (max-width:900px) {
body.erp-mode header.app-header { padding:0 16px; gap:10px; }
body.erp-mode .brand-link { position:static; width:auto; min-width:0; height:auto; padding:0; background:transparent; border:0; }
body.erp-mode .brand-copy strong { color:#243b40; }
body.erp-mode .brand-copy span, body.erp-mode .header-context { display:none; }
body.erp-mode .app-shell { margin-left:0; padding:18px 14px 48px; }
body.erp-mode .sidebar { display:block; inset:64px auto 0 0; width:232px; transform:translateX(-100%); transition:transform .2s; z-index:35; }
body.erp-mode.sidebar-open .sidebar { transform:translateX(0); }
body.erp-mode .mobile-menu-button { display:inline-flex; }
body.erp-mode .sidebar-backdrop { top:64px; z-index:34; }
body.erp-mode main > section { padding:14px; }
body.erp-mode .page-context h1 { font-size:21px; }
body.erp-mode .erp-directory summary, body.erp-mode .erp-directory a { min-height:40px; }
}
@media (prefers-reduced-motion:reduce) { body.erp-mode * { transition:none!important; scroll-behavior:auto; } }
}


/* Refined sidebar hierarchy: typography and rhythm, without nested card frames. */
@media screen {
body.erp-mode .sidebar .erp-fold-controls { gap:14px; margin:0 10px 16px; padding:0; }
body.erp-mode .sidebar .erp-fold-controls button { color:#8daea7; font-size:11px; }
body.erp-mode .sidebar .erp-role { margin:0 0 18px; }
body.erp-mode .sidebar .erp-role > summary { min-height:38px; padding:8px 10px; border:0; border-radius:5px; background:transparent; color:#e2f4ed; font-size:14.5px; font-weight:700; line-height:1.5; letter-spacing:.015em; }
body.erp-mode .sidebar .erp-role > summary::before { content:""; width:3px; height:14px; margin-right:2px; border-radius:2px; background:#7fcdb1; flex:0 0 3px; }
body.erp-mode .sidebar .erp-role > summary:hover { background:#213a3d; }
body.erp-mode .sidebar .erp-role-content { padding:0 0 0 5px; }
body.erp-mode .sidebar .erp-module { margin:5px 0 10px 8px; padding:0; border:0; border-radius:0; background:transparent; overflow:visible; }
body.erp-mode .sidebar .erp-module + .erp-module { padding-top:9px; border-top:1px solid #2c4447; }
body.erp-mode .sidebar .erp-module > summary { min-height:30px; padding:5px 10px 5px 18px; border:0; border-radius:4px; background:#1d3639; color:#94c7b8; font-size:12px; font-weight:600; line-height:1.5; letter-spacing:.035em; }
body.erp-mode .sidebar .erp-module[open] > summary { border:0; border-radius:4px; }
body.erp-mode .sidebar .erp-module > summary:hover { background:#254144; color:#c7eadf; }
body.erp-mode .sidebar .erp-role > summary::after { color:#90b3ab; font-size:17px; }
body.erp-mode .sidebar .erp-module > summary::after { color:#7a9c97; font-size:14px; }
body.erp-mode .sidebar .erp-module > div { margin:4px 0 0 0; padding:0; border:0; }
body.erp-mode .sidebar .erp-directory a { width:auto; max-width:100%; min-height:36px; margin:2px 0; padding:8px 9px 8px 16px; gap:10px; border:1px solid transparent; border-radius:5px; color:#becfd0; font-size:13px; font-weight:400; line-height:1.5; overflow-wrap:anywhere; }
body.erp-mode .sidebar .erp-directory a > span:not(.nav-alert-badge) { flex:1; min-width:0; }
body.erp-mode .sidebar .erp-directory a svg { width:16px; height:16px; flex:0 0 16px; opacity:.8; }
body.erp-mode .sidebar .erp-directory a:hover { background:#274145; color:#edf9f4; }
body.erp-mode .sidebar .erp-directory a.active, body.erp-mode .sidebar .erp-directory a.active:hover { color:#173e35; background:#b4ecd7; border-color:#b4ecd7; font-weight:600; box-shadow:inset 3px 0 #5cba96; }
body.erp-mode .sidebar .erp-directory a.active svg { opacity:1; }
body.erp-mode .sidebar .erp-role-content > a { margin-left:12px; }
body.erp-mode .sidebar summary:focus-visible, body.erp-mode .sidebar .erp-directory a:focus-visible { outline:2px solid #96dec4; outline-offset:2px; }
@media(max-width:900px) { body.erp-mode .sidebar .erp-module > summary, body.erp-mode .sidebar .erp-directory a { min-height:40px; } }
}
