* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2933;
    margin: 0;
    padding: 0;
}
.container { max-width: 900px; margin: 0 auto; padding: 24px; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
h1 { font-size: 22px; margin: 0; }

.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; font-size: 14px; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-secondary { background: #e5e7eb; color: #1f2933; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
.table th { background: #f9fafb; }

.badge { padding: 2px 8px; border-radius: 12px; font-size: 12px; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-planning { background: #e5e7eb; color: #374151; }
.badge-in_progress { background: #dbeafe; color: #1e40af; }

.form { display: flex; flex-direction: column; gap: 6px; background: #fff; padding: 20px; border-radius: 8px; }
.form label { font-weight: 600; margin-top: 10px; font-size: 14px; }
.form input, .form textarea {
    padding: 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.hint { font-size: 12px; color: #6b7280; background: #f9fafb; padding: 8px; border-radius: 6px; }
.alert-error { background: #fee2e2; color: #991b1b; padding: 10px; border-radius: 6px; margin-bottom: 12px; }

.controls { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
#progress-label { font-size: 13px; color: #6b7280; }
#progress-bar-wrap { background: #e5e7eb; border-radius: 6px; height: 8px; margin-bottom: 20px; overflow: hidden; }
#progress-bar { background: #2563eb; height: 100%; width: 0%; transition: width 0.3s; }

.question-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.q-item { background: #fff; border-radius: 8px; padding: 12px 16px; display: flex; gap: 12px; border-left: 4px solid #e5e7eb; }
.q-item.status-completed { border-left-color: #10b981; }
.q-item.status-processing { border-left-color: #3b82f6; }
.q-item.status-error { border-left-color: #ef4444; }
.q-order { font-weight: 700; color: #6b7280; min-width: 32px; }
.q-body { flex: 1; }
.q-text { font-size: 14px; }
.q-type { color: #6b7280; font-size: 12px; }
.q-status { font-size: 12px; color: #6b7280; margin-top: 4px; }
.q-answer { margin-top: 8px; background: #f9fafb; padding: 10px; border-radius: 6px; font-size: 13px; white-space: pre-wrap; }
.btn-retry { margin-top: 8px; background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-retry:disabled { opacity: 0.6; cursor: not-allowed; }

.result-card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 14px; }
.result-header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.result-question { font-size: 14px; margin-bottom: 8px; }
.result-answer pre { white-space: pre-wrap; background: #f9fafb; padding: 10px; border-radius: 6px; font-size: 13px; }
.result-answer.empty { color: #9ca3af; font-style: italic; }

.empty-state { text-align: center; color: #6b7280; padding: 40px; }
