/* 有问题找谁（app/issues.py）。颜色只用 tokens.css 的变量（UI 门禁）。 */
[hidden] { display: none !important; }
body { background: var(--canvas); }
.is-app { max-width: 1280px; margin: 0 auto; padding: 18px 16px 72px; color: var(--ink); }
.is-head h1 { margin: 0 0 6px; font-size: 22px; }
.is-head p { margin: 0; max-width: 820px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.is-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.is-btn { white-space: nowrap; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm);
  padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit; line-height: 1.4; display: inline-flex; align-items: center; gap: 4px; }
.is-btn:hover { background: var(--surface-hover); }
.is-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.is-btn.primary:hover { background: var(--accent-hover); }
.is-btn.danger { color: var(--danger-fg); }
.is-btn.small { padding: 3px 9px; font-size: 12px; }
.is-btn:disabled { opacity: .55; cursor: default; }
.is-grow { flex: 1; }

/* 写问题 */
.is-ask { margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; box-shadow: var(--shadow-1); }
.is-ask textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 9px 10px;
  font: inherit; font-size: 15px; line-height: 1.6; resize: vertical; min-height: 72px; background: var(--surface); color: var(--ink); }
.is-ask textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 0; }
.is-ask-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.is-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.is-thumb { position: relative; width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-sunken); }
.is-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.is-thumb button { position: absolute; top: 0; right: 0; border: 0; background: var(--overlay); color: var(--text-on-accent); font-size: 11px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.is-thumb.up::after { content: "传…"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; background: var(--overlay); color: var(--text-on-accent); }

/* 建议找谁 */
.is-sug { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 12px; }
.is-sug-row { display: flex; gap: 8px 12px; align-items: baseline; flex-wrap: wrap; margin: 6px 0; font-size: 14px; }
.is-sug-row > b { flex: none; width: 76px; color: var(--text-secondary); font-weight: normal; font-size: 13px; }
.is-sug-row .is-grow { min-width: 0; }
.is-title-in { flex: 1; min-width: 220px; border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 5px 8px; font: inherit; font-size: 14px; }
.is-who { display: flex; gap: 6px; flex-wrap: wrap; }
.is-who button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-full); padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.is-who button.on { background: var(--accent-soft-bg); border-color: var(--accent); color: var(--accent-soft-fg); font-weight: 600; }
.is-who input { border: 1px solid var(--border-control); border-radius: var(--radius-full); padding: 4px 12px; font: inherit; font-size: 14px; width: 150px; }
.is-why { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.is-tip { margin: 8px 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--info-bg); border: 1px solid var(--info-border); font-size: 13px; line-height: 1.6; color: var(--ink); }
.is-tip.warn { background: var(--warning-bg); border-color: var(--warning-border); }
.is-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.is-seg button { border: 0; border-right: 1px solid var(--border); background: var(--surface); padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.is-seg button:last-child { border-right: 0; }
.is-seg button.on { background: var(--accent); color: var(--text-on-accent); }
.is-check { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; white-space: nowrap; cursor: pointer; }
.is-sim { list-style: none; margin: 4px 0 0; padding: 0; }
.is-sim li { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.is-sim li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-send-bar { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.is-send-bar small { color: var(--muted); font-size: 12px; }

/* 标签：问题 / 分工 */
.is-tabs { display: flex; gap: 4px; margin: 18px 0 0; border-bottom: 1px solid var(--border); }
.is-tabs button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.is-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* 列表 */
.is-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.is-filters input[type="search"] { border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 5px 9px; font: inherit; font-size: 13px; width: 220px; }
.is-at { color: var(--muted); font-size: 12px; margin-left: auto; }
.is-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 13px; table-layout: fixed; }
.is-table th { position: sticky; top: 0; z-index: 2; background: var(--surface-sunken); text-align: left; font-weight: 600; color: var(--text-secondary); padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.is-table th:first-child { border-top-left-radius: var(--radius-md); }
.is-table th:last-child { border-top-right-radius: var(--radius-md); }
.is-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.is-table tbody tr { cursor: pointer; }
.is-table tbody tr:hover td { background: var(--surface-hover); }
.is-table tbody tr.sel td { background: var(--surface-selected); }
.is-table th:nth-child(1) { width: 58px; } .is-table th:nth-child(3) { width: 130px; } .is-table th:nth-child(4) { width: 120px; }
.is-table th:nth-child(5) { width: 110px; } .is-table th:nth-child(6) { width: 80px; } .is-table th:nth-child(7) { width: 96px; }
.is-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.is-t-title { font-weight: 500; }
.is-tag { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 5px; border-radius: var(--radius-sm); margin-right: 4px; vertical-align: 1px; white-space: nowrap; }
.is-tag.urgent { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-border); }
.is-tag.company { background: var(--accent-soft-bg); color: var(--accent-soft-fg); border: 1px solid var(--accent-soft-border); }
.is-tag.private { background: var(--surface-sunken); color: var(--text-secondary); border: 1px solid var(--border); }
.is-tag.plus { background: var(--warning-bg); color: var(--warning-fg); border: 1px solid var(--warning-border); }
.is-late { color: var(--danger-fg); font-weight: 600; }

/* 分工 */
.is-duty-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin: 10px 0; flex-wrap: wrap; }
.is-duty-head p { flex: 1; min-width: 240px; }
.is-duty-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.is-duty { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.is-duty.off { opacity: .55; }
.is-duty h4 { margin: 0 0 4px; font-size: 15px; display: flex; gap: 6px; align-items: center; }
.is-duty h4 .is-grow { flex: 1; }
.is-duty .k { color: var(--text-secondary); }
.is-duty .people b { font-weight: 600; }
.is-duty .covers { color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-duty .basis { color: var(--muted); font-size: 12px; }

/* 右边详情 */
.is-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-3); z-index: 40; display: flex; flex-direction: column; }
.is-panel-top { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.is-panel-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.is-panel-title small { display: block; font-weight: normal; color: var(--muted); font-size: 12px; margin-top: 2px; }
.is-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface-sunken); }
.is-actions:empty { display: none; }
.is-panel-body { flex: 1; overflow: auto; padding: 12px 14px; font-size: 14px; line-height: 1.7; }
.is-panel-body h5 { margin: 14px 0 6px; font-size: 13px; color: var(--text-secondary); }
.is-meta { display: grid; grid-template-columns: 84px 1fr; gap: 3px 8px; font-size: 13px; }
.is-meta > span:nth-child(odd) { color: var(--text-secondary); }
.is-text { white-space: pre-wrap; word-break: break-word; background: var(--surface-sunken); border-radius: var(--radius-sm); padding: 8px 10px; }
.is-result { white-space: pre-wrap; word-break: break-word; background: var(--success-bg); border: 1px solid var(--success-border); border-radius: var(--radius-sm); padding: 8px 10px; }
.is-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.is-photos a { width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); display: block; }
.is-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.is-flow { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.is-flow li { position: relative; padding: 2px 0 10px 8px; font-size: 13px; }
.is-flow li::before { content: ""; position: absolute; left: -20px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.is-flow li.k-create::before, .is-flow li.k-transfer::before, .is-flow li.k-escalate::before, .is-flow li.k-auto::before { border-color: var(--accent); }
.is-flow li.k-resolve::before, .is-flow li.k-ai_done::before { border-color: var(--success-fg); background: var(--success-fg); }
.is-flow li.k-remind::before, .is-flow li.k-nudge::before { border-color: var(--warning-fg); }
.is-flow li.k-ai_reply::before { border-color: var(--accent); }
.is-flow .at { color: var(--muted); font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.is-flow .note { display: block; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.is-reply { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.is-reply textarea { flex: 1; border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 7px 9px; font: inherit; font-size: 16px; line-height: 1.5; resize: none; }

/* 弹窗 */
.is-modal { position: fixed; inset: 0; background: var(--overlay); z-index: 60; display: grid; place-items: center; padding: 16px; }
.is-modal-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-3); }
.is-modal-box h3 { margin: 0 0 10px; font-size: 17px; }
.is-modal-box label.f { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--text-secondary); }
.is-modal-box input[type="text"], .is-modal-box textarea, .is-modal-box input[list], .is-modal-box input[type="number"] {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 7px 9px; font: inherit; font-size: 15px; }
.is-modal-box textarea { resize: vertical; line-height: 1.6; }
.is-modal-bar { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.is-pickers { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.is-pickers button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-full); padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.is-pickers button.on { background: var(--accent-soft-bg); border-color: var(--accent); color: var(--accent-soft-fg); }

/* 提示条 */
.is-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 80;
  background: var(--n-800); color: var(--text-on-accent); padding: 9px 16px; border-radius: var(--radius-md); font-size: 14px; box-shadow: var(--shadow-2);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); max-width: calc(100vw - 32px); }
.is-toast.show { opacity: 1; transform: translate(-50%, 0); }
.is-toast.bad { background: var(--danger-solid); }
.is-sug-row select { border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 5px 8px; font: inherit; font-size: 14px; background: var(--surface); }

@media (max-width: 640px) {
  .is-app { padding: 12px 10px 72px; }
  .is-table th:nth-child(3), .is-table td:nth-child(3), .is-table th:nth-child(6), .is-table td:nth-child(6),
  .is-table th:nth-child(7), .is-table td:nth-child(7) { display: none; }
  .is-filters input[type="search"] { width: 100%; }
  .is-sug-row > b { width: 100%; }
  .is-ask textarea, .is-title-in, .is-who input, .is-filters input[type="search"] { font-size: 16px; }
}
