/* ═══════════════════════════════════════════════════════════════════════
   ProSync — Dark Modern Theme
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-input: #16162a;
  --text-primary: #e0e0f0;
  --text-secondary: #a0a0c0;
  --text-muted: #606080;
  --accent: #6c5ce7;
  --accent-hover: #7c6cf7;
  --accent-glow: rgba(108, 92, 231, 0.15);
  --green: #2ecc71;
  --red: #e74c3c;
  --yellow: #f1c40f;
  --border: #2a2a4a;
  --border-light: #3a3a5a;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Header ──────────────────────────────────────────────────────────── */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--accent);
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  overflow: hidden;
}

.avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-badge {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  position: relative;
}

/* ── Hero Section ────────────────────────────────────────────────────── */
.hero {
  padding: 60px 24px 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.15;
}

.hero p {
  color: var(--text-secondary);
  font-size: clamp(15px, 2.5vw, 19px);
  max-width: 640px;
  margin: 0 auto 20px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
}

.stat-item .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-item .label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Filters ─────────────────────────────────────────────────────────── */
.filters {
  background: var(--bg-secondary);
  padding: 20px 24px;
  margin-bottom: 0;
}

.filters-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-row input,
.filter-row select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border var(--transition);
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.filter-row input {
  flex: 1;
  min-width: 200px;
}

.filter-row select {
  min-width: 140px;
}

