/* 工作入口沿用字体与石墨色系，独立作用域保留操作记录等管理页面。 */
.portal-home { background: #f7f8fa; color: #25282d; }
.ticket-attention-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: #c43636; color: #fff; font-size: 11px; font-weight: 650; line-height: 1; }
.ticket-attention-count[hidden] { display: none !important; }
.workspace-nav-link .ticket-attention-count { margin-left: auto; }
.request-view-switch .ticket-attention-count { margin-left: 7px; }
.workspace-topbar { height: 76px; display: flex; align-items: center; padding: 0 32px; gap: 24px; background: #fff; border-bottom: 1px solid #e9ebee; position: sticky; top: 0; z-index: 50; }
.workspace-brand { width: 180px; flex-shrink: 0; font-size: 25px; letter-spacing: 1px; font-weight: 650; display: flex; align-items: center; gap: 12px; }
.workspace-brand span { font-size: 12px; font-weight: 400; color: #6e747d; letter-spacing: .5px; border-left: 1px solid #dedfe3; padding-left: 12px; }
.workspace-account { margin-left: auto; }
.portal-home .whoami-tag { display: none; }
.portal-home .account-copy { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.portal-home .account-name { font-size: 13px; }
.portal-home .account-team { font-size: 11px; display: block; }
.workspace-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.workspace-sidebar { background: #fff; border-right: 1px solid #e9ebee; padding: 28px 12px 0 18px; position: sticky; top: 76px; height: calc(100vh - 76px); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: transparent transparent; }
/* 侧栏的滚动条平时不显示，鼠标移上来才出现（第 2 轮收尾 C2：放不下时右边多一根灰条）。位置一直留着（6px，
   从右边距里让出来：右边 12 ＋ 6 ＝ 原来的 18），出现、消失时导航不左右动。Firefox 走标准属性（上一行）。
   Chromium 见到 scrollbar-color 就不用 ::-webkit-scrollbar，所以标准属性只给 Firefox（和 .thin-scroll 同一个办法）。 */
@supports selector(::-webkit-scrollbar) {
  .workspace-sidebar { scrollbar-width: auto; scrollbar-color: auto; }
  .workspace-sidebar::-webkit-scrollbar { width: 6px; }
  .workspace-sidebar::-webkit-scrollbar-track { background: transparent; }
  .workspace-sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
  .workspace-sidebar:hover::-webkit-scrollbar-thumb { background: #d5d9df; }
}
.workspace-sidebar:hover { scrollbar-color: #d5d9df transparent; }
@supports selector(::-webkit-scrollbar) { .workspace-sidebar:hover { scrollbar-color: auto; } }
.workspace-primary, .department-nav { display: grid; gap: 5px; }
.department-nav { gap: 2px; }
/* 导航的间距用门户重修之前的宽松节奏（行高 42、部门 39，Edward 2026-09-24 定：重修后压到 32 太挤）。
   只按窗口高度收一档（850 高以下，见文件末尾），不看谁登录；放不下就整列一起滚，底部「工单」跟着滚。 */
.workspace-nav-link { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 9px 15px; color: #636973; font-size: 13px; font-weight: 450; border-radius: 7px; transition: background .14s ease, color .14s ease; }
.workspace-nav-link:hover { background: #f3f4f6; color: #22252b; }
.workspace-nav-link.is-active { background: #292d34; color: #fff; }
.workspace-icon, .workspace-nav-link img { width: 18px; height: 18px; opacity: .7; flex: none; }
.workspace-nav-link.is-active img { filter: invert(1); opacity: 1; }
.workspace-nav-count { margin-left: auto; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.sidebar-caption { color: #8a9099; font-size: 11px; padding: 32px 15px 11px; letter-spacing: .06em; }
.department-nav .workspace-nav-link.is-empty { color: #a3a9b1; }
.department-nav .workspace-nav-link.is-empty:hover { color: #636973; }
/* 「部门」是常规项里的一行（按钮），右边一个箭头，收起时转过去；部门列在它下面，缩进、左边一条细线，像目录的下一级。 */
.nav-fold { width: 100%; border: 0; background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.nav-fold:focus-visible { outline: 2px solid #9aa3ad; outline-offset: -2px; }
.nav-fold .nav-fold-arrow { width: 15px; height: 15px; margin-left: auto; opacity: .5; transition: transform .14s ease; }
.nav-fold.is-folded .nav-fold-arrow { transform: rotate(-90deg); }
.nav-sub { margin: 0 0 4px 24px; padding-left: 8px; border-left: 1px solid #e9ebee; }
.nav-sub .workspace-nav-link { min-height: 34px; padding: 6px 12px; }
.platform-nav .sidebar-caption { padding-top: 24px; }
/* 底部「工单」是侧栏的页脚：上面一条细线隔开（第 3 轮复核：管理员那列「工单」紧跟在「本体」下面、又没有分隔，
   像是「其他平台」的第三项）。放得下时它在最底下（margin-top: auto）；放不下时不再钉在底部（原来钉着，
   上面那一行被它的分隔线切掉半截，第 2 轮收尾 C2），跟着整列一起滚。
   手机抽屉例外（见文件末尾 680 以下那段）：抽屉里行高不收，管理员那一列 844 高也放不下，「工单」要钉在底部。 */
.workspace-sidebar > :nth-last-child(2) { margin-bottom: 8px; }
.sidebar-bottom { margin-top: auto; padding: 10px 0 14px; background: #fff; border-top: 1px solid #eef0f3; }
.workspace-main { width: 100%; max-width: 1350px; margin: 0 auto; padding: 54px 58px 56px; min-width: 0; }
.workspace-main:focus { outline: none; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 45px; }
.workspace-eyebrow { margin: 0 0 12px; font-size: 11px; letter-spacing: .08em; color: #747b86; }
.workspace-heading h1 { margin: 0 0 10px; font-size: 32px; letter-spacing: -.04em; line-height: 1.3; font-weight: 600; }
.workspace-heading h1:focus { outline: none; }
.workspace-subtitle { font-size: 13px; color: #747b86; margin: 0; line-height: 1.7; }
.workspace-search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e2e5e9; border-radius: 8px; height: 43px; padding: 0 12px; width: 280px; flex-shrink: 0; }
.workspace-search:focus-within { border-color: #6f7783; box-shadow: 0 0 0 3px #292d3408; }
.workspace-search img { width: 16px; height: 16px; opacity: .45; }
.workspace-search input { min-width: 0; width: 100%; border: none; outline: none; background: transparent; font-size: 12px; padding: 8px 0; }
.workspace-search input::placeholder { color: #8b919a; }
.workspace-search kbd { font: 11px var(--sans); border: 1px solid #e9ebee; color: #989da6; padding: 0 6px; border-radius: 3px; }
.tool-section + .tool-section { margin-top: 36px; }
.tool-section-heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 17px; }
.tool-section-heading h2 { font-size: 15px; font-weight: 600; margin: 0; }
.tool-section-heading > span { color: #828994; font-size: 11px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool-card { position: relative; min-width: 0; background: #fff; border: 1px solid #e3e6eb; border-radius: 12px; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.tool-card:hover { border-color: #bdc4ce; box-shadow: 0 6px 22px #27324708; transform: translateY(-2px); }
.tool-card-link { display: flex; flex-direction: column; padding: 26px 24px 20px; height: 100%; min-height: 239px; border-radius: inherit; }
.tool-card-link:focus-visible { outline: 2px solid #292d34; outline-offset: 3px; }
.tool-app-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; background: #f1f3f6; margin-bottom: 21px; }
.tool-app-icon img { width: 23px; height: 23px; opacity: .8; }
/* 应用类型图标（catalog.js 的 appKind）：浅底＋同色系图标，首页和自建应用页共用。图标走 CSS 蒙版，颜色跟 color。 */
.app-glyph { display: block; width: 23px; height: 23px; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.app-tone-blue { background: #e8f0fd; color: #2f6fd6; }
.app-tone-violet { background: #f0ebfd; color: #7552d6; }
.app-tone-green { background: #e6f5ec; color: #23864f; }
.app-tone-rose { background: #fcebef; color: #c7385f; }
.app-tone-amber { background: #fcf3dc; color: #a86b00; }
.app-tone-orange { background: #fdede3; color: #d05a18; }
.app-tone-slate { background: #eef1f5; color: #4f5d70; }
.app-tone-indigo { background: #eceefd; color: #4b55c8; }
.app-tone-cyan { background: #e3f5f8; color: #11839a; }
.app-tone-teal { background: #e3f4f1; color: #1c8373; }
.tool-card h3 { font-size: 17px; line-height: 1.5; font-weight: 600; margin: 0 0 8px; letter-spacing: -.02em; }
.tool-name-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; }
.tool-name-row h3 { margin-bottom: 0; }
.tool-level { flex: none; padding: 1px 6px; border: 1px solid #dde2e8; border-radius: 4px; background: #f5f7fa; color: #526071; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
/* 「只读」和档位同一块小标记，字重轻一点、颜色淡一点：它说的是「你」能做什么，不是应用成熟到哪一档。 */
.tool-access { font-weight: 500; color: #6b7482; }
.tool-description { font-size: 13px; line-height: 1.75; color: #66707d; margin: 0 0 23px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; min-height: 18px; }
.tool-departments { font-size: 11px; color: #69717b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-repo-name { color: #7b818b; }
.tool-open-arrow { width: 17px; height: 17px; opacity: .45; margin-left: auto; flex-shrink: 0; }
.tool-card:hover .tool-open-arrow { opacity: 1; }
.favorite-button, .icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; border: none; border-radius: 7px; background: transparent; cursor: pointer; }
.favorite-button { position: absolute; right: 13px; top: 15px; }
.favorite-button img { width: 17px; height: 17px; opacity: .35; }
.favorite-button:hover { background: #f1f3f6; }
.favorite-button:hover img { opacity: .8; }
.favorite-button.is-favorite { background: transparent; }
.favorite-button.is-favorite:hover { background: #fff6dc; }
.favorite-button.is-favorite img { opacity: 1; }
.tool-status-light { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; color: #8b949e; box-shadow: 0 0 0 3px #8b949e1a; }
.tool-status-light[data-state="ok"] { color: #16a36a; box-shadow: 0 0 0 3px #16a36a1a; }
.tool-status-light[data-state="slow"] { color: #d99716; box-shadow: 0 0 0 3px #d997161a; }
.tool-status-light[data-state="down"] { color: #dc4545; box-shadow: 0 0 0 3px #dc45451a; }
.workspace-empty { border: 1px dashed #d8dde4; background: #ffffff80; border-radius: 12px; padding: 60px 24px; text-align: center; }
.workspace-empty > img { width: 28px; height: 28px; opacity: .35; margin: 0 auto 18px; }
.workspace-empty h2 { font-size: 17px; font-weight: 550; margin: 0 0 10px; }
.workspace-empty p { font-size: 13px; color: #747b86; margin: 0 0 20px; }
.workspace-action { display: inline-block; border: 1px solid #dbe0e6; border-radius: 7px; padding: 8px 14px; background: #fff; cursor: pointer; font-size: 12px; }
.workspace-action:hover { border-color: #8b929c; }
.workspace-result, .workspace-notice { font-size: 11px; color: #747b86; margin: 18px 0 0; }
.workspace-result:empty, .workspace-notice:empty { display: none; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 10px 18px; z-index: 100; background: #fff; border: 1px solid #ddd; }
.skip-link:focus { top: 12px; }
.mobile-menu { display: none; }
/* 404 和等待开通：新壳里的两张简单页（2026-09-23 从旧壳搬过来）。 */
.workspace-empty .code-404 { font-size: 56px; font-weight: 600; letter-spacing: -.04em; margin: 0 0 12px; }
.pending-main { max-width: 680px; }
.pending-card { background: #fff; border: 1px solid #e3e6eb; border-radius: 12px; padding: 32px 36px; }
.pending-card h1 { font-size: 28px; font-weight: 600; letter-spacing: -.03em; margin: 0 0 20px; }
.pending-card .permission-list { margin: 0 0 22px; }
.pending-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
/* ---------- 工具详情页 /tools/<id> 与「关于它的任务」那一栏 ----------
   放在这里而不是 my_tickets.css：工具详情页不带工单页那张样式表，而这一栏以后还要长在
   自建应用页和看板页面旁边（真值⑥ §04：任务挂在它说的那个对象上）。
   obj- 这几个类名是这一栏专用的，和工单页共用的 tk- 家族分开，两边改样式不互相拽着。 */
.tool-detail-title { min-width: 0; }
.tool-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; }
.tool-detail-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tool-detail-actions .workspace-action { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; font-size: 13px; }
.tool-detail-actions .workspace-action img { width: 15px; height: 15px; opacity: .55; }
.workspace-action.is-primary { background: #292d34; border-color: #292d34; color: #fff; }
.workspace-action.is-primary:hover { background: #16191e; border-color: #16191e; }
.workspace-action.is-primary img { filter: invert(1); opacity: .85; }
.obj-task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.obj-task { display: flex; flex-direction: column; gap: 5px; padding: 13px 16px; background: #fff; border: 1px solid #e3e6eb; border-radius: 10px; transition: border-color .16s ease; }
.obj-task:hover { border-color: #bdc4ce; }
.obj-task:focus-visible { outline: 2px solid #292d34; outline-offset: 2px; }
.obj-task-head { display: flex; align-items: baseline; gap: 12px; }
.obj-task-title { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 550; color: #25282d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-task-meta { font-size: 11.5px; color: #747b86; }
/* 三档就够：轮到你（深色）· 没结束（描边）· 已结束（灰）。状态词本身由接口给，前端不另起名目。 */
.obj-pill { flex: none; padding: 1px 8px; border: 1px solid #dde2e8; border-radius: 999px; background: #f5f7fa; color: #526071; font-size: 11px; line-height: 1.7; white-space: nowrap; }
.obj-pill[data-tone="mine"] { border-color: #292d34; background: #292d34; color: #fff; }
.obj-pill[data-tone="done"] { border-color: #e9ebee; background: #f1f2f4; color: #868d97; }
.obj-note { font-size: 12.5px; color: #747b86; margin: 12px 0 0; }
.obj-task-list + .obj-note { margin-top: 10px; }

@media (min-width: 1600px) { .workspace-main { padding-top: 65px; } }
/* 矮窗口（850 高以下）：收成重修之前那一档紧凑间距。 */
@media (max-height: 850px) and (min-width: 681px) {
  .workspace-sidebar { padding-top: 20px; }
  .workspace-primary { gap: 3px; }
  .workspace-nav-link { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
  .sidebar-caption, .platform-nav .sidebar-caption { padding-top: 18px; padding-bottom: 8px; }
  .department-nav { gap: 0; }
  .nav-sub .workspace-nav-link { min-height: 30px; padding-top: 4px; padding-bottom: 4px; }
}
@media (max-width: 1200px) {
  .workspace-main { padding: 40px 30px; }
  .workspace-search { width: 235px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .workspace-layout { grid-template-columns: 208px minmax(0, 1fr); }
  .workspace-brand { width: 152px; }
  .workspace-heading { flex-direction: column; align-items: flex-start; gap: 24px; margin-bottom: 30px; }
  .workspace-search { width: 100%; }
  .workspace-main { padding: 32px 24px; }
  .tool-grid { gap: 12px; }
  .tool-card-link { padding: 22px 18px 18px; }
}
@media (max-width: 680px) {
  .workspace-topbar { height: 66px; padding: 0 18px; gap: 13px; }
  .workspace-brand { width: auto; font-size: 21px; }
  .workspace-brand span { display: none; }
  .mobile-menu { display: grid; }
  .workspace-layout { display: block; min-height: calc(100vh - 66px); }
  .workspace-sidebar { display: none; position: fixed; top: 66px; left: 0; z-index: 45; width: min(285px, 100%); height: calc(100dvh - 66px); box-shadow: 10px 0 30px #25282d12; }
  .navigation-open .workspace-sidebar { display: flex; }
  /* 抽屉里「工单」钉在底部（第二轮最后修补 P6）：上面那几档矮屏只管桌面，手机上行高不收（手指要点得准），
     管理员那一列 390×844 的抽屉就放不下，「工单」原来跟着整列掉到屏幕外。钉住后上面的项从它底下滚过去。 */
  .sidebar-bottom { position: sticky; bottom: 0; }
  .workspace-main { padding: 32px 20px; }
  .workspace-heading h1 { font-size: 28px; }
  .workspace-eyebrow { font-size: 10px; }
  .tool-grid { grid-template-columns: 1fr; gap: 14px; }
  .tool-card-link { min-height: 216px; padding: 24px; }
  .tool-description { font-size: 13px; }
  .tool-departments { font-size: 11px; }
}
