:root {
  --bg: #f2f4f8;
  --panel: #ffffff;
  --line: #e6eaf2;
  --line-soft: #eff2f7;
  --text: #101828;
  --text-2: #344054;
  --muted: #7b8794;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #eef4ff;
  --ok: #0f9d58;
  --ok-soft: #e8f7ef;
  --warn: #d97706;
  --warn-soft: #fff7e6;
  --bad: #dc2626;
  --bad-soft: #fef1f1;
  --dev: #7c3aed;
  --dev-soft: #f3ecff;
  --ops: #0d9488;
  --ops-soft: #e6f7f5;
  --data: #ea580c;
  --data-soft: #fff1e8;
  --admin: #4f46e5;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-2: 0 4px 12px rgba(16, 24, 40, .06), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-3: 0 12px 32px rgba(16, 24, 40, .10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

/* ============ 登录页 ============ */

.login-body {
  min-height: 100vh;
  display: flex;
  background:
    radial-gradient(1200px 600px at 12% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 500px at 105% 10%, #ede9fe 0%, transparent 50%),
    #f7f9fd;
  padding: 40px 24px;
}

.login-wrap {
  width: 100%;
  max-width: 920px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--panel);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .10);
  overflow: hidden;
}

.login-side {
  padding: 44px 40px;
  background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.login-side .mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; margin-bottom: 26px;
}

.login-side h1 { font-size: 26px; margin: 0 0 10px; font-weight: 700; letter-spacing: .5px; }
.login-side p { margin: 0 0 30px; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.8; }