.btn-filter {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-filter:hover {
  background: var(--accent-hover);
}

/* ── Feed ────────────────────────────────────────────────────────────── */
.feed {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.feed-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.feed-count {
  color: var(--text-muted);
  font-size: 14px;
}

.profissionais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ── Card ────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
}

.card-info h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-info .location {
  color: var(--text-muted);
  font-size: 13px;
}

.card-bio {
  padding: 0 20px 8px;
  font-size: 14px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 20px;
}

.skill-tag {
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(108, 92, 231, 0.2);
}

.skill-tag.more {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.card-senioridade {
  padding: 4px 20px 8px;
}

.senioridade-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.senioridade-badge.junior {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
}

.senioridade-badge.pleno {
  background: rgba(241, 196, 15, 0.15);
  color: var(--yellow);
}

.senioridade-badge.senior {
  background: rgba(231, 76, 60, 0.15);
  color: var(--red);
}

.card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

.btn-connect {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-connect:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.btn-connect:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-connect.connected {
  background: var(--green);
}

.btn-profile {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-profile:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 32px 28px;
}

.modal-body .card-avatar {
  width: 72px;
  height: 72px;
}

.modal-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-body .location {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-body .bio-full {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.modal-section {
  margin-bottom: 16px;
}

.modal-section h4 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.modal-section .skill-tag {
  font-size: 13px;
}

.modal-footer {
  padding: 16px 28px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
}

/* ── Empty State ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ── Toast ───────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 20px;
  color: var(--text-primary);
  font-size: 14px;
  animation: slideIn 0.3s ease;
  min-width: 200px;
  max-width: 360px;
  box-shadow: var(--shadow);
}

.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
.toast.info { border-color: var(--accent); }

/* ── Loading ─────────────────────────────────────────────────────────── */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 8px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Hamburger Menu ──────────────────────────────────────────────────── */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}
.hamburger:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { height: 56px; }
  .hero { padding: 40px 20px 28px; }
  .hero h1 { font-size: 24px; }
  .profissionais-grid { grid-template-columns: 1fr; }
  .filter-row input { min-width: unset; }
  .filter-row { flex-direction: column; }
  .filter-row input,
  .filter-row select { width: 100%; }
  .filters { padding: 16px; }
  .feed { padding: 16px; }
  .card-top { padding: 12px 16px; }
  .card-bio { padding: 0 16px 6px; }
  .card-skills { padding: 6px 16px; }
  .card-actions { padding: 10px 16px; }
  .modal { max-width: 100%; margin: 12px; border-radius: 12px; }

  /* Hamburger */
  .hamburger { display: flex; }
  .header-nav { display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 8px 16px; gap: 4px; z-index: 99; }
  .header-nav.open { display: flex; }
  .header-nav a { padding: 10px 14px; font-size: 14px; border-radius: var(--radius-sm); }
  .header-nav a:hover { background: var(--bg-input); }
  .btn-register { width: 100%; text-align: center; margin: 4px 0; }
  .header-profile { padding: 8px 14px; justify-content: center; margin-top: 4px; }

  /* Feed header buttons on mobile */
  .feed-header { flex-wrap: wrap; gap: 8px; }
  .feed-header h2 { font-size: 17px; }
  .feed-header button.btn-filter { width: 100%; }

  /* Desafio/Oportunidade feed-header */
  #abaDesafios .feed-header,
  #abaOportunidades .feed-header,
  #abaMentoria .feed-header { flex-wrap: wrap; gap: 8px; }
  #abaDesafios .feed-header button.btn-filter,
  #abaOportunidades .feed-header button.btn-filter,
  #abaMentoria .feed-header button.btn-filter { width: 100%; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction: column; align-items: center; }
  .stat-item { min-width: unset; width: 100%; }
  .header-nav a { font-size: 13px; padding: 8px 12px; }
  .modal { margin: 8px; padding: 0; }
  .modal-body { padding: 24px 20px; }
  .modal-footer { padding: 12px 20px; flex-wrap: wrap; }
  .feed-header h2 { font-size: 16px; }
  .form-row { flex-direction: column; gap: 8px; }
  .checkbox-group { flex-direction: column; gap: 4px; }
  .tabs { flex-wrap: wrap; }
  .tab { padding: 8px 14px; font-size: 13px; }

  /* Touch targets min 44px */
  .btn-connect { min-height: 44px; }
  .btn-profile { min-height: 44px; }
  .btn-participar { min-height: 44px; }
  .btn-filter { min-height: 44px; }
  .btn-primary { min-height: 44px; }
  .chat-input-area button { min-height: 44px; }
  .conversa-item { min-height: 60px; }
  .mentor-item { min-height: 60px; }
}

/* ── Registration Modal ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* ── Register Button in Header ──────────────────────────────────────── */
.btn-register {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-register:hover {
  background: var(--accent-hover);
}

/* ── Tab Navigation ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Match Indicators ────────────────────────────────────────────────── */
.match-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.match-score.high {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
}

.match-score.medium {
  background: rgba(241, 196, 15, 0.15);
  color: var(--yellow);
}

.match-score.low {
  background: rgba(231, 76, 60, 0.15);
  color: var(--red);
}

/* ═══════════════════════════════════════════════════════════════════════
   Chat
   ═══════════════════════════════════════════════════════════════════════ */

.chat-container {
  display: flex;
  flex-direction: column;
  height: 60vh;
  min-height: 300px;
  max-height: 70vh;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}

.chat-msg.mine {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.theirs {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg .msg-time {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
  opacity: 0.7;
}

.chat-msg .msg-read {
  font-size: 11px;
  color: var(--green);
  display: block;
  margin-top: 2px;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-radius: 0 0 16px 16px;
}

.chat-input-area input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.chat-input-area input:focus {
  border-color: var(--accent);
}

.chat-input-area button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}

.chat-input-area button:hover {
  background: var(--accent-hover);
}

.chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}

.chat-empty .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Conversas List
   ═══════════════════════════════════════════════════════════════════════ */

.conversa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
}

.conversa-item:hover {
  border-color: var(--accent);
  background: var(--bg-input);
}

.conversa-item .avatar-sm {
  width: 44px;
  height: 44px;
}

.conversa-info {
  flex: 1;
}

.conversa-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.conversa-info .ultima-msg {
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.conversa-badge {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 6px;
}

.conversa-score {
  font-size: 11px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   Desafios
   ═══════════════════════════════════════════════════════════════════════ */

.desafio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 16px;
}

.desafio-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.desafio-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.desafio-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.desafio-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.desafio-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

.desafio-status-badge.aberto {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
}

.desafio-status-badge.em_andamento {
  background: rgba(241, 196, 15, 0.15);
  color: var(--yellow);
}

.desafio-status-badge.concluido {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent);
}

.desafio-body {
  padding: 0 20px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.desafio-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 20px;
}

.desafio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.desafio-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desafio-actions {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

.btn-participar {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-participar:hover {
  background: var(--accent-hover);
}

.btn-participar:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-participar.inscrito {
  background: var(--green);
}

/* ── Create Desafio Form ─────────────────────────────────────────────── */

#createDesafioForm .form-group textarea {
  min-height: 80px;
}

/* ── Desafio Detail Modal ────────────────────────────────────────────── */

.desafio-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.desafio-detail-header h2 {
  font-size: 22px;
}

.desafio-detail-section {
  margin-bottom: 16px;
}

.desafio-detail-section h4 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.participante-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.participante-item:last-child {
  border-bottom: none;
}

.participante-item .avatar-sm {
  width: 32px;
  height: 32px;
}

.participante-item span {
  font-size: 14px;
  font-weight: 500;
}

/* ── Desafio Filters ─────────────────────────────────────────────────── */

.desafio-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.desafio-filters select,
.desafio-filters input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.desafio-filters select:focus,
.desafio-filters input:focus {
  border-color: var(--accent);
}

/* ── Responsive additions for chat/desafios ──────────────────────────── */
@media (max-width: 768px) {
  .chat-container { height: 70vh; min-height: 250px; }
  .chat-input-area { padding: 10px 12px; }
  .chat-msg { max-width: 92%; font-size: 13px; }
  .desafio-header { padding: 12px 16px; }
  .desafio-body { padding: 0 16px 10px; }
  .desafio-skills { padding: 4px 16px; }
  .desafio-meta { padding: 6px 16px; }
  .desafio-actions { padding: 10px 16px; }
  .conversa-item { padding: 12px 14px; }
  .desafio-filters { flex-direction: column; }
  .desafio-filters select,
  .desafio-filters input { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Mentoria
   ═══════════════════════════════════════════════════════════════════════ */

.mentoria-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 16px;
}

.mentoria-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.mentoria-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mentoria-header .avatar-sm {
  width: 40px;
  height: 40px;
}

.mentoria-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.mentoria-area {
  font-size: 12px;
  color: var(--text-muted);
}

.mentoria-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.mentoria-status-badge.pendente {
  background: rgba(241, 196, 15, 0.15);
  color: var(--yellow);
}

.mentoria-status-badge.ativa {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
}

.mentoria-status-badge.concluida {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent);
}

.mentoria-body {
  padding: 0 20px 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.mentoria-actions {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

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

.mentor-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
}

.mentor-item:hover {
  border-color: var(--accent);
  background: var(--bg-input);
}

.mentor-item .avatar-sm {
  width: 44px;
  height: 44px;
}

.mentor-info {
  flex: 1;
}

.mentor-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.mentor-info .mentor-detail {
  font-size: 13px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   Oportunidades
   ═══════════════════════════════════════════════════════════════════════ */

.oportunidade-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 16px;
}

.oportunidade-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.oportunidade-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.oportunidade-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.oportunidade-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.oportunidade-tipo-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

.oportunidade-tipo-badge.vaga {
  background: rgba(231, 76, 60, 0.15);
  color: var(--red);
}

.oportunidade-tipo-badge.projeto {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
}

.oportunidade-tipo-badge.parceria {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent);
}

.oportunidade-body {
  padding: 0 20px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oportunidade-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 20px;
}

.oportunidade-contato {
  padding: 8px 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.oportunidade-actions {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

.oportunidade-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.oportunidade-filters select,
.oportunidade-filters input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.oportunidade-filters select:focus,
.oportunidade-filters input:focus {
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════
   Reputação / Score
   ═══════════════════════════════════════════════════════════════════════ */

.reputation-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent);
}

.reputation-score.high {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
}

.reputation-score.medium {
  background: rgba(241, 196, 15, 0.15);
  color: var(--yellow);
}

.reputation-score.low {
  background: rgba(231, 76, 60, 0.15);
  color: var(--red);
}

.breakdown-list {
  margin-top: 12px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-item .breakdown-value {
  color: var(--accent);
  font-weight: 600;
}

/* ── Responsive additions for Fase 3 ────────────────────────────────── */
@media (max-width: 768px) {
  .oportunidade-header { padding: 12px 16px; }
  .oportunidade-body { padding: 0 16px 10px; }
  .oportunidade-skills { padding: 4px 16px; }
  .oportunidade-contato { padding: 6px 16px; }
  .oportunidade-actions { padding: 10px 16px; }
  .oportunidade-filters { flex-direction: column; }
  .oportunidade-filters select,
  .oportunidade-filters input { width: 100%; }
  .mentoria-header { padding: 12px 16px; }
  .mentoria-body { padding: 0 16px 10px; }
  .mentoria-actions { padding: 10px 16px; }
}