/* style.css — minimal styling for the bill-recon chat UI. No build
   chain, no external CSS framework; just plain CSS so the bundle
   stays embeddable in a single Go binary.
   style.css — bill-recon chat UI 极简样式. 不引 build chain, 不引外
   部 CSS 框架; 纯 CSS 让 bundle 一个 Go 二进制内嵌. */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #f3f4f6;
  color: #111827;
}
main {
  max-width: 880px;
  margin: 32px auto;
  padding: 0 16px;
}
header h1 { margin: 0 0 4px; font-size: 1.5rem; }
header .subtitle { margin: 0 0 24px; color: #6b7280; font-size: 0.9rem; }
.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.card h2 { margin: 0 0 16px; font-size: 1.1rem; color: #374151; }
form { display: grid; gap: 12px; }
form label { display: grid; gap: 4px; font-size: 0.85rem; color: #4b5563; }
form input { padding: 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.95rem; }
form button {
  padding: 10px;
  border: none;
  border-radius: 4px;
  background: #2563eb;
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
}
form button:hover { background: #1d4ed8; }
form button:disabled { background: #9ca3af; cursor: not-allowed; }
.error { color: #dc2626; margin: 8px 0 0; }
.session-id { color: #6b7280; font-size: 0.8rem; font-family: monospace; }
#event-stream {
  display: grid;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.9rem;
}
.event {
  padding: 8px 12px;
  border-left: 3px solid #d1d5db;
  background: #f9fafb;
  border-radius: 4px;
}
.event time { color: #6b7280; font-size: 0.8rem; margin-right: 8px; }
.event .type { font-weight: 600; margin-right: 8px; }
.event.state_changed { border-left-color: #2563eb; }
.event.state_changed .type { color: #2563eb; }
.event.progress { border-left-color: #16a34a; }
.event.progress .type { color: #16a34a; }
.event.info { border-left-color: #6b7280; }
.event.error { border-left-color: #dc2626; background: #fee2e2; }
.event.error .type { color: #dc2626; }
.event.llm_thinking { border-left-color: #ea580c; }
.event.llm_response { border-left-color: #ea580c; }
.event.tool_called { border-left-color: #7c3aed; }
.event.human_input_needed { border-left-color: #facc15; background: #fef9c3; }
.event pre { margin: 4px 0 0; font-size: 0.8rem; white-space: pre-wrap; word-break: break-all; }

.hint { color: #6b7280; font-size: 0.85rem; margin: 0 0 12px; }
#cols-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 0.9rem; }
#cols-table th, #cols-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e5e7eb; }
#cols-table thead th { background: #f9fafb; color: #4b5563; font-weight: 600; }
#cols-table select { padding: 4px 8px; font-size: 0.9rem; }
#cols-table .preview { color: #6b7280; font-size: 0.8rem; }

/* C6 调价 review 表单. 每张图一个 .adjustment-card. */
#adjustments-list { display: grid; gap: 16px; margin-bottom: 12px; }
.adjustment-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 14px;
  background: #f9fafb;
}
.adjustment-card h3 { margin: 0 0 8px; font-size: 1rem; color: #374151; }
.adjustment-card .hint { margin-bottom: 8px; word-break: break-all; }
.adjustment-card .adj-field { display: grid; gap: 4px; margin-bottom: 8px; font-size: 0.85rem; color: #4b5563; }
.adjustment-card .adj-field input,
.adjustment-card .adj-field textarea,
.adjustment-card .adj-field select {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
}
.adjustment-card .adj-status { display: flex; gap: 16px; margin-top: 4px; font-size: 0.9rem; }
.adjustment-card .adj-status label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
#adjustments-submit-btn {
  padding: 10px;
  border: none;
  border-radius: 4px;
  background: #2563eb;
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
}
#adjustments-submit-btn:hover { background: #1d4ed8; }
#adjustments-submit-btn:disabled { background: #9ca3af; cursor: not-allowed; }

/* 历史账单列表. */
#bills-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; font-size: 0.88rem; }
#bills-table th, #bills-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e5e7eb; }
#bills-table thead th { background: #f9fafb; color: #4b5563; font-weight: 600; }
#bills-table td.num { text-align: right; font-family: monospace; }
#bills-table .delete-btn {
  padding: 4px 10px; border: 1px solid #fca5a5; background: white; color: #dc2626;
  border-radius: 4px; cursor: pointer; font-size: 0.85rem;
}
#bills-table .delete-btn:hover { background: #fee2e2; }
.link-btn {
  background: none; border: none; color: #2563eb; cursor: pointer; font-size: 0.85rem;
  padding: 0 0 0 8px; text-decoration: underline;
}
.link-btn:hover { color: #1d4ed8; }
