/* Co-Skipper 文档助手 —— Word 任务窗格样式（浅色主题） */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 12px;
  font-family: "Segoe UI", "Microsoft YaHei", -apple-system, sans-serif;
  font-size: 13px;
  color: #1f2937;
  background: #f8fafc;
}

.brand-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.brand-logo { width: 24px; height: 24px; flex: none; }

header h1 {
  margin: 0;
  font-size: 16px;
  color: #312e81;
}

header .sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: #6b7280;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #374151;
}

.kv div {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px dashed #f1f5f9;
}

.kv .k { color: #6b7280; }
.kv .v { color: #111827; font-weight: 600; }

button {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  background: #eef2ff;
  color: #3730a3;
  cursor: pointer;
}

button.primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

button:hover:not(:disabled) { filter: brightness(0.97); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #6b7280;
}

.output {
  margin: 8px 0 0;
  padding: 8px;
  min-height: 40px;
  max-height: 220px;
  overflow: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.5;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- 对话式 UI ---------- */

.user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.user-row label { font-size: 12px; color: #6b7280; }
.user-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
}

.chat-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
  margin-bottom: 10px;
}

.chat-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  padding: 16px 8px;
}
.chat-empty p { margin: 0 0 6px; font-weight: 600; }
.chat-empty ul { text-align: left; margin: 0; padding-left: 20px; line-height: 1.8; }

.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg.assistant { justify-content: flex-start; }

.bubble {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.user .bubble {
  background: #4f46e5;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}
.msg.assistant .bubble {
  background: #f1f5f9;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 2px;
}

.input-card { position: sticky; bottom: 0; background: #f8fafc; }

.ai-input {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #1f2937;
  resize: vertical;
  box-sizing: border-box;
}
.ai-input:focus { outline: 2px solid #c7d2fe; border-color: transparent; }

.toolbar {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.toolbar button { flex: 1; min-width: 90px; }

button.ghost {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.status {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  min-height: 16px;
}

details.card { cursor: pointer; }
details.card summary { font-size: 13px; color: #6b7280; font-weight: 600; margin-bottom: 8px; }

footer p {
  margin: 8px 0 0;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}
