/* ═══════════════════════════════════════════════════════════
   ARENA CROSS — v3 styles
   Inclua no index.html depois dos outros CSS:
     <link rel="stylesheet" href="css/v3-profile.css?v=20260515">
   ═══════════════════════════════════════════════════════════ */

/* ────────── Profile Header v3 (responsivo) ────────── */
.profile-header-v3 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.profile-header-v3 .profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-header-v3 .profile-avatar-camera {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  border: 3px solid var(--bg);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
}
.profile-header-v3 .profile-info {
  min-width: 0;
  overflow: hidden;
}
.profile-header-v3 .profile-info h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.profile-header-v3 .profile-info p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 0.85rem;
}
.profile-header-v3 .profile-edit-btn {
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

/* Mobile (até 640px): empilha tudo verticalmente */
@media (max-width: 640px) {
  .profile-header-v3 {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 14px;
  }
  .profile-header-v3 .profile-avatar-wrap {
    justify-self: center;
  }
  .profile-header-v3 .profile-info h2 {
    font-size: 1.15rem;
  }
  .profile-header-v3 .profile-info p {
    justify-content: center;
  }
  .profile-header-v3 .profile-since {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }
  .profile-header-v3 .profile-since::before {
    content: '';
  }
  .profile-header-v3 .profile-edit-btn {
    justify-self: center;
    width: auto;
    min-width: 140px;
  }
}

/* Avatares com foto */
.profile-avatar img,
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar {
  position: relative;
  overflow: hidden;
}

/* Tabs dentro de modais */
.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-size: 0.88rem;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* QR rotativo no perfil */
#profile-qr-area img {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Botão de trocar foto no perfil */
.profile-header [title="Trocar foto"]:hover {
  transform: scale(1.1);
  transition: transform 0.15s;
}

/* Banner do contato de emergência */
.emergency-banner {
  border-left: 4px solid #e74c3c;
  padding-left: 12px;
}

/* Preview de foto no upload */
#photo-preview img {
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Tabela de alunos: avatares menores */
.data-table .sidebar-avatar,
.data-table .profile-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
  min-width: 36px;
}

/* Responsive: tabs viram scrolláveis em mobile */
@media (max-width: 640px) {
  .modal .tab-btn {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .profile-header {
    flex-wrap: wrap;
  }
}
