/* 今日工作驾驶舱：所有规则均限定在 .workbench-home，不影响业务子页。 */
.workbench-home {
  --home-blue: #1769d2;
  --home-blue-deep: #1456ad;
  --home-text: #20252d;
  --home-muted: #737b87;
  --home-border: #e4e8ef;
  --home-bg: #f7f8fa;
  --home-panel: #fff;
  --home-standard-card-columns: 12;
  --home-standard-card-gap: 8px;
  --home-standard-card-small-span: 2;
  --home-standard-card-medium-span: 3;
  --home-standard-card-large-span: 6;
  --home-standard-card-small-height: 132px;
  --home-standard-card-medium-height: 150px;
  --home-standard-card-large-height: 174px;
  --home-app-card-columns: 12;
  --home-app-card-gap: 6px;
  --home-app-card-small-span: 1;
  --home-app-card-medium-span: 2;
  --home-app-card-large-span: 3;
  --home-app-card-small-height: 104px;
  --home-app-card-medium-height: 120px;
  --home-app-card-large-height: 146px;
  min-height: 100vh;
  background: var(--home-bg);
  color: var(--home-text);
}
.workbench-home * { box-sizing: border-box; }
.workbench-home button,
.workbench-home input { font: inherit; }
.workbench-home button:focus-visible,
.workbench-home input:focus-visible { outline: 3px solid rgba(23,105,210,.2); outline-offset: 2px; }
.workbench-header {
  position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: minmax(180px,1fr) auto minmax(560px,1fr);
  align-items: center; min-height: 46px; padding: 0 28px; border-bottom: 1px solid #e7eaf0; background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(31,45,61,.025);
}
.workbench-brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.workbench-brand img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; box-shadow: 0 3px 9px rgba(23,105,210,.17); }
.workbench-brand span { color: var(--home-blue-deep); font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.workbench-greeting { padding: 0 20px; color: #1b1f26; font-size: 16px; font-weight: 650; white-space: nowrap; }
.workbench-header-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 19px; }
.workbench-search { position: relative; display: flex; width: min(100%, 310px); height: 34px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #dce1e8; border-radius: 8px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.workbench-search.focused { border-color: #9fc1ed; box-shadow: 0 0 0 3px rgba(23,105,210,.08); }
.home-svg { display: inline-flex; width: 1em; height: 1em; align-items: center; justify-content: center; flex: 0 0 auto; }
.home-svg svg { display: block; width: 100%; height: 100%; }
.workbench-search > .home-svg { width: 20px; height: 20px; color: #7c8490; }
.workbench-search input { min-width: 0; flex: 1; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #303640; font-size: 14px; }
.workbench-search input::-webkit-search-cancel-button { display: none; }
.workbench-search input::placeholder { color: #9aa1ab; }
.workbench-search-clear { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: #f0f2f5; color: #7b838e; cursor: pointer; line-height: 20px; }
.workbench-search-results { position: absolute; top: calc(100% + 9px); left: 0; right: 0; padding: 7px; border: 1px solid #e1e5eb; border-radius: 10px; background: #fff; box-shadow: 0 12px 32px rgba(31,45,61,.14); }
.workbench-search-results button { display: grid; width: 100%; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: #343a44; cursor: pointer; text-align: left; }
.workbench-search-results button.active { background: #f0f6fd; color: var(--home-blue); }
.workbench-search-results button .home-svg { width: 18px; height: 18px; }
.workbench-search-results button .home-application-logo { display:block; width:24px; height:24px; justify-self:center; object-fit:contain; }
.workbench-search-results button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workbench-search-results button em { color: #9ba2ad; font-size: 12px; font-style: normal; }
.workbench-search-empty { padding: 17px 10px; color: #9299a4; font-size: 13px; text-align: center; }
.workbench-notification { position: relative; display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #252a32; cursor: pointer; transition: background .16s; }
.workbench-notification:hover { background: #f3f6fa; }
.workbench-notification .home-svg { width: 24px; height: 24px; }
.workbench-notification > span { position: absolute; top: -3px; right: -5px; display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border: 2px solid #fff; border-radius: 10px; background: #f04444; color: #fff; font-size: 11px; font-weight: 700; }
.workbench-user { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 3px 2px; border: 0; background: transparent; color: #262b33; cursor: pointer; }
.workbench-user-avatar { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: var(--home-blue); color: #fff; }
.workbench-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.workbench-user-avatar i { display: grid; width: 100%; height: 100%; place-items: center; color: inherit; font-size: 14px; font-style: normal; font-weight: 600; }
.workbench-user span { max-width: 96px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.workbench-user b { width: 0; height: 0; border-top: 5px solid #77808b; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.workbench-content { width: 100%; max-width: 1720px; margin: 0 auto; padding: 26px 28px 34px; }
.home-panel { border: 1px solid var(--home-border); border-radius: 12px; background: var(--home-panel); box-shadow: 0 4px 16px rgba(31,45,61,.035); }
.today-overview { display: grid; grid-template-columns: minmax(350px,2.1fr) repeat(5,minmax(132px,1fr)); gap: 14px; margin-bottom: 24px; }
.today-welcome { position: relative; display: flex; min-height: 142px; align-items: center; gap: 20px; padding: 22px 24px; overflow: hidden; }
.today-welcome-line { width: 4px; height: 88px; flex: 0 0 auto; border-radius: 2px; background: #cb720f; box-shadow: 0 0 0 5px rgba(203,114,15,.045); }
.today-welcome h1 { margin: 0 0 8px; color: #171b22; font-size: 23px; font-weight: 700; line-height: 1.25; }
.today-welcome time { color: #686f79; font-size: 14px; }
.today-welcome p { margin: 11px 0 0; color: #6f7782; font-size: 14px; line-height: 1.5; }
.home-today-add-todo { margin-left:auto; padding:7px 12px; border:1px solid #2d76ce; border-radius:7px; background:#347fd8; color:#fff; cursor:pointer; font-size:13px; white-space:nowrap; }
.home-today-add-todo:hover { background:#246fc8; }
.home-inline-retry { position: absolute; right: 16px; bottom: 14px; padding: 5px 10px; border: 1px solid #d3dce8; border-radius: 6px; background: #fff; color: var(--home-blue); cursor: pointer; font-size: 12px; }
.home-metric-card { display: flex; min-width: 0; min-height: 142px; align-items: center; gap: 12px; padding: 18px 15px; border: 1px solid var(--home-border); border-radius: 12px; background: #fff; box-shadow: 0 4px 16px rgba(31,45,61,.035); cursor: pointer; text-align: left; transition: border-color .16s, box-shadow .16s, transform .16s; }
.home-metric-card:hover { transform: translateY(-2px); border-color: #b8cbe4; box-shadow: 0 8px 20px rgba(31,74,126,.08); }
.home-metric-card.active { border-color: #9ebee6; box-shadow: 0 0 0 3px rgba(23,105,210,.07); }
.home-metric-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 12px; }
.home-metric-icon .home-svg { width: 27px; height: 27px; }
.home-metric-copy { min-width: 0; }
.home-metric-copy > span { display: block; margin-bottom: 8px; color: #333942; font-size: 14px; white-space: nowrap; }
.home-metric-copy b { display: block; font-size: 29px; font-weight: 700; line-height: 1; }
.tone-orange .home-metric-icon { border-color: #f1d4b7; background: #fff8f1; color: #c66400; }
.tone-orange .home-metric-copy b { color: #bd5b00; }
.tone-green .home-metric-icon { border-color: #cfe5d6; background: #f1f8f3; color: #3e855c; }
.tone-green .home-metric-copy b { color: #397953; }
.tone-blue .home-metric-icon { border-color: #cdddf3; background: #f1f6fd; color: #2862bb; }
.tone-blue .home-metric-copy b { color: #285fb3; }
.tone-red .home-metric-icon { border-color: #efd0d0; background: #fff2f2; color: #c94d54; }
.tone-red .home-metric-copy b { color: #bd3f47; }
.home-skeleton { display: block; border-radius: 5px; background: linear-gradient(90deg,#eef1f5 25%,#f7f8fa 37%,#eef1f5 63%); background-size: 400% 100%; animation: home-shimmer 1.35s ease infinite; }
.home-skeleton.metric { width: 58px; height: 30px; }
@keyframes home-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.workbench-main-grid { display: grid; grid-template-columns: minmax(380px,.72fr) minmax(680px,1.48fr); align-items: start; gap: 24px; margin-bottom: 24px; }
.home-common, .home-todos { min-height: 344px; padding: 22px; }
.home-panel h2 { margin: 0; color: #232830; font-size: 19px; font-weight: 700; line-height: 1.3; }
.home-common-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.home-common-item { position: relative; display: flex; min-width: 0; min-height: 112px; align-items: center; gap: 15px; padding: 18px; border: 1px solid #e0e5ec; border-radius: 10px; background: #fff; color: #252a32; cursor: pointer; text-align: left; transition: transform .16s, border-color .16s, box-shadow .16s, background .16s; }
.home-common-item:hover { transform: translateY(-2px); border-color: #b9cce5; background: #fcfdff; box-shadow: 0 9px 22px rgba(31,74,126,.08); }
.home-common-item:active { transform: translateY(0); box-shadow: inset 0 1px 3px rgba(31,45,61,.08); }
.home-common-icon { display: grid; width: 54px; height: 54px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #f5f7fa; }
.home-common-icon .home-svg { width: 33px; height: 33px; }
.home-common-icon.has-app-logo,.home-app-icon.has-app-logo { overflow:hidden; box-sizing:border-box; padding:3px; background:#f4f8ff!important; }
.home-common-icon .home-application-logo,.home-app-icon .home-application-logo { display:block; width:100%; height:100%; object-fit:contain; }
.home-common-item strong { min-width: 0; overflow-wrap: anywhere; font-size: 16px; font-weight: 600; }
.home-card-arrow { position: absolute; top: 50%; right: 12px; opacity: 0; color: #7992af; font-size: 22px; transform: translate(-4px,-53%); transition: opacity .16s, transform .16s; }
.home-common-item:hover .home-card-arrow { opacity: 1; transform: translate(0,-53%); }

.home-business-section { margin-top: 20px; padding: 20px; border: 1px solid #e8eef5; border-radius: 14px; background: #fff; box-shadow: 0 4px 18px rgba(42,64,90,.05); }
.home-battle-followups { margin-bottom:24px; padding:22px; }
.home-battle-group + .home-battle-group { margin-top:22px; padding-top:20px; border-top:1px solid #edf1f5; }
.home-battle-group-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; }
.home-battle-group-head > div { display:flex; align-items:center; gap:9px; }
.home-battle-group-head strong { color:#30445a; font-size:15px; }
.home-battle-group-head span { padding:3px 8px; border-radius:10px; background:#f1f5f9; color:#738398; font-size:11px; }
.home-section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.home-section-head h2 { margin:0 0 4px; font-size:18px; color:#24364b; }
.home-section-head p { margin:0; font-size:13px; color:#8a9aae; }
.home-business-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.workbench-home .home-business-section > .home-business-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.home-business-card { display:flex; align-items:center; gap:12px; min-height:82px; padding:14px; border:1px solid #e8eef5; border-radius:12px; background:#fbfdff; color:#24364b; text-align:left; cursor:pointer; transition:.18s ease; }
.home-business-card:hover { transform:translateY(-2px); border-color:#f3b46c; box-shadow:0 8px 18px rgba(223,128,35,.12); }
.home-business-card > span:nth-child(2) { display:flex; flex:1; flex-direction:column; gap:4px; }
.home-business-card strong { font-size:15px; }.home-business-card small { color:#8a9aae; }.home-business-card > b { color:#9aabba; font-size:22px; }
.home-business-icon { display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:12px; background:#fff1df; color:#d77a19; }
.home-card-setting-row { display:flex; align-items:center; justify-content:space-between; min-height:42px; border-bottom:1px solid #f1f3f6; }.home-card-setting-row small { color:#a0a9b3; }
@media (max-width: 720px) { .home-business-section,.home-battle-followups{padding:14px}.home-section-head{align-items:flex-start}.home-business-grid,.workbench-home .home-business-section > .home-business-grid{grid-template-columns:1fr}.home-battle-group-head{align-items:flex-start}.home-battle-group-head>div{align-items:flex-start;flex-direction:column;gap:4px} }
.home-common-item.tone-orange .home-common-icon { background: #fff5e9; color: #c96906; }
.home-common-item.tone-green .home-common-icon { background: #eff8f1; color: #43835a; }
.home-common-item.tone-blue .home-common-icon { background: #eef5fd; color: #286ac0; }
.home-common-item.tone-purple .home-common-icon { background: #f4f0fb; color: #6345a7; }
.home-common-item.tone-red .home-common-icon { background: #fff1f1; color: #db4b51; }
.home-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; }
.home-panel-head > button { padding: 5px 0 5px 8px; border: 0; background: transparent; color: #6e7681; cursor: pointer; font-size: 13px; }
.home-panel-head > button:hover { color: var(--home-blue); }
.home-panel-head > button span { font-size: 20px; vertical-align: -2px; }
.home-panel-head > div { display: flex; align-items: center; gap: 10px; }
.home-required-card { padding: 3px 7px; border: 1px solid #d4e2f3; border-radius: 5px; background: #f1f6fc; color: #567cae; font-size: 11px; }
.home-todo-tabs { display: flex; gap: 4px; margin: 8px 0 16px; padding: 4px; overflow-x: auto; border-radius: 9px; background: #f5f7fa; }
.home-todo-tabs button { display: inline-flex; min-width: max-content; flex: 1; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: #68717e; cursor: pointer; font-size: 13px; }
.home-todo-tabs button b { min-width: 20px; padding: 1px 5px; border-radius: 9px; background: #e8ebef; color: #7d8590; font-size: 11px; }
.home-todo-tabs button.active { background: #fff; color: var(--home-blue); box-shadow: 0 2px 7px rgba(31,45,61,.08); font-weight: 600; }
.home-todo-tabs button.active b { background: #eaf2fc; color: var(--home-blue); }
.home-todo-list { margin-top: 0; }
.home-todo-item { display: grid; width: 100%; min-height: 68px; grid-template-columns: 48px minmax(230px,1fr) minmax(220px,280px) 78px; align-items: center; gap: 13px; padding: 8px 5px; border: 0; border-bottom: 1px dashed #e3e6eb; background: transparent; color: #262b33; cursor: pointer; text-align: left; transition: background .15s, padding .15s; }
.home-todo-item:last-child { border-bottom: 0; }
.home-todo-item:hover { padding-right: 8px; padding-left: 8px; border-radius: 7px; background: #f8fafc; }
.home-todo-item:active { background: #eef4fb; }
.home-todo-item.overdue { background: linear-gradient(90deg,rgba(222,72,80,.05),transparent 45%); }
.home-priority { display: inline-flex; width: 42px; min-height: 26px; align-items: center; justify-content: center; border-radius: 6px; background: #f1f3f6; color: #727b87; font-size: 12px; }
.home-priority.urgent { background: #fff0f0; color: #cc3f48; font-weight: 600; }
.home-priority.high { background: #fff4e8; color: #c46605; }
.home-priority.low { background: #f1f6fc; color: #5d7fa9; }
.home-todo-copy { min-width: 0; }
.home-todo-copy strong { display: block; overflow: hidden; color: #30353d; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.home-todo-meta { display: block; margin-top: 6px; overflow: hidden; color: #87909b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.home-task-flow { display: grid; grid-template-columns: repeat(4,1fr); min-width: 0; }
.home-task-flow i { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 4px; color: #a2a8b0; font-style: normal; }
.home-task-flow i::before { position: absolute; top: 5px; left: 0; width: 50%; height: 1px; background: #d8dde4; content: ''; }
.home-task-flow i::after { position: absolute; top: 5px; right: 0; width: 50%; height: 1px; background: #d8dde4; content: ''; }
.home-task-flow i:first-child::before,.home-task-flow i:last-child::after { display: none; }
.home-task-flow i b { position: relative; z-index: 1; width: 11px; height: 11px; border: 2px solid #c9cfd7; border-radius: 50%; background: #fff; }
.home-task-flow i em { overflow: hidden; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.home-task-flow i.done b,.home-task-flow i.current b { border-color: var(--home-blue); background: var(--home-blue); }
.home-task-flow i.done::before,.home-task-flow i.done::after,.home-task-flow i.current::before { background: #8bb3e5; }
.home-task-flow i.current { color: var(--home-blue); font-weight: 600; }
.home-task-action { min-height: 31px; padding: 5px 8px; border: 1px solid #cbd9e9; border-radius: 6px; background: #fff; color: var(--home-blue); cursor: pointer; font-size: 12px; white-space: nowrap; }
.home-task-action.start { border-color: #e8c9a8; color: #b85b00; }
.home-task-action.accept { border-color: #bfdcc8; color: #3d8054; }
.home-task-action:hover { background: #f4f8fd; }
.home-todo-skeleton { padding-top: 5px; }
.home-todo-skeleton > div { display: flex; height: 66px; align-items: center; gap: 13px; border-bottom: 1px dashed #e6e9ee; }
.home-todo-skeleton .icon { width: 38px; height: 38px; }
.home-todo-skeleton span { flex: 1; }
.home-todo-skeleton .line { width: 65%; height: 13px; }
.home-todo-skeleton .subline { width: 35%; height: 9px; margin-top: 8px; }
.home-state { display: flex; min-height: 246px; flex-direction: column; align-items: center; justify-content: center; color: #9199a4; text-align: center; }
.home-state > .home-svg { width: 40px; height: 40px; margin-bottom: 12px; color: #a9bdd7; }
.home-state strong { color: #69727e; font-size: 14px; font-weight: 500; }
.home-state span { margin-top: 6px; font-size: 12px; }
.home-state button { margin-top: 13px; padding: 6px 12px; border: 1px solid #b7cae3; border-radius: 6px; background: #fff; color: var(--home-blue); cursor: pointer; }
.home-applications { padding: 22px; }
.home-app-grid { display: grid; grid-template-columns: repeat(10,minmax(100px,1fr)); gap: 8px; margin-top: 18px; }
.home-app-item { display: flex; min-width: 0; min-height: 132px; flex-direction: column; align-items: center; justify-content: flex-start; gap: 9px; padding: 10px 6px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #252a32; cursor: pointer; transition: transform .16s, border-color .16s, background .16s, box-shadow .16s; }
.home-app-item:hover:not(.is-planning) { transform: translateY(-2px); border-color: #dce4ef; background: #fbfcfe; box-shadow: 0 6px 16px rgba(31,74,126,.06); }
.home-app-item:active:not(.is-planning) { transform: translateY(0); background: #f2f6fb; }
.home-app-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 11px; background: #f4f6f9; }
.home-app-icon .home-svg { width: 31px; height: 31px; }
.home-app-copy { display: flex; min-width: 0; flex-direction: column; align-items: center; }
.home-app-item strong { min-height: 20px; color: #30353d; font-size: 14px; font-weight: 500; line-height: 20px; text-align: center; overflow-wrap: anywhere; }
.home-app-item.has-details { grid-column: span 2; min-height: 154px; padding-right: 13px; padding-left: 13px; border-color: #e5dcf8; background: linear-gradient(145deg,#fbf9ff,#f7f3ff); }
.home-app-item.has-details .home-app-icon { width: 52px; height: 52px; background: linear-gradient(145deg,#eee6ff,#f8f4ff); color: #7049bd; box-shadow: 0 6px 16px rgba(100,71,168,.1); }
.home-app-item.has-details strong { color: #30353d; font-size: 14px; font-weight: 500; line-height: 20px; }
.home-app-item.has-details small { margin-top: 1px; color: #725b95; font-size: 12px; line-height: 18px; }
.home-app-item.has-details p { max-width: 260px; margin: 4px 0 0; color: #8a7a9f; font-size: 11px; line-height: 16px; text-align: center; }
.home-app-item.tone-orange .home-app-icon { background: #fff4e9; color: #d16d07; }
.home-app-item.tone-green .home-app-icon { background: #eff8f1; color: #43835a; }
.home-app-item.tone-blue .home-app-icon { background: #eef5fd; color: #246bc0; }
.home-app-item.tone-purple .home-app-icon { background: #f3effb; color: #6447a8; }
.home-app-item.tone-red .home-app-icon { background: #fff0f0; color: #de4c51; }
.home-app-item.tone-cyan .home-app-icon { background: #edf8fa; color: #278196; }
.home-status-tag { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 9px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; line-height: 1; }
.home-status-tag.is-online { border-color: #d5ead5; background: #f0f8ef; color: #4f914d; }
.home-status-tag.is-planning { border-color: #e2e5e9; background: #f5f6f7; color: #9298a1; }
.home-app-item.is-planning { filter: saturate(.35); opacity: .68; cursor: not-allowed; }
.home-app-item.is-planning:hover { background: #fafafa; }

@media (max-width: 1440px) {
  .workbench-header { grid-template-columns: minmax(165px,1fr) auto minmax(480px,1fr); padding: 0 22px; }
  .workbench-header-actions { gap: 13px; }
  .workbench-search { width: 270px; }
  .workbench-content { padding-right: 22px; padding-left: 22px; }
  .today-overview { grid-template-columns: repeat(5,1fr); gap: 12px; }
  .today-welcome { grid-column: 1 / -1; min-height: 126px; }
  .home-metric-card { gap: 14px; padding: 18px; }
  .home-metric-icon { width: 54px; height: 54px; }
  .home-common-grid { gap: 13px; }
  .home-common-item { padding: 14px; }
  .home-common-icon { width: 48px; height: 48px; }
  .home-app-grid { grid-template-columns: repeat(5,minmax(120px,1fr)); row-gap: 14px; }
}
@media (max-width: 1180px) {
  .workbench-header { grid-template-columns: auto 1fr; }
  .workbench-greeting { grid-row: 2; grid-column: 1 / -1; padding: 0 0 13px; text-align: center; }
  .workbench-header-actions { min-height: 46px; }
  .today-overview { grid-template-columns: repeat(3,1fr); }
  .today-welcome { grid-column: 1 / -1; min-height: 126px; }
  .home-metric-card { min-height: 126px; }
  .workbench-main-grid { grid-template-columns: 1fr; }
  .home-common, .home-todos { min-height: 0; }
  .home-common-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 780px) {
  .workbench-header { display: flex; flex-wrap: wrap; gap: 7px; padding: 7px 12px; }
  .workbench-brand { flex: 1; }
  .workbench-brand img { width: 30px; height: 30px; }
  .workbench-brand span { font-size: 19px; }
  .workbench-greeting { display:none; }
  .workbench-header-actions { gap: 8px; }
  .workbench-search { position: static; order: 4; width: min(100%,220px); flex-basis:auto; }
  .workbench-search-results { top: auto; right: 16px; bottom: 10px; left: 16px; transform: translateY(100%); }
  .workbench-user span { display: none; }
  .workbench-content { padding: 16px; }
  .today-overview { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .today-welcome { grid-column: auto; }
  .home-metric-card { min-height: 105px; }
  .workbench-main-grid { gap: 16px; }
  .home-common, .home-todos, .home-applications { padding: 17px; }
  .home-common-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-common-item { min-height: 100px; }
  .home-app-grid { grid-template-columns: repeat(2,minmax(110px,1fr)); }
  .home-app-item.has-details { grid-column: 1 / -1; }
  .home-todo-item { grid-template-columns: 44px minmax(0,1fr) 74px; }
  .home-task-flow { display: none; }
}
@media (max-width: 480px) {
  .today-overview { grid-template-columns: 1fr; }
  .home-common-grid { grid-template-columns: 1fr; }
  .home-todo-item { grid-template-columns: 40px minmax(0,1fr); }
  .home-task-action { grid-column: 2; width: max-content; }
}
@media (prefers-reduced-motion: reduce) {
  .workbench-home *, .workbench-home *::before, .workbench-home *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 首页两层布局编辑：GridStack 负责一级碰撞/吸附，内部应用使用标准尺寸网格。 */
.home-layout-commandbar { display:flex; min-height:52px; align-items:center; justify-content:space-between; gap:18px; margin-top:16px; padding:9px 13px; border:1px solid #e3e8ef; border-radius:11px; background:rgba(255,255,255,.9); box-shadow:0 3px 12px rgba(31,45,61,.03); }
.home-layout-commandbar > div:first-child { display:flex; min-width:0; flex-direction:column; gap:2px; }
.home-layout-commandbar strong { color:#303843; font-size:14px; }
.home-layout-commandbar span { overflow:hidden; color:#8a939f; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.home-layout-commandbar.editing { border-color:#aac9ef; background:#f5f9ff; box-shadow:0 8px 22px rgba(35,92,162,.12); }
.home-dashboard-grid { min-height:240px; }
.home-dashboard-grid > .home-dashboard-item > .home-layout-card-shell { overflow:hidden; border-radius:13px; background:transparent; box-shadow:none; }
.home-layout-card-body { width:100%; height:100%; min-height:0; container-name:homecard; container-type:size; }
.home-layout-card-body > .home-panel,
.home-layout-card-body > .today-overview,
.home-layout-card-body > .home-business-section { width:100%; height:100%; margin:0; overflow:auto; }
.home-layout-card-body > .today-overview { align-content:stretch; overflow:hidden; }
.home-layout-card-body > .today-overview > * { min-height:0; height:100%; }
.home-layout-card-body > .home-battle-followups { margin:0; }
.home-dashboard-item.card-battle_followups > .home-layout-card-shell { overflow:visible; }
.home-dashboard-item.card-battle_followups .home-layout-card-body,
.home-dashboard-item.card-battle_followups .home-layout-card-body > .home-battle-followups { height:auto; overflow:visible; }
.home-dashboard-item.is-auto-height > .home-layout-card-shell,
.home-dashboard-item.is-auto-height .home-layout-card-body { overflow:visible; }
.home-dashboard-item.is-auto-height .home-layout-card-body > .home-panel,
.home-dashboard-item.is-auto-height .home-layout-card-body > .home-business-section { height:auto; min-height:0; overflow:visible; }
.home-dashboard-item.is-auto-height .home-todo-list { overflow:visible; }
.home-dashboard-item.card-my_todos .home-layout-card-body > .home-my-todos { display:grid; height:100%; min-height:0; grid-template-rows:minmax(34px,auto) minmax(40px,auto) minmax(0,1fr); row-gap:14px; overflow:hidden; }
.home-dashboard-item.card-my_todos .home-panel-head { position:relative; z-index:2; min-height:34px; padding-bottom:0; background:#fff; }
.home-dashboard-item.card-my_todos .home-todo-tabs { position:relative; z-index:2; min-height:40px; margin:0; background:#f5f7fa; }
.home-dashboard-item.card-my_todos .home-todo-list,
.home-dashboard-item.card-my_todos .home-todo-skeleton,
.home-dashboard-item.card-my_todos .home-state { min-height:0; }
.home-dashboard-item.card-my_todos .home-todo-list,
.home-dashboard-item.card-my_todos .home-todo-skeleton { overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.home-layout-card-toolbar { position:absolute; z-index:30; top:9px; left:9px; display:flex; height:31px; align-items:center; gap:8px; padding:4px 8px 4px 4px; border:1px solid #b8cce6; border-radius:8px; background:rgba(247,251,255,.96); box-shadow:0 5px 13px rgba(31,74,126,.15); color:#41658f; }
.home-layout-card-toolbar strong { max-width:190px; overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.home-layout-card-toolbar span { padding-left:5px; border-left:1px solid #d6e2f0; color:#8799ad; font-size:10px; }
.home-visibility-recovery { position:fixed; z-index:96; right:22px; bottom:22px; display:flex; min-height:38px; align-items:center; gap:7px; padding:8px 13px; border:1px solid #8db3de; border-radius:999px; background:#fff; box-shadow:0 8px 24px rgba(31,74,126,.22); color:#245f9f; cursor:pointer; }
.home-visibility-recovery:disabled { cursor:not-allowed; opacity:.55; }
.home-layout-load-error { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; padding:10px 13px; border:1px solid #f2c48f; border-radius:10px; background:#fff8ed; color:#955d1b; font-size:13px; }
.home-card-setting-row.is-focused { margin:0 -8px; padding-right:8px; padding-left:8px; border-radius:8px; background:#edf6ff; box-shadow:inset 3px 0 #409eff; }
.home-layout-drag-handle { display:grid; width:23px; height:23px; place-items:center; padding:0; border:0; border-radius:5px; background:#e6f0fc; color:#2865ad; cursor:move; font-size:18px; line-height:1; touch-action:none; }
.home-layout-drag-handle:hover { background:#d5e7fb; }
.home-layout-edit-shield { position:absolute; z-index:15; inset:0; border:2px solid rgba(63,132,214,.2); border-radius:13px; background:rgba(244,249,255,.08); cursor:default; }
.home-dashboard-grid.is-editing > .grid-stack-item > .ui-resizable-se { z-index:35; display:block; width:28px; height:28px; border-radius:8px 0 10px 0; background-color:#e7f1fd; background-size:20px; opacity:1; }
.home-dashboard-grid.is-editing > .grid-stack-item > .ui-resizable-e { display:none; }
.home-dashboard-grid.is-editing > .grid-stack-item.is-auto-height > .ui-resizable-se { display:none; }
.home-dashboard-grid.is-editing > .grid-stack-item.is-auto-height > .ui-resizable-e { z-index:35; right:-3px; display:block; width:12px; border-radius:8px; background:#e7f1fd; opacity:.9; }
.home-dashboard-grid.is-editing > .grid-stack-item > .grid-stack-item-content { outline:1px dashed #87b3e6; outline-offset:-2px; }
.home-dashboard-grid.is-editing > .grid-stack-placeholder > .placeholder-content { border:2px dashed #5999df; border-radius:12px; background:rgba(60,134,218,.11); }
.home-dashboard-grid .ui-draggable-dragging > .grid-stack-item-content,
.home-dashboard-grid .ui-resizable-resizing > .grid-stack-item-content { opacity:.93; box-shadow:0 14px 34px rgba(31,74,126,.2); }

.home-inner-common-card,
.home-inner-app-card { position:relative; min-width:0; border-radius:10px; }
.home-inner-common-card > .home-common-item,
.home-inner-app-card > .home-app-item { width:100%; height:100%; }
.home-common-grid { grid-template-columns:repeat(9,minmax(0,1fr)); align-items:start; gap:8px; margin-top:12px; }
.home-inner-common-card.size-small { grid-column:span 2; min-height:72px; }
.home-inner-common-card.size-medium { grid-column:span 3; min-height:76px; }
.home-inner-common-card.size-large { grid-column:span 6; min-height:88px; }
.home-inner-common-card > .home-common-item { min-height:0; gap:9px; padding:9px 11px; }
.home-inner-common-card .home-common-icon { width:38px; height:38px; border-radius:9px; }
.home-inner-common-card .home-common-icon .home-svg { width:24px; height:24px; }
.home-inner-common-card .home-common-item strong { padding-right:7px; font-size:14px; }
.home-inner-common-card.size-small .home-common-item { flex-direction:column; justify-content:center; gap:4px; padding:6px; text-align:center; }
.home-inner-common-card.size-small .home-common-icon { width:34px; height:34px; }
.home-inner-common-card.size-small .home-common-icon .home-svg { width:22px; height:22px; }
.home-inner-common-card.size-large .home-common-item { padding-right:18px; padding-left:18px; }
.home-app-grid { grid-template-columns:repeat(var(--home-app-card-columns),minmax(0,1fr)); align-items:start; gap:var(--home-app-card-gap); margin-top:12px; }
.home-inner-app-card.size-small { grid-column:span var(--home-app-card-small-span); height:var(--home-app-card-small-height); }
.home-inner-app-card.size-medium { grid-column:span var(--home-app-card-medium-span); height:var(--home-app-card-medium-height); }
.home-inner-app-card.size-large { grid-column:span var(--home-app-card-large-span); height:var(--home-app-card-large-height); }
.home-inner-app-card > .home-app-item { min-height:0; gap:6px; padding:7px 4px; }
.home-inner-app-card .home-app-icon { width:38px; height:38px; border-radius:9px; }
.home-inner-app-card .home-app-icon .home-svg { width:24px; height:24px; }
.home-inner-app-card .home-app-item strong { min-height:17px; font-size:12px; line-height:17px; }
.home-inner-app-card .home-status-tag { min-height:20px; padding:2px 6px; font-size:11px; }
.home-inner-app-card.size-small .home-app-icon { width:34px; height:34px; }
.home-inner-app-card.size-small .home-app-icon .home-svg { width:22px; height:22px; }
.home-inner-app-card.size-medium .home-app-item { border-color:#e1e7ef; background:#fbfcfe; }
.home-inner-app-card.size-medium .home-app-icon { width:40px; height:40px; }
.home-inner-app-card.size-medium .home-app-copy p { display:none; }
.home-inner-app-card.size-large .home-app-item { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:8px; padding:10px 12px; border-color:#ded4f2; background:linear-gradient(145deg,#fbf9ff,#f7f3ff); text-align:left; }
.home-inner-app-card.size-large .home-app-icon { width:44px; height:44px; }
.home-inner-app-card.size-large .home-app-copy { align-items:flex-start; }
.home-inner-app-card.size-large .home-app-item strong,
.home-inner-app-card.size-large .home-app-item p { text-align:left; }
.home-inner-app-card.size-large .home-app-item p { display:-webkit-box; max-width:none; margin-top:2px; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.home-inner-app-card.size-large .home-status-tag { align-self:center; margin-top:0; }
.home-inner-app-card.size-small .home-app-copy small,
.home-inner-app-card.size-small .home-app-copy p { display:none; }
.home-inner-edit-controls { position:absolute; z-index:20; right:5px; bottom:5px; left:5px; display:flex; min-height:29px; align-items:center; gap:3px; padding:3px; border:1px solid #c8d7e9; border-radius:7px; background:rgba(250,252,255,.97); box-shadow:0 4px 11px rgba(35,72,117,.12); }
.home-inner-edit-controls > span { margin:0 2px; color:#8494a7; font-size:10px; }
.home-inner-edit-controls button { min-width:25px; height:22px; padding:0 5px; border:0; border-radius:4px; background:transparent; color:#65768a; cursor:pointer; font-size:10px; }
.home-inner-edit-controls button.active { background:#dfeeff; color:#1769d2; font-weight:700; }
.home-inner-edit-controls .home-inner-drag-handle { min-width:26px; height:22px; background:#e7f1fd; color:#2865ad; cursor:move; font-size:16px; }
.home-inner-edit-controls .home-inner-drag-handle.active { background:#1769d2; color:#fff; box-shadow:0 0 0 2px rgba(23,105,210,.18); }
.is-inner-editing .home-inner-common-card,
.is-inner-editing .home-inner-app-card { outline:1px dashed #a9c6e8; outline-offset:-1px; }
.is-inner-editing .home-inner-common-card.is-pointer-target:hover,
.is-inner-editing .home-inner-app-card.is-pointer-target:hover { outline:2px solid #5c9de2; outline-offset:2px; background:#edf6ff; }
.is-inner-editing .home-common-item,
.is-inner-editing .home-app-item { padding-bottom:38px; cursor:default; }

/* 二期：沿用兵工厂的低饱和语义色，颜色用于识别和状态，不改变首页的轻量底色。 */
.workbench-home {
  --home-info:#1677ff; --home-info-bg:#e6f4ff; --home-success:#4f9a62; --home-success-bg:#f0f9eb;
  --home-warning:#a16b2b; --home-warning-bg:#fff7e8; --home-danger:#d9534f; --home-danger-bg:#fff1f0;
  --home-ai:#722ed1; --home-ai-bg:#f9f0ff; --home-cyan:#08979c; --home-cyan-bg:#e6fffb;
}
.home-dashboard-item.card-today_work .home-layout-card-shell { border-top:3px solid rgba(161,107,43,.62); }
.home-dashboard-item.card-my_todos .home-layout-card-shell { border-top:3px solid rgba(22,119,255,.62); }
.home-dashboard-item.card-common_workbench .home-layout-card-shell { border-top:3px solid rgba(79,154,98,.58); }
.home-dashboard-item.card-battle_followups .home-layout-card-shell { border-top:3px solid rgba(161,107,43,.58); }
.home-dashboard-item.card-business_board .home-layout-card-shell { border-top:3px solid rgba(8,151,156,.54); }
.home-dashboard-item.card-all_apps .home-layout-card-shell { border-top:3px solid rgba(114,46,209,.54); }
.home-factory-department { display:grid; gap:12px; margin:0 0 14px; }
.home-factory-panel { padding:14px; border:1px solid #e4eaf1; border-radius:10px; background:#fbfcfe; }
.home-factory-panel.operations { border-left:3px solid #d79035; }
.home-factory-panel h2 { margin:0; font-size:15px; color:#263242; }.home-factory-panel p { margin:4px 0 0; color:#7d8b9a; font-size:12px; }
.home-factory-goal-grid,.home-factory-status-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
.home-factory-status-grid.home-new-product-progress { grid-template-columns:repeat(6,minmax(0,1fr)); }
.home-factory-goal-grid button,.home-factory-status-grid button,.home-factory-distribution button,.home-factory-total { border:1px solid #e0e8f1; border-radius:8px; background:#fff; color:#526274; cursor:pointer; padding:9px; text-align:left; }
.home-factory-goal-grid button:hover,.home-factory-status-grid button:hover,.home-factory-distribution button:hover,.home-factory-total:hover { border-color:#8fb7e7; background:#f5faff; }.home-factory-goal-grid b,.home-factory-status-grid b { display:block; color:#1c5da6; font-size:20px; line-height:1.2; }.home-factory-goal-grid span,.home-factory-status-grid span { display:block; margin-top:4px; font-size:12px; }
.home-factory-status-grid button.is-today-metric { border-color:#cfe2f7; background:#f3f8fe; }
.home-factory-status-grid button.is-today-metric b { color:#e5484d; }
.battle-quick-column-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.battle-quick-column-bar > span { color:#7a899a; font-size:12px; }
.battle-quick-column-settings { display:grid; gap:7px; }
.battle-quick-column-settings > div { display:flex; min-height:38px; align-items:center; justify-content:space-between; gap:12px; padding:5px 8px; border:1px solid #e7ecf2; border-radius:7px; }
.battle-quick-column-settings > div > span { display:flex; align-items:center; gap:4px; }
.battle-quick-column-settings small { color:#93a0af; white-space:nowrap; }
.battle-quick-modal .el-table__header th.el-table__cell { position:relative; }
.battle-quick-modal .el-table__header th.el-table__cell::after { position:absolute; top:7px; right:-2px; bottom:7px; width:5px; border-radius:3px; background:#cfd8e4; content:""; cursor:col-resize; opacity:.7; }
.battle-quick-modal .el-table__header th.el-table__cell:hover::after { background:#409eff; opacity:1; }
.home-battle-filter-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.home-battle-filter-actions .el-select { width:150px; }
.home-factory-distribution { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; color:#8b98a7; font-size:12px; }.home-factory-distribution button { padding:5px 8px; }.home-factory-distribution b { margin-left:3px; color:#2865ad; }.home-factory-total { white-space:nowrap; color:#2865ad; }
.home-factory-filter-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.home-goal-effective { display:flex; flex-direction:column; gap:6px; margin-top:8px; padding:12px; border-radius:9px; background:#f5f8fc; color:#69798c; line-height:1.6; }
.home-goal-effective strong { color:#2e4057; }
.home-goal-field-tip { display:block; margin-top:6px; color:#7d8b9a; line-height:1.5; }
.home-radar-board-section .home-radar-board { margin:0; }
.home-radar-board { height:100%; }
.home-radar-range { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.home-radar-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-top:16px; }
.home-radar-metrics button { min-height:96px; padding:14px; border:1px solid #e2eaf3; border-radius:11px; background:#fbfdff; text-align:left; cursor:pointer; transition:.18s ease; }
.home-radar-metrics button:hover { transform:translateY(-2px); border-color:#9cbfe8; box-shadow:0 7px 16px rgba(44,91,145,.1); }
.home-radar-metrics b { display:block; font-size:24px; color:#245fa7; }.home-radar-metrics span { display:block; margin-top:7px; color:#68798b; font-size:13px; }
.home-radar-metrics .tone-orange b { color:#ce7318; }.home-radar-metrics .tone-purple b { color:#7151bd; }.home-radar-metrics .tone-cyan b { color:#178ca2; }.home-radar-metrics .tone-green b { color:#37865a; }
@media (max-width:1180px) { .home-factory-status-grid.home-new-product-progress { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:900px) { .home-factory-status-grid.home-new-product-progress { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:760px) { .home-factory-goal-grid,.home-factory-status-grid,.home-factory-status-grid.home-new-product-progress { grid-template-columns:repeat(2,minmax(0,1fr)); } .home-battle-filter-actions { align-items:flex-end; flex-direction:column; } }
@media (max-width:900px) { .home-radar-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.home-radar-range { justify-content:flex-start; } }
@media (max-width:600px) {
  .home-visibility-recovery { right:12px; bottom:12px; min-height:36px; padding:7px 11px; }
  .home-layout-load-error { align-items:flex-start; flex-direction:column; }
}
.home-primary-size-controls { display:flex; align-items:center; gap:2px; padding-left:5px; border-left:1px solid #d6e2f0; }
.home-primary-size-controls button { min-width:23px; height:21px; padding:0 4px; border:0; border-radius:4px; background:transparent; color:#65768a; cursor:pointer; font-size:10px; }
.home-primary-size-controls button.active { background:#dfeeff; color:#1769d2; font-weight:700; }
.home-layout-card-toolbar { right:auto; }
.home-layout-card-toolbar strong { max-width:148px; }
.home-content-setting { color:#527aa7 !important; }
.home-module-title-row { display:grid; grid-template-columns:122px minmax(0,1fr); align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid #f0f2f5; color:#596574; font-size:12px; }
.home-module-title-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:12px; }
.home-common-setting-list { display:flex; flex-direction:column; gap:13px; }
.home-common-setting-list .el-checkbox { margin-right:0; color:#364152; }
.tone-dot { display:inline-block; width:8px; height:8px; margin-right:7px; border-radius:50%; }
.tone-dot.tone-orange { background:#d16d07; }.tone-dot.tone-green { background:#43835a; }.tone-dot.tone-blue { background:#246bc0; }.tone-dot.tone-purple { background:#722ed1; }.tone-dot.tone-red { background:#de4c51; }.tone-dot.tone-cyan { background:#08979c; }

/* 今日工作的欢迎区固定，五个任务指标使用同一 InnerCardLayout 自由排序和尺寸。 */
.today-overview { grid-template-columns:minmax(270px,2.1fr) minmax(0,5fr); margin-bottom:0; }
.home-today-metric-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:12px; min-width:0; }
.home-inner-metric-card { position:relative; min-width:0; min-height:112px; }
.home-inner-metric-card.size-small { grid-column:span 2; }.home-inner-metric-card.size-medium { grid-column:span 4; }.home-inner-metric-card.size-large { grid-column:span 5; }
.home-inner-metric-card .home-metric-card { width:100%; height:100%; min-height:112px; }
.home-inner-metric-card.size-small .home-metric-card { flex-direction:column; justify-content:center; gap:7px; padding:11px; text-align:center; }
.home-inner-metric-card.size-small .home-metric-icon { width:40px; height:40px; }.home-inner-metric-card.size-small .home-metric-icon .home-svg { width:24px; height:24px; }
.home-inner-metric-card.size-large .home-metric-card { padding:20px; }
.home-inner-metric-card .home-inner-edit-controls { right:2px; bottom:2px; left:2px; gap:1px; justify-content:center; }
.home-inner-metric-card .home-inner-edit-controls > span { display:none; }
.home-inner-metric-card .home-inner-edit-controls button { min-width:20px; padding:0 3px; }
.home-inner-metric-card .home-inner-edit-controls .home-inner-drag-handle { min-width:22px; }
.is-inner-editing .home-inner-metric-card { outline:1px dashed #a9c6e8; outline-offset:-1px; }
.home-inner-common-card.is-dragging,.home-inner-app-card.is-dragging,.home-inner-metric-card.is-dragging { opacity:.62; transform:scale(.98); }
.home-inner-common-card.is-drop-target,.home-inner-app-card.is-drop-target,.home-inner-metric-card.is-drop-target { outline:2px solid #5c9de2; outline-offset:2px; background:#edf6ff; }
.home-inner-drag-handle { cursor:grab !important; touch-action:none; }.home-inner-drag-handle:active { cursor:grabbing !important; }

/* 应用和快捷入口采用兵工厂同源浅色卡片，不再只是白底加彩色图标。 */
.home-common-item.tone-orange,.home-app-item.tone-orange { border-color:#f0d8bd; background:#fffaf3; }.home-common-item.tone-green,.home-app-item.tone-green { border-color:#d4e7d9; background:#f7fcf8; }.home-common-item.tone-blue,.home-app-item.tone-blue { border-color:#d4e3f5; background:#f7fbff; }.home-common-item.tone-purple,.home-app-item.tone-purple { border-color:#e3d6f5; background:#fbf9ff; }.home-common-item.tone-red,.home-app-item.tone-red { border-color:#f2d8d9; background:#fff9f9; }.home-common-item.tone-cyan,.home-app-item.tone-cyan { border-color:#d3ebeb; background:#f6fcfc; }
.home-app-item.tone-orange:hover:not(.is-planning),.home-common-item.tone-orange:hover { border-color:#dca766; background:#fff6ea; }.home-app-item.tone-green:hover:not(.is-planning),.home-common-item.tone-green:hover { border-color:#9bc6a6; background:#f1faf3; }.home-app-item.tone-blue:hover:not(.is-planning),.home-common-item.tone-blue:hover { border-color:#9fc1ec; background:#f1f7ff; }.home-app-item.tone-purple:hover:not(.is-planning),.home-common-item.tone-purple:hover { border-color:#c8afe9; background:#f7f2ff; }.home-app-item.tone-red:hover:not(.is-planning),.home-common-item.tone-red:hover { border-color:#e9aaaa; background:#fff3f3; }.home-app-item.tone-cyan:hover:not(.is-planning),.home-common-item.tone-cyan:hover { border-color:#98cdcf; background:#effafa; }
.home-app-item.tone-orange .home-app-icon { background:#fff1df; color:#d16d07; }.home-app-item.tone-green .home-app-icon { background:#eff8f1; color:#43835a; }.home-app-item.tone-blue .home-app-icon { background:#eef5fd; color:#246bc0; }.home-app-item.tone-purple .home-app-icon { background:#f3effb; color:#722ed1; }.home-app-item.tone-red .home-app-icon { background:#fff0f0; color:#de4c51; }.home-app-item.tone-cyan .home-app-icon { background:#edf8fa; color:#278196; }
.home-app-item.tone-purple.has-details { border-color:#dfd0f3; background:#faf7ff; }.home-app-item.tone-purple.has-details .home-app-icon { background:#f1eaff; color:#722ed1; }

.home-battle-mini-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; min-height:118px; }
.home-battle-mini-summary button { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:7px; padding:16px; border:1px solid #eadfd3; border-radius:10px; background:#fffdfa; color:#8b5a24; cursor:pointer; text-align:left; }
.home-battle-mini-summary button:hover { border-color:#d8b995; background:#fdf6ed; }.home-battle-mini-summary b { font-size:28px; line-height:1; }.home-battle-mini-summary span { color:#8d8277; font-size:12px; }
.battle-size-medium .home-battle-group + .home-battle-group { margin-top:13px; padding-top:13px; }.battle-size-medium .battle-card-item:nth-child(n+3) { display:none; }

@container homecard (max-width: 860px) {
  .today-overview { grid-template-columns:1fr; }.home-today-metric-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }.home-inner-metric-card.size-small { grid-column:span 2; }.home-inner-metric-card.size-medium { grid-column:span 3; }.home-inner-metric-card.size-large { grid-column:span 6; }
}

@container homecard (max-width: 760px) {
  .today-overview { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .today-welcome { grid-column:1 / -1; }
  .home-task-flow { display:none; }
  .home-todo-item { grid-template-columns:44px minmax(0,1fr) 76px; }
  .home-inner-app-card.size-small { grid-column:span 2; }.home-inner-app-card.size-medium { grid-column:span 3; }.home-inner-app-card.size-large { grid-column:span 6; }
  .workbench-home .home-business-section > .home-business-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container homecard (max-height: 330px) {
  .today-welcome p { display:none; }
  .home-todo-list { overflow:auto; }
  .home-battle-group + .home-battle-group { margin-top:12px; padding-top:12px; }
  .home-business-card { min-height:68px; }
}
@media (max-width: 980px) {
  .home-layout-commandbar { align-items:flex-start; flex-direction:column; }
  .home-layout-commandbar > div:last-child { align-self:flex-end; }
  .home-inner-common-card.size-small { grid-column:span 2; }
  .home-inner-common-card.size-medium { grid-column:span 3; }
  .home-inner-common-card.size-large { grid-column:span 6; }
  .home-inner-app-card.size-small { grid-column:span 2; }
  .home-inner-app-card.size-medium { grid-column:span 3; }
  .home-inner-app-card.size-large { grid-column:span 6; }
  .home-today-metric-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .home-layout-commandbar span { white-space:normal; }
  .home-inner-common-card.size-small,
  .home-inner-common-card.size-medium,
  .home-inner-common-card.size-large,
  .home-inner-app-card.size-small,
  .home-inner-app-card.size-medium,
  .home-inner-app-card.size-large { grid-column:1 / -1; }
  .home-today-metric-grid { grid-template-columns:1fr; }.home-inner-metric-card.size-small,.home-inner-metric-card.size-medium,.home-inner-metric-card.size-large { grid-column:1 / -1; }.home-battle-mini-summary { grid-template-columns:1fr; }.home-module-title-row { grid-template-columns:1fr; gap:5px; }
}

@container homecard (max-width: 560px) {
  .home-common-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .home-inner-common-card.size-small,
  .home-inner-common-card.size-medium,
  .home-inner-common-card.size-large { grid-column:span 6; }
  .home-inner-app-card.size-small { grid-column:span 3; }
  .home-inner-app-card.size-medium { grid-column:span 6; }
  .home-inner-app-card.size-large { grid-column:span 12; }
  .workbench-home .home-business-section > .home-business-grid { grid-template-columns:1fr; }
}

/* 覆盖早期断点：中等宽度仍保持欢迎区与指标同排，避免编辑控件被父卡片裁切。 */
.home-dashboard-item.card-today_work .today-overview { grid-template-columns:minmax(220px,1.35fr) minmax(0,3fr); }
.home-dashboard-item.card-today_work .today-welcome { grid-column:auto; }
@container homecard (min-width: 561px) and (max-width: 860px) {
  .today-overview { grid-template-columns:minmax(220px,1.35fr) minmax(0,3fr); }
  .home-today-metric-grid { grid-template-columns:repeat(12,minmax(0,1fr)); }
  .home-inner-metric-card.size-small { grid-column:span 2; }.home-inner-metric-card.size-medium { grid-column:span 4; }.home-inner-metric-card.size-large { grid-column:span 5; }
}
@container homecard (max-width: 560px) {
  .home-dashboard-item.card-today_work .today-overview { grid-template-columns:minmax(180px,1.35fr) minmax(0,3fr); overflow:hidden; }
  .today-welcome { flex-direction:column; flex-wrap:nowrap; align-items:flex-start; justify-content:center; gap:6px; padding:12px 14px; }
  .today-welcome-line { width:3px; height:42px; }
  .today-welcome h1 { margin-bottom:2px; font-size:20px; }
  .today-welcome p { display:none; }
  .home-today-add-todo { margin-left:0; padding:5px 8px; }
  .home-today-metric-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px; }
  .home-inner-metric-card.size-small,.home-inner-metric-card.size-medium,.home-inner-metric-card.size-large { grid-column:span 1; min-height:92px; }
  .home-inner-metric-card.size-small .home-metric-card { gap:4px; padding:6px 2px; }
  .home-inner-metric-card.size-small .home-metric-icon { width:30px; height:30px; border-radius:8px; }
  .home-inner-metric-card.size-small .home-metric-icon .home-svg { width:18px; height:18px; }
  .home-inner-metric-card.size-small .home-metric-copy > span { margin-bottom:4px; font-size:11px; line-height:1.2; white-space:normal; text-align:center; }
  .home-inner-metric-card.size-small .home-metric-copy b { font-size:22px; }
  .home-today-add-todo { padding:6px 9px; }
}

/* 战场单卡保留既有2/3/6跨度，避免“全部应用”本轮缩小影响已保存的战场布局。 */
.home-battle-followups .battle-card-grid { grid-template-columns:repeat(var(--home-standard-card-columns),minmax(0,1fr)); gap:var(--home-standard-card-gap); }
.home-battle-followups .battle-card { min-width:0; min-height:0; }
.home-battle-followups .battle-card.size-small { grid-column:span var(--home-standard-card-small-span); min-height:var(--home-standard-card-small-height); }
.home-battle-followups .battle-card.size-medium { grid-column:span var(--home-standard-card-medium-span); min-height:var(--home-standard-card-medium-height); }
.home-battle-followups .battle-card.size-large { grid-column:span var(--home-standard-card-large-span); min-height:var(--home-standard-card-large-height); }
.home-battle-followups .battle-card.size-small,
.home-battle-followups .battle-card.size-medium { gap:9px; padding:10px 6px; }
.home-battle-followups .battle-card.size-large { gap:9px; padding:20px 22px; }
.home-battle-followups .battle-card.size-large > header { align-items:flex-start; }
.home-battle-followups .battle-card.size-large .battle-card-facts { grid-template-columns:repeat(3,minmax(0,1fr)); }
.home-battle-followups .battle-card.size-medium .battle-card-progress { min-height:36px; }
.home-battle-followups .battle-card.size-small h3 { font-size:14px; }
.home-battle-followups .battle-card.size-small .battle-card-kind { margin-bottom:2px; }
.home-battle-followups .battle-card.size-small .battle-card-deadline { padding:5px 7px; font-size:11px; }
.home-battle-followups .battle-card.size-small .battle-card-facts { display:flex; flex-wrap:wrap; gap:5px 10px; }
.home-battle-followups .battle-card.size-small .battle-card-facts span { width:auto; max-width:100%; }
.home-battle-followups .battle-card.size-small .battle-card-facts b { display:inline; margin:0 3px 0 0; }
.home-battle-followups .battle-card.size-small > footer { padding-top:7px; }
.home-battle-followups .battle-card.size-large > footer.battle-card-actions { grid-template-columns:minmax(92px,1.35fr) repeat(5,minmax(0,1fr)); }
.home-battle-followups .battle-card.size-medium > footer.battle-card-actions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
.home-battle-followups .battle-card.size-small > footer.battle-card-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.home-battle-followups .battle-card.size-large .battle-card-action { font-size:13px; }
.home-battle-followups .battle-card.size-medium .battle-card-action { min-height:34px; padding:5px 6px; font-size:12px; }
.home-battle-followups .battle-card.size-small .battle-card-action { min-height:32px; padding:4px; font-size:12px; }
.home-battle-followups .battle-card:hover { cursor:pointer; }
.battle-card-layout-controls { position:absolute; z-index:8; top:7px; right:7px; display:flex; align-items:center; gap:2px; min-height:27px; padding:3px; border:1px solid #c8d7e9; border-radius:7px; background:rgba(250,252,255,.97); box-shadow:0 4px 11px rgba(35,72,117,.12); }
.battle-card-layout-controls > span { margin:0 2px; color:#8494a7; font-size:10px; }
.battle-card-layout-controls button { min-width:23px; height:21px; padding:0 4px; border:0; border-radius:4px; background:transparent; color:#65768a; cursor:pointer; font-size:10px; }
.battle-card-layout-controls button.active { background:#dfeeff; color:#1769d2; font-weight:700; }
.battle-card-layout-controls .battle-card-drag-handle { min-width:25px; background:#e7f1fd; color:#2865ad; cursor:grab; font-size:16px; }
.battle-card-layout-controls .battle-card-drag-handle:active { cursor:grabbing; }
.is-battle-layout-editing .battle-card { padding-top:47px; outline:1px dashed #a9c6e8; outline-offset:-1px; cursor:default; }
.is-battle-layout-editing .battle-card.is-dragging { opacity:.62; transform:scale(.98); }
.is-battle-layout-editing .battle-card.is-drop-target { outline:2px solid #5c9de2; outline-offset:2px; background:#edf6ff; }
@container homecard (max-width: 860px) {
  .home-battle-followups .battle-card.size-small { grid-column:span 4; }
  .home-battle-followups .battle-card.size-medium { grid-column:span 6; }
  .home-battle-followups .battle-card.size-large { grid-column:span 12; }
}
@media (max-width: 980px) {
  .home-battle-followups .battle-card.size-small { grid-column:span 4; }
  .home-battle-followups .battle-card.size-medium { grid-column:span 6; }
  .home-battle-followups .battle-card.size-large { grid-column:span 12; }
}
@container homecard (max-width: 560px) {
  .home-battle-followups .battle-card.size-large,
  .home-battle-followups .battle-card.size-medium,
  .home-battle-followups .battle-card.size-small { grid-column:span 12; }
}
@media (max-width: 560px) {
  .home-battle-followups .battle-card.size-small,
  .home-battle-followups .battle-card.size-medium,
  .home-battle-followups .battle-card.size-large { grid-column:1 / -1; }
}
.home-procurement-board{padding:22px}.home-procurement-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.home-procurement-metrics button{min-height:112px;padding:18px;text-align:left;border:1px solid #eadfce;border-radius:18px;background:#fff;box-shadow:0 8px 22px rgba(119,79,34,.05);cursor:pointer}.home-procurement-metrics button:hover{border-color:#c99455;transform:translateY(-1px)}.home-procurement-metrics span{display:block;color:#8c8276;font-size:15px}.home-procurement-metrics b{display:block;margin-top:18px;color:#995d1f;font-size:34px}.home-procurement-metrics button:nth-child(3) b,.home-procurement-metrics button:nth-child(8) b{color:#3f915b}.home-procurement-metrics button:nth-child(9) b{color:#d94758}@media(max-width:900px){.home-procurement-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.home-procurement-board{padding:14px}.home-procurement-metrics button{min-height:94px}}
