/**
 * Francoda App Styles — 任务大厅 / 任务详情 / 代理人墙 专用样式
 * Version: 1.0
 */

/* ===== Page Hero ===== */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3050 100%);
  color: white;
  padding: 48px 0 40px;
  margin-top: 64px;
  text-align: center;
}
.page-hero h1 { font-size: 28px; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 15px; }

/* ===== Stats Bar ===== */
.task-hall-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 120px;
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
}
.stat-lbl {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.highlight-green { color: var(--green); }
.highlight-gold { color: var(--gold); }
.highlight-blue { color: #3498db; }

/* ===== Task Cards (Hall) ===== */
.task-card-hall {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.task-card-hall:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--gold);
}
.task-card-featured {
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, #fffdf5 0%, #ffffff 100%);
}
.featured-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--gold);
  color: white;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.task-card-hall .task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.task-card-hall h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}
.task-card-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 12px;
}
.task-card-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.task-bids { color: var(--gold); font-weight: 600; font-size: 13px; }
.task-arrow { color: var(--gold); font-weight: 600; font-size: 13px; }

/* Status Badges */
.task-status-badge,
.task-status-badge-small {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.task-status-badge-large {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.task-status-badge-small {
  font-size: 10px;
  padding: 2px 8px;
}
.status-open { background: #e8f5e9; color: #2e7d32; }
.status-assigned { background: #fff3e0; color: #e65100; }
.status-active { background: #e3f2fd; color: #1565c0; }
.status-completed { background: #f3e5f5; color: #7b1fa2; }
.status-rated { background: #e8f5e9; color: #1b5e20; }

/* Type Badge */
.task-type-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  color: var(--navy);
}
.task-type-badge-large {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg);
  color: var(--navy);
}
.badge-factory { background: #e3f2fd; color: #1565c0; }
.badge-expo { background: #fff3e0; color: #e65100; }
.badge-market { background: #e8f5e9; color: #2e7d32; }

/* ===== Task Detail ===== */
.real-task-banner {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: white;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 24px;
}

.task-detail-header {
  margin-bottom: 32px;
}
.task-detail-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.task-detail-title-row h1 {
  font-size: 24px;
  font-weight: 800;
  flex: 1;
  min-width: 250px;
}
.task-detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.meta-item {
  font-size: 13px;
  color: var(--text-light);
}

.task-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .task-detail-grid { grid-template-columns: 1fr; }
}

/* ===== Progress Tracker ===== */
.progress-tracker {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}
.progress-step.done .step-circle {
  background: var(--green);
  color: white;
}
.progress-step.current .step-circle {
  background: var(--gold);
  color: white;
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.2);
}
.step-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
}
.progress-step.done .step-label,
.progress-step.current .step-label {
  color: var(--navy);
  font-weight: 600;
}
.progress-line {
  flex: 1;
  height: 3px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 24px;
}
.progress-line.done {
  background: var(--green);
}

/* ===== Detail Cards ===== */
.detail-card {
  margin-bottom: 20px;
}
.detail-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Task Description Content */
.task-description-content h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--navy);
}
.task-description-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 8px;
}
.task-description-content ul, .task-description-content ol {
  margin-left: 20px;
  margin-bottom: 12px;
}
.task-description-content li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-light);
}
.task-description-content table {
  font-size: 13px;
}
.task-description-content b {
  color: var(--navy);
}

/* Checklist Attachment */
.checklist-attachment {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 13px;
}

/* ===== File Upload ===== */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--gold);
  background: #fffdf5;
}
.file-upload-icon { font-size: 40px; margin-bottom: 12px; }
.file-upload-area p { color: var(--text-light); font-size: 14px; }
.file-hint { font-size: 12px !important; color: var(--text-muted) !important; margin-top: 8px; }

