* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #1a1a2e; }
.container { max-width: 960px; margin: 0 auto; padding: 16px; }

header { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; flex-wrap: wrap; gap: 12px; }
header h1 { font-size: 1.5rem; color: #1a1a2e; }
.actions { display: flex; gap: 8px; }

.btn { padding: 8px 16px; border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.btn:hover { background: #f5f5f5; }
.btn.primary { background: #4472C4; color: #fff; border-color: #4472C4; }
.btn.primary:hover { background: #365a9e; }
.btn.danger { background: #E74C3C; color: #fff; border-color: #E74C3C; }
.btn.success { background: #27AE60; color: #fff; border-color: #27AE60; }
.btn.warning { background: #F39C12; color: #fff; border-color: #F39C12; }
.btn.sm { padding: 4px 10px; font-size: 0.75rem; }

.filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn { padding: 6px 14px; border: 1px solid #ddd; border-radius: 20px; background: #fff; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.filter-btn.active { background: #4472C4; color: #fff; border-color: #4472C4; }
.filter-btn:hover:not(.active) { background: #e8e8e8; }

.task-list { display: flex; flex-direction: column; gap: 8px; }

.task-card { background: #fff; border-radius: 8px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); cursor: pointer; transition: all 0.2s; border-left: 4px solid #ddd; }
.task-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); transform: translateY(-1px); }
.task-card.status-pending { border-left-color: #95a5a6; }
.task-card.status-in_progress { border-left-color: #3498db; }
.task-card.status-in_review { border-left-color: #f39c12; }
.task-card.status-rework { border-left-color: #e74c3c; }
.task-card.status-approved { border-left-color: #27ae60; }

.task-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.task-id { font-weight: 700; font-size: 0.95rem; }
.task-time { font-size: 0.75rem; color: #999; }
.task-prompt { font-size: 0.85rem; color: #555; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-bottom { display: flex; justify-content: space-between; align-items: center; }
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; color: #fff; }
.status-badge.pending { background: #95a5a6; }
.status-badge.in_progress { background: #3498db; }
.status-badge.in_review { background: #f39c12; }
.status-badge.rework { background: #e74c3c; }
.status-badge.approved { background: #27ae60; }
.model-badge { padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; color: #fff; }
.model-badge.claude_sonnet { background: #8e44ad; }
.model-badge.claude_opus { background: #6c3483; }
.model-badge.openai_gpt4o { background: #10a37f; }
.task-btns { display: flex; gap: 6px; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; justify-content: center; align-items: flex-start; padding: 40px 16px; overflow-y: auto; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-header h2 { font-size: 1.1rem; }
.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #999; }
.close-btn:hover { color: #333; }
.modal-body { padding: 20px; }

label { display: block; font-size: 0.8rem; font-weight: 600; color: #555; margin: 12px 0 4px; }
label:first-child { margin-top: 0; }
input[type="text"], input[type="email"], textarea, select { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.9rem; font-family: inherit; }
textarea { resize: vertical; }
select { background: #fff; }

.comment-list { margin: 12px 0; max-height: 200px; overflow-y: auto; }
.comment-item { padding: 8px; border-bottom: 1px solid #f0f0f0; font-size: 0.85rem; }
.comment-item .author { font-weight: 600; color: #4472C4; }
.comment-item .time { font-size: 0.7rem; color: #aaa; }
.comment-input { display: flex; gap: 8px; margin-top: 8px; }
.comment-input input { flex: 1; }
.comment-input select { width: auto; flex: 0 0 100px; }

.file-section { margin-top: 12px; padding: 12px; background: #f8f9fa; border-radius: 6px; }
.file-section input[type="file"] { font-size: 0.8rem; }

@media (max-width: 600px) {
  .container { padding: 10px; }
  header h1 { font-size: 1.2rem; }
  .filters { gap: 4px; }
  .filter-btn { padding: 5px 10px; font-size: 0.7rem; }
  .modal { margin: 10px; }
  .task-btns { flex-direction: column; gap: 4px; }
}
