/* Shared navigation for CT8, SINGBET and source-review pages. */
.portal-sidebar .nav{min-height:0;padding-bottom:12px}
.portal-sidebar .nav>[data-ct8-nav]{display:block}
.portal-sidebar [data-ct8-nav]{padding:2px 0}
.portal-sidebar [data-ct8-nav] .nav-label{padding-top:6px}
.portal-sidebar [data-ct8-nav] a{min-height:34px;height:auto;padding-top:7px;padding-bottom:7px}
.portal-sidebar .nav-icon{width:17px;height:17px;flex:0 0 17px}
.portal-source-toggle{display:flex;align-items:center;gap:12px;min-height:40px;padding:8px 18px;color:var(--sb-ink);font-size:12px;cursor:pointer;list-style:none}
.portal-source-toggle::-webkit-details-marker{display:none}
.portal-source-toggle>span:first-child{width:18px;flex:none;text-align:center;font-size:20px;line-height:20px}
.portal-source-toggle:focus-visible,.portal-sidebar a:focus-visible,.portal-sidebar button:focus-visible{outline:2px solid #8db4ff;outline-offset:-3px}
#staff-logout{position:static;min-height:36px;width:100%;justify-content:center}
.portal-sidebar .sb-foot>a{color:#b7d0ff;font-size:12px;padding:6px}
.portal-app .workspace{min-width:0;flex:1}
body:has(>.portal-app){background:#e9ebee}   /* the main workspace's canvas (.ops-workspace in operations.css) */
.portal-app .accounting-main{width:100%;margin:0 auto}
/* The same white top bar as the main workspace (.topbar / .tb-row in styles.css): menu, AM888 on narrow
   screens, the page name as the quiet context line, shortcuts, 说明 and EN | 中文 on the right. */
.accounting-top.portal-topbar{position:sticky;top:0;z-index:var(--z-header);display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:var(--header-h);height:auto;padding:0 var(--gutter) 0 16px;background:var(--surface);color:var(--text-primary);border-bottom:1px solid #e9ebee}
.portal-topbar a{color:var(--text-secondary)}
.portal-topbar a:hover{color:var(--text-primary)}
.portal-topbar .tb-brand,.portal-topbar .tb-brand:hover{color:var(--forest-850)}
.portal-topbar .portal-context{margin-right:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0;font-weight:400;letter-spacing:0;text-decoration:none}
.portal-topbar .portal-context span{margin:0;padding:0;border:0;font-size:12px;color:var(--text-secondary)}
.portal-topbar>div{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px;color:var(--text-meta)}
.portal-topbar>.lang-top{gap:2px;flex-wrap:nowrap}
.portal-topbar #locale,.portal-topbar #daily-lang{display:none}   /* the EN | 中文 switch does the same */
.portal-menu{flex:none;min-height:40px;min-width:40px}
.portal-app .source-context{display:none}
.portal-scrim{position:fixed;inset:0;border:0;background:#0d1a2e80;z-index:50}
.collection-alert,.portal-topbar .collection-alert{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:36px;padding:7px 12px;border:1px solid #e6d3a8;border-radius:7px;background:#fff7e7;color:#825008;font-size:12px;line-height:1.3;white-space:nowrap;text-decoration:none}
.collection-alert[hidden]{display:none}
.collection-alert:hover,.portal-topbar .collection-alert:hover{color:#623b00;background:#fff0ce;text-decoration:none}
.collection-alert:focus-visible{outline:2px solid #2865cf;outline-offset:3px}
.collection-alert[data-state="challenge"],.portal-topbar .collection-alert[data-state="challenge"]{border-color:#c23b3b;background:#fff0ef;color:#9a342c}
.collection-alert[data-state="eligible"],.portal-topbar .collection-alert[data-state="eligible"]{border-color:#b9d6c6;background:#edf7f0;color:#275e48}
.collection-alert[data-state="running"],.portal-topbar .collection-alert[data-state="running"]{border-color:#b1c9ee;background:#e9eff7;color:#245f9e}
@media(min-width:1025px){.sb-collapsed .portal-source-toggle{justify-content:center;padding:8px 0;min-height:40px}.sb-collapsed #staff-logout{font-size:12px;padding:5px 2px}.sb-collapsed .portal-sidebar .sb-foot{padding:8px 5px}.portal-scrim{display:none}}
@media(max-width:1024px){.accounting-top.portal-topbar{padding-left:12px}.portal-sidebar [data-ct8-nav] a{min-height:44px}.portal-sidebar .sb-foot{padding-bottom:max(12px,env(safe-area-inset-bottom))}.portal-source-toggle,#staff-logout{min-height:44px}}
@media(max-width:860px){.portal-topbar>.lang-top{display:none}}   /* as in the main workspace: language is in the menu */
@media(max-width:700px){.portal-topbar>div:not(.lang-top){display:none}}   /* shortcuts are all in the menu */
@media(max-width:640px){.accounting-top.portal-topbar{flex-wrap:wrap;gap:4px;padding:0 8px}.portal-topbar .tb-brand{margin:0 auto 0 2px}.portal-topbar .portal-context{order:10;flex:1 0 100%;margin:0;padding:7px 8px;border-top:1px solid var(--border)}.portal-app .accounting-main{padding:12px}.portal-app .page-head{gap:10px}.portal-app .accounting-filters label{min-width:0;flex:1 1 140px}.portal-app .accounting-filters input,.portal-app .accounting-filters select,.portal-app .btn{min-height:44px}.portal-app dialog{max-width:calc(100vw - 20px);max-height:90dvh;overflow:auto}.portal-app .tw{max-width:100%;overflow:auto}.portal-app .accounting-pairs>tbody>tr>td:first-child,.portal-app .accounting-pairs>thead>tr>th:first-child{position:sticky;left:0;background:#f3f6fa;z-index:2}}
@media print{.portal-sidebar,.portal-topbar,.portal-scrim{display:none!important}.portal-app{display:block}}
@media(max-width:640px){.collection-alert{min-height:44px;max-width:100%;white-space:normal}.tb-row>.collection-alert{order:20;flex:1 0 100%;margin:3px 0 6px}.portal-topbar>.collection-alert{flex:1 0 100%}}

.staff-workflow{display:flex;gap:6px;flex-wrap:wrap;padding:10px 0;margin:4px 0 14px}.staff-workflow a{display:flex;align-items:center;gap:7px;padding:8px 12px;color:#52677b;text-decoration:none;border-radius:5px;font-size:13px}.staff-workflow a span{display:grid;place-items:center;border:1px solid #c8d3e2;border-radius:50%;width:23px;height:23px;font-size:12px}.staff-workflow a[aria-current=step]{background:#e9eff7;color:#244e81;font-weight:600}.staff-workflow a[aria-current=step] span{background:#244e81;color:white;border-color:#244e81}.staff-workflow a:focus-visible{outline:2px solid #245f9e;outline-offset:2px}.import-simple #import-workbench>.staff-workflow{order:0;margin:0}@media(max-width:600px){.staff-workflow{display:grid;grid-template-columns:1fr 1fr}.staff-workflow a{min-height:44px;padding:5px;font-size:12px}}
