/* AI 도우미 창(shell/assistant.js) — 오른쪽, 열고 닫기. 색·글꼴은 @erp/ui-tokens 변수로만 */
.ai-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 9000;
  height: 36px; padding: 0 14px; border: 0; border-radius: 18px;
  background: var(--erp-action, #148059); color: var(--erp-on-action, #fff);
  font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.ai-btn:hover { background: var(--erp-action-hover, #0e5c41); }
.ai-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9001; width: 380px; max-width: 100vw;
  display: flex; flex-direction: column; background: var(--erp-bg, #fff);
  border-left: 1px solid var(--erp-line, #dfe7e2); box-shadow: -4px 0 16px rgba(0, 0, 0, .08);
}
body.ai-open .frames { margin-right: 380px; }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--erp-line, #dfe7e2); }
.ai-sub { color: var(--erp-muted, #6b7280); font-size: 12px; }
.ai-close { margin-left: auto; border: 0; background: none; font-size: 16px; cursor: pointer; color: var(--erp-text, #2b2f36); }
.ai-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.55; }
.ai-hint { color: var(--erp-muted, #6b7280); font-size: 12px; margin: 0; }
.ai-q { align-self: flex-end; max-width: 85%; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--erp-action, #148059) 12%, transparent); white-space: pre-wrap; }
.ai-a { align-self: flex-start; max-width: 92%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--erp-line, #dfe7e2); background: var(--erp-bg, #fff); }
.ai-wait { color: var(--erp-muted, #6b7280); }
.ai-err { border-color: #e5b4b4; color: #9b2c2c; }
.ai-src { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--erp-line, #dfe7e2); font-size: 12px; color: var(--erp-muted, #6b7280); }
.ai-src a { color: var(--erp-action, #148059); }
.ai-form { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--erp-line, #dfe7e2); }
.ai-form textarea { flex: 1; resize: none; font: inherit; padding: 6px 8px; border: 1px solid var(--erp-line, #dfe7e2); border-radius: 4px; }
.ai-form button { padding: 0 14px; border: 0; border-radius: 4px; background: var(--erp-action, #148059); color: var(--erp-on-action, #fff); font: inherit; cursor: pointer; }
.ai-form button:disabled { opacity: .5; }
@media (max-width: 900px) {
  .ai-panel { width: 100vw; }
  body.ai-open .frames { margin-right: 0; }
}
.ai-note { border-style: dashed; color: var(--erp-muted, #6b7280); font-size: 12px; }
/* 2단계 조회 표 */
.ai-table { margin-top: 8px; border: 1px solid var(--erp-line, #dfe7e2); border-radius: 6px; overflow: hidden; }
.ai-table-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--erp-bg, #f5f8f6); font-size: 12px; }
.ai-table-head span { color: var(--erp-muted, #6b7280); }
.ai-goto { margin-left: auto; border: 0; background: none; color: var(--erp-action, #148059); font: inherit; font-size: 12px; cursor: pointer; }
.ai-table-wrap { max-height: 240px; overflow: auto; }
.ai-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ai-table th, .ai-table td { padding: 3px 6px; border-top: 1px solid var(--erp-line, #dfe7e2); text-align: left; white-space: nowrap; }
.ai-table th { position: sticky; top: 0; background: var(--erp-bg, #f5f8f6); font-weight: 600; }
/* 고친 결과 알림(11-15) — 내 개선 요청이 반영·반려되면 한 번 */
.ai-notice { border-color: var(--erp-action, #148059); border-left-width: 3px; background: color-mix(in srgb, var(--erp-action, #148059) 6%, var(--erp-bg, #fff)); }
.ai-btn.ai-has-notice { box-shadow: 0 0 0 3px color-mix(in srgb, var(--erp-action, #148059) 30%, transparent), 0 2px 8px rgba(0, 0, 0, .18); }
.ai-table-sum { padding: 4px 8px; font-size: 12px; color: var(--erp-muted, #6b7280); border-bottom: 1px solid var(--erp-line, #dfe7e2); }
.ai-table-sum b { color: var(--erp-text, #2b2f36); font-weight: 600; }