/* ===== Deliverable List ===== */
.deliverable-list { display: flex; flex-direction: column; gap: 12px; }
.deliverable-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}
.deliverable-icon { font-size: 24px; }
.deliverable-item small { display: block; color: var(--text-muted); margin-top: 4px; }

/* ===== Sidebar ===== */
.sidebar-card {
  margin-bottom: 16px;
}
.sidebar-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sidebar-agent {
  display: flex;
  align-items: center;
  gap: 12px;
}
.agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.agent-rating { font-size: 13px; color: var(--gold); margin-top: 2px; }

/* Payment Timeline */
.payment-timeline { display: flex; flex-direction: column; gap: 12px; }
.payment-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.payment-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  margin-top: 5px;
  flex-shrink: 0;
}
.payment-step.done .payment-dot { background: var(--green); }
.payment-step div { flex: 1; }
.payment-step strong { display: block; font-size: 13px; }
.payment-step span { font-size: 12px; color: var(--text-muted); }
.payment-step small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Bid Items */
.bid-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.bid-item:last-child { border-bottom: none; }
.bid-item small { display: block; color: var(--text-muted); margin-top: 4px; }

/* Rating History */
.rating-history-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.rating-history-item:last-child { border-bottom: none; }
.rating-history-item small { display: block; color: var(--text-muted); margin-top: 4px; }

/* ===== Rating Widget ===== */
.rating-widget {
  text-align: center;
  padding: 16px 0;
}
.rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.star {
  font-size: 36px;
  color: var(--border);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.star:hover { color: var(--gold); transform: scale(1.2); }
.rating-score-display {
  font-size: 14px;
  color: var(--text-muted);
}

/* Completed Summary */
.completed-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.summary-row span { color: var(--text-muted); font-size: 13px; }

/* ===== Agent Cards ===== */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.agent-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.agent-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.agent-card-featured {
  border: 2px solid var(--gold);
}
.agent-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.agent-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, #2a4070 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
}
.agent-avatar-xlarge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, #2a4070 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 30px;
  flex-shrink: 0;
}
.agent-card-title h3 {
  font-size: 16px;
  font-weight: 700;
}
.agent-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
  margin-top: 4px;
}
.badge-verified { background: #e8f5e9; color: #2e7d32; }
.badge-pending { background: #fff3e0; color: #e65100; }
.agent-rating-display {
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 6px;
}
.agent-rating-display small {
  color: var(--text-muted);
  font-size: 12px;
}
.agent-card-info {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.agent-card-skills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.skill-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg);
  border-radius: 20px;
  color: var(--navy);
  font-weight: 500;
}
.agent-card-intro {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
}
.agent-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.agent-verified { color: var(--green); font-size: 12px; font-weight: 600; }
.agent-pending { color: var(--gold); font-size: 12px; font-weight: 600; }

/* ===== Agent Detail ===== */
.agent-detail-full {
  max-width: 800px;
  margin: 0 auto;
}
.agent-detail-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.agent-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agent-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 13px;
}
.agent-task-item span:first-child { flex: 1; }
.rating-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rating-item-detail {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}
.rating-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}
.rating-item-detail p {
  font-size: 13px;
  color: var(--text-light);
}

/* ===== Link Arrow ===== */
.link-arrow {
  color: var(--gold);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }

/* ===== Form Elements ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group textarea,
.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  transition: var(--transition);
}
.form-group textarea:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ===== Card (reusable) ===== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ===== Filter Buttons (reused) ===== */
.task-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.filter-btn:hover:not(.active) {
  border-color: var(--gold);
  color: var(--navy);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .task-hall-stats { flex-wrap: wrap; }
  .stat-item { min-width: calc(50% - 8px); }
  .progress-steps { overflow-x: auto; }
  .step-label { font-size: 9px; }
  .agent-grid { grid-template-columns: 1fr; }
  .task-detail-grid { grid-template-columns: 1fr; }
  .task-detail-title-row { flex-direction: column; align-items: flex-start; }
}
