/* ════════════════════════════════════════
   TEAM QUESTS  (Sprint 6 · v2.0.0)
   ════════════════════════════════════════ */

.team-quest-card {
  background: linear-gradient(135deg, rgba(124,91,248,.15), rgba(73,54,232,.1));
  border: 1px solid rgba(124,91,248,.3);
  border-radius: 20px;
  padding: 16px;
  margin: 0 0 14px;
}

.tq-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.tq-quest-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.tq-quest-info { flex: 1; }
.tq-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  direction: rtl;
}
.tq-desc {
  font-size: 12px;
  color: var(--text-soft);
  direction: rtl;
  margin-top: 2px;
}

.tq-days {
  font-size: 11px;
  font-weight: 700;
  color: #7c5bf8;
  background: rgba(124,91,248,.12);
  border-radius: 99px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.tq-done-badge {
  font-size: 11px;
  font-weight: 800;
  color: #16a34a;
  background: rgba(34,197,94,.15);
  border-radius: 99px;
  padding: 3px 8px;
  flex-shrink: 0;
}

.tq-progress-wrap { margin-bottom: 12px; }
.tq-progress-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}
.tq-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5bf8, #4936e8);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
.tq-progress-fill.complete { background: linear-gradient(90deg, #22c55e, #16a34a); }
.tq-progress-label {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  font-weight: 600;
}

/* Member contributions */
.tq-members { display: flex; flex-direction: column; gap: 5px; }
.tq-member  { display: flex; align-items: center; gap: 8px; }
.tq-member-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(124,91,248,.25);
  color: #7c5bf8;
  font-size: 11px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(124,91,248,.35);
}
.tq-member-avatar.me {
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: #fff;
  border-color: transparent;
}
.tq-member-bar {
  flex: 1;
  height: 5px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.tq-member-fill {
  height: 100%;
  background: rgba(124,91,248,.6);
  border-radius: 99px;
  transition: width 0.5s;
}
.tq-member-val {
  font-size: 10px;
  color: var(--text-soft);
  font-weight: 700;
  min-width: 22px;
  text-align: right;
}

/* Empty state */
.tq-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 4px 0;
  text-align: center;
}
.tq-empty-text { font-size: 13px; color: var(--text-soft); direction: rtl; }

.tq-create-btn {
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
  box-shadow: 0 4px 16px rgba(124,91,248,.35);
  transition: transform 0.2s var(--spring);
}
.tq-create-btn:active { transform: scale(0.93); }

/* ── Team Create Modal ─────────────────────────────── */
.team-name-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
  margin-bottom: 14px;
  box-sizing: border-box;
}
.team-name-input:focus {
  outline: none;
  border-color: #7c5bf8;
  box-shadow: 0 0 0 3px rgba(124,91,248,.15);
}

.team-member-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
  direction: rtl;
}

.tmember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.tmember-row:last-child { border-bottom: none; }
.tmember-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tmember-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--text); direction: rtl; }
.tmember-check { width: 18px; height: 18px; accent-color: #7c5bf8; flex-shrink: 0; }

.tq-confirm-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  min-height: 48px;
  box-shadow: 0 4px 16px rgba(124,91,248,.35);
  transition: transform 0.2s var(--spring);
}
.tq-confirm-btn:active { transform: scale(0.97); }

/* ── Quest Complete Overlay ────────────────────────── */
.quest-complete-overlay {
  background: rgba(0,0,0,.7);
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.quest-complete-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.qc-inner {
  background: var(--surface);
  border-radius: 28px;
  padding: 32px 28px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  border: 1px solid rgba(124,91,248,.3);
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qc-icon  { font-size: 52px; }
.qc-title { font-size: 22px; font-weight: 900; color: var(--text); direction: rtl; }
.qc-name  { font-size: 16px; font-weight: 800; color: #7c5bf8; direction: rtl; }
.qc-reward { font-size: 14px; color: var(--text-soft); direction: rtl; }

.qc-close-btn {
  margin-top: 8px;
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  min-height: 48px;
  box-shadow: 0 4px 16px rgba(124,91,248,.35);
  transition: transform 0.2s var(--spring);
}
.qc-close-btn:active { transform: scale(0.95); }