.login-feats { display: flex; flex-direction: column; gap: 16px; margin-top: auto; }
.login-feat { display: flex; gap: 12px; align-items: flex-start; }
.login-feat .dot {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.login-feat b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.login-feat span { font-size: 12px; color: rgba(255,255,255,.72); }

.login-card { padding: 44px 38px; display: flex; flex-direction: column; }

.tabs {
  display: flex; background: #f2f4f8; border-radius: 12px; padding: 4px; margin-bottom: 24px;
}
.tab {
  flex: 1; border: 0; background: transparent; padding: 10px 0; border-radius: 9px;
  font-size: 14px; color: var(--muted); cursor: pointer; font-family: inherit; font-weight: 500;
  transition: all .18s;
}
.tab.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: var(--shadow-1); }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 14px; font-family: inherit; background: #fafbfe; color: var(--text);
  transition: all .18s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft);
}
.field input::placeholder { color: #b3bcc9; }

.role-pick { display: flex; gap: 10px; }
.role-btn {
  flex: 1; padding: 14px 0; border: 1px solid var(--line); background: #fafbfe;
  border-radius: var(--r-md); font-size: 14px; font-family: inherit; color: var(--text-2);
  cursor: pointer; transition: all .18s; font-weight: 500;
}
.role-btn:hover { border-color: #c7d2e3; }
.role-btn.active {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.btn {
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  padding: 11px 18px; border-radius: var(--r-md); font-size: 14px; font-family: inherit;
  cursor: pointer; font-weight: 500; transition: all .16s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { border-color: #c7d2e3; background: #fbfcfe; }
.btn.primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb); border-color: var(--brand-2); color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .28);
}
.btn.primary:hover { background: linear-gradient(180deg, #2f74f0, #1d4ed8); }
.btn.primary:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn.block { width: 100%; margin-top: 6px; padding: 13px 18px; font-size: 15px; }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: #0b8a4b; }
.btn.danger { background: #fff; border-color: #f6c7c7; color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: #f2f4f8; }

.msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }

.admin-entry { text-align: center; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.link-btn {
  border: 0; background: transparent; color: var(--muted); font-size: 13px;
  cursor: pointer; text-decoration: none; font-family: inherit; padding: 4px 8px;
}
.link-btn:hover { color: var(--brand); }
.admin-tip { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }

@media (max-width: 820px) {
  .login-body { padding: 0; }
  .login-wrap { grid-template-columns: 1fr; border-radius: 0; min-height: 100vh; }
  .login-side { padding: 30px 26px 26px; }
  .login-side h1 { font-size: 21px; }
  .login-side p { margin-bottom: 0; }
  .login-feats { display: none; }
  .login-card { padding: 26px 22px 40px; }
}

/* ============ 主框架 ============ */

.shell { display: flex; min-height: 100vh; }

.side {
  width: 232px;
  flex: 0 0 232px;
  background: #0f172a;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.side .logo {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px 18px;
}
.side .logo .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff; flex: 0 0 34px;
}
.side .logo b { color: #fff; font-size: 14.5px; font-weight: 600; letter-spacing: .3px; }

.side .who {
  margin: 0 14px 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-md);
  font-size: 12.5px;
}
.side .who b { color: #fff; font-size: 13.5px; display: block; margin-bottom: 3px; }
.side .who .role {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(59,130,246,.22); color: #93c5fd; font-size: 11.5px; font-weight: 600;
}

.nav-group { padding: 6px 12px 0; }
.nav-title {
  font-size: 11px; color: #5a6b85; padding: 10px 10px 6px; letter-spacing: .8px; font-weight: 600;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 9px; color: #a9b6cc; text-decoration: none;
  font-size: 13.5px; cursor: pointer; border: 0; background: transparent; width: 100%;
  text-align: left; font-family: inherit; margin-bottom: 2px; transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #e2e8f0; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,.28), rgba(59,130,246,.10));
  color: #fff; font-weight: 600;
  box-shadow: inset 2px 0 0 #3b82f6;
}
.nav-item .ico { width: 18px; text-align: center; font-size: 14px; flex: 0 0 18px; }
.nav-item .count {
  margin-left: auto; background: #ef4444; color: #fff; border-radius: 999px;
  padding: 0 7px; font-size: 11px; font-weight: 600; line-height: 18px; min-width: 18px; text-align: center;
}

.side-foot { margin-top: auto; padding: 14px 12px 18px; }
.side-foot #logout-btn { color: #8896ab; width: 100%; justify-content: flex-start; }
.side-foot #logout-btn:hover { color: #fca5a5; background: rgba(220,38,38,.12); }

.main { flex: 1; padding: 26px 30px 60px; min-width: 0; }

.page-head { margin-bottom: 20px; }
.page-head h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* 统计卡片 */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px;
  border-radius: 50%; background: var(--brand-soft); opacity: .55;
}
.stat .n { font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -.5px; position: relative; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; position: relative; }
.stat .t { font-size: 11.5px; margin-top: 8px; position: relative; color: var(--brand); font-weight: 500; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow-1);
}
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

.empty {
  text-align: center; color: var(--muted); padding: 48px 16px; font-size: 13.5px;
  background: #fbfcfe; border: 1px dashed var(--line); border-radius: var(--r-md);
}
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* 筛选条（下拉框） */
.filter-select { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-select .sel-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.filter-select .sel {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fff; color: var(--text); font-size: 14px; font-family: inherit;
  cursor: pointer; min-width: 220px; transition: all .18s;
}
.filter-select .sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* 筛选条 */
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: #c7d2e3; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip .n { opacity: .75; margin-left: 3px; }

/* 待办卡片 */
.todo {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 15px 17px; margin-bottom: 11px; box-shadow: var(--shadow-1);
  transition: all .16s; position: relative; overflow: hidden;
}
.todo:hover { box-shadow: var(--shadow-2); border-color: #d6dfec; transform: translateY(-1px); }
.todo::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.todo.role-developer::before { background: var(--dev); }
.todo.role-operations::before { background: var(--ops); }
.todo.role-data::before { background: var(--data); }
.todo.done { opacity: .58; }
.todo.done::before { background: var(--ok); }

.todo .t-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.todo .t-icon {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--brand-soft);
}
.todo.role-developer .t-icon { background: var(--dev-soft); }
.todo.role-operations .t-icon { background: var(--ops-soft); }
.todo.role-data .t-icon { background: var(--data-soft); }
.todo .t-title { font-weight: 600; font-size: 14.5px; flex: 1; line-height: 1.5; }
.todo .t-detail { font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; margin: 0 0 8px 42px; line-height: 1.65; }
.todo .t-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-left: 42px; }
.todo .t-actions { margin: 11px 0 0 42px; display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
  background: #f2f4f8; color: var(--muted); font-weight: 500; white-space: nowrap;
}
.tag.role-developer { background: var(--dev-soft); color: var(--dev); }
.tag.role-operations { background: var(--ops-soft); color: var(--ops); }
.tag.role-data { background: var(--data-soft); color: var(--data); }
.tag.role-admin { background: #eef0ff; color: var(--admin); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 11px 10px; color: var(--muted); font-weight: 500;
  font-size: 12.5px; background: #f8fafd; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }

/* 聊天 */
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 58vh; overflow-y: auto; padding: 6px 4px; }
.bubble {
  max-width: 78%; padding: 11px 15px; border-radius: 14px; font-size: 14px;
  white-space: pre-wrap; line-height: 1.7; box-shadow: var(--shadow-1);
}
.bubble.me {
  align-self: flex-end; background: linear-gradient(180deg, #3b82f6, #2563eb); color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble.bot {
  align-self: flex-start; background: #fff; border: 1px solid var(--line); color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-input { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
.chat-input textarea {
  flex: 1; min-height: 48px; max-height: 150px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); font-family: inherit;
  font-size: 14px; resize: vertical; background: #fafbfe; transition: all .18s;
}
.chat-input textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }

/* 消息记录 */
.msg-layout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.msg-list { padding: 0; overflow: hidden; }
.msg-list .msg-row { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.msg-list .msg-row:last-child { border-bottom: 0; }
.msg-meta { display: flex; gap: 7px; align-items: center; margin-bottom: 7px; flex-wrap: wrap; }
.msg-text {
  font-size: 13.5px; color: var(--text-2); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
}
.attach-item {
  display: flex; align-items: center; gap: 11px;
  margin-top: 10px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fbfcfe; cursor: pointer; transition: all .15s;
}
.attach-item:hover { border-color: #b8c6dc; background: #f4f8ff; }
.attach-ico {
  width: 36px; height: 36px; border-radius: 9px; flex: 0 0 36px;
  background: var(--brand-soft); display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.attach-info { flex: 1; min-width: 0; }
.attach-name { font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.attach-open { font-size: 12px; color: var(--brand); flex: 0 0 auto; }

.msg-preview {
  position: sticky; top: 16px; min-height: 200px;
  display: flex; flex-direction: column;
}
.preview-empty, .preview-loading {
  color: var(--muted); font-size: 13px; text-align: center;
  padding: 40px 16px;
}
.preview-img-wrap {
  border-radius: var(--r-md); overflow: hidden; background: #f2f4f8;
  display: flex; align-items: center; justify-content: center;
}
.preview-img-wrap img { max-width: 100%; max-height: 60vh; display: block; }
.preview-detail { font-size: 12.5px; color: var(--muted); margin-top: 10px; text-align: center; }

@media (max-width: 820px) {
  .msg-layout { grid-template-columns: 1fr; }
  .msg-preview { position: static; }
}

/* 建议卡片 */
.sg-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.sg-item .sg-title { font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.sg-item .sg-detail { font-size: 13px; color: var(--text-2); margin-bottom: 9px; }

/* 手机适配 */
@media (max-width: 820px) {
  .shell { flex-direction: column; }

  .side {
    width: 100%; flex: none; height: auto; position: sticky; top: 0; z-index: 30;
    flex-direction: row; overflow-x: auto; overflow-y: hidden;
    padding: 8px 10px; gap: 4px; background: #0f172a;
  }
  .side .logo, .side .who, .nav-group .nav-title { display: none; }
  .nav-group { display: contents; }
  .nav-item {
    width: auto; flex: 0 0 auto; white-space: nowrap; padding: 8px 13px; font-size: 13px;
    margin-bottom: 0; gap: 6px;
  }
  .nav-item .ico { display: none; }
  .nav-item.active { box-shadow: none; background: #2563eb; }
  .side-foot { position: fixed; left: 12px; bottom: 14px; margin: 0; padding: 0; z-index: 200; }
  .side-foot #logout-btn {
    width: auto; background: #fff; color: var(--bad); border: 1px solid var(--line);
    border-radius: 999px; padding: 10px 16px; box-shadow: var(--shadow-3); font-size: 12.5px;
  }

  .main { padding: 18px 15px 70px; }
  .page-head h2 { font-size: 18px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .n { font-size: 21px; }
  .todo .t-detail, .todo .t-meta, .todo .t-actions { margin-left: 0; }
  .chat { max-height: 50vh; }
  .bubble { max-width: 88%; }
  .card { padding: 15px 16px; }
}

/* 附件大窗预览表格 */
.fp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fp-table th, .fp-table td { border: 1px solid #e2e8f0; padding: 6px 10px; text-align: left; }
.fp-table th { background: #f1f5f9; font-weight: 600; position: sticky; top: 0; }
.fp-table tr:nth-child(even) td { background: #f8fafc; }


/* 批次工作流 */
.wf-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:14px; }
.wf-card { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:16px; box-shadow:var(--shadow-1); }
.wf-card-head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.wf-code { font-size:15px; font-weight:700; color:var(--text); }
.wf-stage { border:1px solid; border-radius:999px; padding:4px 9px; font-size:12px; white-space:nowrap; }
.wf-steps { display:flex; align-items:center; gap:6px; margin:14px 0 11px; color:var(--muted); font-size:11.5px; }
.wf-step { border:1px solid var(--line); border-radius:999px; padding:4px 7px; white-space:nowrap; }
.wf-step.ok { color:#027a48; border-color:#abefc6; background:#ecfdf3; }
.wf-step.now { color:#175cd3; border-color:#b2ddff; background:#eff8ff; font-weight:600; }
.wf-metrics { display:flex; flex-wrap:wrap; gap:7px; font-size:12px; color:var(--muted); }
.wf-metrics span { background:#f8fafc; border-radius:6px; padding:4px 7px; }
.wf-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:14px; }
.wf-manage-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.wf-manage-item { text-align:left; display:flex; flex-direction:column; gap:5px; cursor:pointer; }
@media (max-width:820px) {
  .wf-grid { grid-template-columns:1fr; }
  .wf-steps { overflow-x:auto; }
}


/* 模板操作视觉规范：红色表示可修改，灰色表示只复制 */
.btn.edit-template { color:#b42318; border-color:#f1b4b4; background:#fff5f5; box-shadow:none; }
.btn.edit-template:hover { color:#912018; background:#fee4e2; border-color:#e58b8b; }
.btn.copy-template { color:#475467; border-color:#d0d5dd; background:#f2f4f7; box-shadow:none; }
.btn.copy-template:hover { color:#344054; background:#e4e7ec; border-color:#98a2b3; }

/* 批次工作流快捷区 */
.wf-toolbar { display:grid; grid-template-columns:minmax(200px,1fr) minmax(180px,240px); gap:10px 16px; align-items:center; border:1px solid #dbe7ff; background:linear-gradient(135deg,#f8fbff,#ffffff); }
.wf-toolbar-title { font-size:14px; font-weight:700; color:#1d2939; }
.wf-toolbar-sub { margin-top:4px; color:#667085; font-size:12px; line-height:1.6; }
.wf-batch-select { width:100%; min-height:34px; padding:7px 10px; border:1px solid #cfd8ea; border-radius:8px; background:#fff; color:#344054; }
.wf-toolbar-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.wf-toolbar-hint { grid-column:1/-1; font-size:12px; }
@media (max-width:820px) {
  .wf-toolbar { grid-template-columns:1fr; }
  .wf-toolbar-actions { grid-column:auto; }
}

.workflow-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; padding:18px 22px; }
.wf-delivery { grid-column:1/-1; border-top:1px solid var(--line); padding-top:12px; }
#wf-delivery-status { display:flex; gap:12px; align-items:center; flex-wrap:wrap; color:var(--text-2); }
#wf-todo-list .todo { margin:12px 0; }
.todo .t-detail { overflow-wrap:anywhere; }
.wf-card[hidden] { display:none; }
.wf-toolbar-actions .btn:disabled { opacity:.55; cursor:default; }
#wf-close { flex-shrink:0; }
@media(max-width:680px){.workflow-detail-grid { grid-template-columns:minmax(0,1fr); padding:14px; }}

.todo-context { font-size:12px; color:var(--text-2); margin:8px 0 8px 42px; }
.todo-context summary { cursor:pointer; color:var(--muted); }
.todo-context div { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; }
.btn:focus-visible, .wf-batch-select:focus-visible { outline:3px solid #85adf8; outline-offset:2px; }
