:root {
  --orange: #FF6B35;
  --orange-soft: #fff1ea;
  --ink: #1f2329;
  --muted: #8a9099;
  --line: #ececf0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink); background: #f6f7f9; }
body { display: flex; flex-direction: column; width: 100%; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--orange); color: #fff; }
.logo { font-weight: 700; font-size: 15px; }
.ctx { font-size: 11px; opacity: .9; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); }
.tab { flex: 1; border: 0; background: none; padding: 10px 0; font-size: 13px; color: var(--muted); }
.tab.active { color: var(--orange); font-weight: 700; box-shadow: inset 0 -2px 0 var(--orange); }

main { flex: 1; overflow-y: auto; padding: 12px; }
.panel { display: none; flex-direction: column; gap: 8px; }
.panel.active { display: flex; }

label { font-size: 12px; color: var(--muted); margin-top: 4px; }
textarea, input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 14px; font-family: inherit; resize: vertical; background: #fff; }
textarea { min-height: 90px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
button { border: 0; border-radius: 8px; padding: 10px 14px; font-size: 14px; cursor: pointer; }
button.primary { background: var(--orange); color: #fff; font-weight: 600; }
.portal-link { display: inline-block; margin-top: 10px; padding: 9px 12px; background: var(--orange-soft); color: var(--orange); border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; }
button.ghost { background: var(--orange-soft); color: var(--orange); align-self: flex-start; }
.row button { background: var(--orange); color: #fff; flex: 0 0 auto; }
.out { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; min-height: 60px; }
.out.mini { padding: 8px 10px; font-size: 12px; min-height: 0; color: var(--muted); background: var(--orange-soft); border-color: #ffd9c7; }
.out.mini.ok { color: #1a7f37; background: #e8f7ee; border-color: #b6e3c6; }
.out.mini.warn { color: #b26a00; background: #fff6e6; border-color: #ffe0a3; }
.list { display: flex; flex-direction: column; gap: 8px; }
.job { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.job h4 { margin: 0 0 4px; font-size: 14px; }
.job .meta { font-size: 12px; color: var(--muted); line-height: 1.5; }
.job .salary { color: var(--orange); font-weight: 700; }

.history-box { background: var(--orange-soft); border: 1px solid #ffd9c7; border-radius: 10px; padding: 10px 12px; }
.history-box.warn { background: #fff6e6; border-color: #ffe0a3; }
.hist-head { font-size: 12px; color: var(--orange); font-weight: 600; margin-bottom: 6px; }
.hist-head b { font-size: 14px; }
.history-box details summary { font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.history-box details[open] summary { margin-bottom: 6px; }
.history-box .tip { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 0 0 6px; }
.history-box textarea { min-height: 70px; font-size: 13px; margin-bottom: 8px; }

.diag { padding: 8px 12px 14px; background: #fafbfc; border-top: 1px solid var(--line); }
.diag summary { font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.diag .tip { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 6px 0; }
.diag .row input { font-size: 12px; padding: 8px; }

/* 轻量提示：替代原生 alert，避免企微客户端弹出占满侧边栏的系统对话框 */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(8px);
  max-width: 80%; padding: 8px 16px; border-radius: 6px;
  background: rgba(38, 40, 44, .92); color: #fff;
  font-size: 13px; line-height: 1.5; text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  pointer-events: none; opacity: 0; z-index: 9999;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

